Package com.mchange.v3.concurrent
Class BoundedExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
com.mchange.v3.concurrent.BoundedExecutorService
- All Implemented Interfaces:
AutoCloseable
,Executor
,ExecutorService
-
Constructor Summary
ConstructorsConstructorDescriptionBoundedExecutorService
(ExecutorService inner, int blockBound) BoundedExecutorService
(ExecutorService inner, int blockBound, int restartBeneath) -
Method Summary
Modifier and TypeMethodDescriptionboolean
awaitTermination
(long timeout, TimeUnit unit) void
com.mchange.v3.concurrent.BoundedExecutorService.State
getState()
boolean
boolean
protected <V> RunnableFuture
<V> newTaskFor
(Runnable runnable, V result) protected <V> RunnableFuture
<V> newTaskFor
(Callable<V> callable) void
shutdown()
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.ExecutorService
close
-
Constructor Details
-
BoundedExecutorService
-
BoundedExecutorService
-
-
Method Details
-
getState
public com.mchange.v3.concurrent.BoundedExecutorService.State getState() -
isShutdown
public boolean isShutdown() -
isTerminated
public boolean isTerminated() -
shutdown
public void shutdown() -
shutdownNow
-
awaitTermination
- Throws:
InterruptedException
-
execute
-
newTaskFor
- Overrides:
newTaskFor
in classAbstractExecutorService
-
newTaskFor
- Overrides:
newTaskFor
in classAbstractExecutorService
-