Package org.jboss.netty.util.internal
Class ExecutorUtil
- java.lang.Object
-
- org.jboss.netty.util.internal.ExecutorUtil
-
public final class ExecutorUtil extends java.lang.ObjectShuts down a list ofExecutors.terminate(Executor...)will shut down all specifiedExecutorServices immediately and wait for their termination. AnExecutorwhich is not anExecutorServicewill be ignored silently.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateExecutorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisShutdown(java.util.concurrent.Executor executor)Returnstrueif and only if the specifiedexecutoris anExecutorServiceand is shut down.static voidshutdownNow(java.util.concurrent.Executor executor)Try to callExecutorService.shutdownNow()static voidterminate(java.lang.ThreadLocal<java.util.concurrent.Executor> deadLockChecker, java.util.concurrent.Executor... executors)Shuts down the specified executors using the givenThreadLocalto check if there is a deadlockstatic voidterminate(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)
Returnstrueif and only if the specifiedexecutoris anExecutorServiceand is shut down. Please note that this method returnsfalseif the specifiedexecutoris 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 givenThreadLocalto check if there is a deadlock
-
-