public final class ExecutorUtil extends Object
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.Modifier and Type | Method and Description |
---|---|
static boolean |
isShutdown(Executor executor)
|
static void |
shutdownNow(Executor executor)
Try to call
ExecutorService.shutdownNow() |
static void |
terminate(Executor... executors)
Shuts down the specified executors.
|
static void |
terminate(ThreadLocal<Executor> deadLockChecker,
Executor... executors)
Shuts down the specified executors using the given
ThreadLocal to check if there is a deadlock |
public static void shutdownNow(Executor executor)
ExecutorService.shutdownNow()
public static boolean isShutdown(Executor executor)
true
if and only if the specified executor
is an ExecutorService
and is shut down. Please note that this
method returns false
if the specified executor
is not an
ExecutorService
.public static void terminate(Executor... executors)
public static void terminate(ThreadLocal<Executor> deadLockChecker, Executor... executors)
ThreadLocal
to check if there is a deadlockCopyright © 2008–2016 The Netty Project. All rights reserved.