public class ShutDownTracker
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Method and Description |
---|---|
void |
ensureStopperThreadsFinished() |
static ShutDownTracker |
getInstance() |
static boolean |
isShutdownHookRunning() |
void |
registerShutdownTask(java.lang.Runnable task) |
void |
registerStopperThread(java.lang.Thread thread) |
void |
run() |
void |
unregisterShutdownTask(java.lang.Runnable task) |
void |
unregisterStopperThread(java.lang.Thread thread) |
boolean |
waitFor(long timeout,
java.util.concurrent.TimeUnit unit) |
public static ShutDownTracker getInstance()
public static boolean isShutdownHookRunning()
public void run()
run
in interface java.lang.Runnable
public boolean waitFor(long timeout, java.util.concurrent.TimeUnit unit)
public final void ensureStopperThreadsFinished()
public void registerStopperThread(java.lang.Thread thread)
public void unregisterStopperThread(java.lang.Thread thread)
public void registerShutdownTask(java.lang.Runnable task)
public void unregisterShutdownTask(java.lang.Runnable task)