|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.intermine.util.ShutdownHook
public final class ShutdownHook
This class provides a "shutdown" service to other classes. It sets up a single shutdown hook, which iterates through a series of objects that are registered with it, shutting them down in turn. This class currently supports java.io.Writer, java.io.OutputStream, and ObjectStoreWriterInterMineImpl. It allows objects to be wrapped in a WeakReference, so that the shutdown hook does not preclude those objects from being garbage collected. The objects are shut down in the opposite order to them being added to this ShutdownHook. Therefore, if you register objects to be shut down from the constructor, no object will be shut down before another object that relies on it for its own shutdown.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Method Summary | |
|---|---|
static void |
registerObject(java.lang.Object object)
Registers an object with the shutdown hook. |
void |
run()
|
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static void registerObject(java.lang.Object object)
object - the objectpublic void run()
run in interface java.lang.Runnablerun in class java.lang.ThreadThread.run()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||