Package org.apache.hadoop.util
Class Daemon
java.lang.Object
java.lang.Thread
org.apache.hadoop.util.Daemon
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
Daemon.DaemonFactory
A thread that has called
Thread.setDaemon(boolean) with true.
The runnable code must either be specified in the runnable parameter or in the overridden work() method.
See SubjectInheritingThread for the Subject inheritance behavior this
class adds.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classProvide a factory for named daemon threads, for use in ExecutorServices constructorsNested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, suspend, toString, yield
-
Constructor Details
-
Daemon
public Daemon()Construct a daemon thread. -
Daemon
Construct a daemon thread.- Parameters:
runnable- runnable.
-
Daemon
Construct a daemon thread to be part of a specified thread group.- Parameters:
group- thread group.runnable- runnable.
-
-
Method Details