Package com.mchange.v3.concurrent
Class BoundedExecutorService
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- com.mchange.v3.concurrent.BoundedExecutorService
-
- All Implemented Interfaces:
java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
public final class BoundedExecutorService extends java.util.concurrent.AbstractExecutorService
-
-
Constructor Summary
Constructors Constructor Description BoundedExecutorService(java.util.concurrent.ExecutorService inner, int blockBound)
BoundedExecutorService(java.util.concurrent.ExecutorService inner, int blockBound, int restartBeneath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
void
execute(java.lang.Runnable runnable)
com.mchange.v3.concurrent.BoundedExecutorService.State
getState()
boolean
isShutdown()
boolean
isTerminated()
protected <V> java.util.concurrent.RunnableFuture<V>
newTaskFor(java.lang.Runnable runnable, V result)
protected <V> java.util.concurrent.RunnableFuture<V>
newTaskFor(java.util.concurrent.Callable<V> callable)
void
shutdown()
java.util.List<java.lang.Runnable>
shutdownNow()
-
-
-
Method Detail
-
getState
public com.mchange.v3.concurrent.BoundedExecutorService.State getState()
-
isShutdown
public boolean isShutdown()
-
isTerminated
public boolean isTerminated()
-
shutdown
public void shutdown()
-
shutdownNow
public java.util.List<java.lang.Runnable> shutdownNow()
-
awaitTermination
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
execute
public void execute(java.lang.Runnable runnable)
-
newTaskFor
protected <V> java.util.concurrent.RunnableFuture<V> newTaskFor(java.util.concurrent.Callable<V> callable)
- Overrides:
newTaskFor
in classjava.util.concurrent.AbstractExecutorService
-
newTaskFor
protected <V> java.util.concurrent.RunnableFuture<V> newTaskFor(java.lang.Runnable runnable, V result)
- Overrides:
newTaskFor
in classjava.util.concurrent.AbstractExecutorService
-
-