org.terrier.utility
Class KillHandler
java.lang.Object
java.lang.Thread
org.terrier.utility.KillHandler
- All Implemented Interfaces:
- Runnable
public class KillHandler
- extends Thread
Utility class for when releasing resources when the runtime system is shutting down.
- Since:
- 3.0
Nested Class Summary |
static interface |
KillHandler.Killable
Interface denoting an object which can be killed by the KillHandler |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, 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 |
killable
protected final KillHandler.Killable killable
addKillhandler
public static void addKillhandler(KillHandler.Killable object)
- Add a Killable objects to the shutdown list which are invoked when the runtime system
is terminating.
- Parameters:
object
- the object with the kill handler
removeKillhandler
public static void removeKillhandler(KillHandler.Killable object)
- Remove a Killable objects from the shutdown list which are invoked when the runtime system
is terminating.
- Parameters:
object
- the object with the kill handler
run
public void run()
-
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Terrier 3.6. Copyright © 2004-2011 University of Glasgow