Package org.jboss.netty.util.internal
Class ExecutorUtil
java.lang.Object
org.jboss.netty.util.internal.ExecutorUtil
Shuts down a list of
Executor
s. terminate(Executor...)
will
shut down all specified ExecutorService
s immediately and wait for
their termination. An Executor
which is not an ExecutorService
will be ignored silently.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isShutdown
(Executor executor) static void
shutdownNow
(Executor executor) Try to callExecutorService.shutdownNow()
static void
terminate
(ThreadLocal<Executor> deadLockChecker, Executor... executors) Shuts down the specified executors using the givenThreadLocal
to check if there is a deadlockstatic void
Shuts down the specified executors.
-
Constructor Details
-
ExecutorUtil
private ExecutorUtil()
-
-
Method Details
-
shutdownNow
Try to callExecutorService.shutdownNow()
-
isShutdown
Returnstrue
if and only if the specifiedexecutor
is anExecutorService
and is shut down. Please note that this method returnsfalse
if the specifiedexecutor
is not anExecutorService
. -
terminate
Shuts down the specified executors. -
terminate
Shuts down the specified executors using the givenThreadLocal
to check if there is a deadlock
-