|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.terrier.utility.KillHandler
public class KillHandler
Utility class for when releasing resources when the runtime system is shutting down.
Nested Class Summary | |
---|---|
static interface |
KillHandler.Killable
Interface denoting an object which can be killed by the KillHandler |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected KillHandler.Killable |
killable
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
---|---|
static void |
addKillhandler(KillHandler.Killable object)
Add a Killable objects to the shutdown list which are invoked when the runtime system is terminating. |
static void |
removeKillhandler(KillHandler.Killable object)
Remove a Killable objects from the shutdown list which are invoked when the runtime system is terminating. |
void |
run()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final KillHandler.Killable killable
Method Detail |
---|
public static void addKillhandler(KillHandler.Killable object)
object
- the object with the kill handlerpublic static void removeKillhandler(KillHandler.Killable object)
object
- the object with the kill handlerpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |