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