Package org.jboss.netty.util.internal
Class ExecutorUtil
- java.lang.Object
-
- org.jboss.netty.util.internal.ExecutorUtil
-
public final class ExecutorUtil extends java.lang.Object
Shuts down a list ofExecutor
s.terminate(Executor...)
will shut down all specifiedExecutorService
s immediately and wait for their termination. AnExecutor
which is not anExecutorService
will be ignored silently.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ExecutorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isShutdown(java.util.concurrent.Executor executor)
Returnstrue
if and only if the specifiedexecutor
is anExecutorService
and is shut down.static void
shutdownNow(java.util.concurrent.Executor executor)
Try to callExecutorService.shutdownNow()
static void
terminate(java.lang.ThreadLocal<java.util.concurrent.Executor> deadLockChecker, java.util.concurrent.Executor... executors)
Shuts down the specified executors using the givenThreadLocal
to check if there is a deadlockstatic void
terminate(java.util.concurrent.Executor... executors)
Shuts down the specified executors.
-
-
-
Method Detail
-
shutdownNow
public static void shutdownNow(java.util.concurrent.Executor executor)
Try to callExecutorService.shutdownNow()
-
isShutdown
public static boolean isShutdown(java.util.concurrent.Executor executor)
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
public static void terminate(java.util.concurrent.Executor... executors)
Shuts down the specified executors.
-
terminate
public static void terminate(java.lang.ThreadLocal<java.util.concurrent.Executor> deadLockChecker, java.util.concurrent.Executor... executors)
Shuts down the specified executors using the givenThreadLocal
to check if there is a deadlock
-
-