public final class ShutdownThreadsHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.concurrent.atomic.AtomicBoolean |
APPLICATION_RUNNING |
static java.lang.Long |
WAIT |
| Constructor and Description |
|---|
ShutdownThreadsHandler() |
| Modifier and Type | Method and Description |
|---|---|
static <E extends java.util.concurrent.ExecutorService> |
registerExecutor(E t)
Register an Executor service.
|
static <T extends java.lang.Thread> |
registerThread(T t)
Register a Thread.
|
static void |
shutdowAll()
Shutdown registered Threads and Executors.
|
static void |
shutDownExecutors()
Shutdown all registered Executors.
|
static void |
shutdownThreads()
Shutdown all registered Threads.
|
static <T extends java.lang.Thread> |
unRegisterThread(T t)
unregister a Thread.
|
public static final java.util.concurrent.atomic.AtomicBoolean APPLICATION_RUNNING
public static final java.lang.Long WAIT
public static <T extends java.lang.Thread> void registerThread(T t)
T - the type of the object extending the threadt - the Thread to registerpublic static <T extends java.lang.Thread> void unRegisterThread(T t)
T - the type of the object extending the threadt - the Thread to unregisterpublic static <E extends java.util.concurrent.ExecutorService> void registerExecutor(E t)
E - the concrete type of the ExecutorServicet - the ExecutorService to registerpublic static void shutdownThreads()
public static void shutDownExecutors()
public static void shutdowAll()