Package com.yahoo.jdisc.application
Class ContainerThread
java.lang.Object
java.lang.Thread
com.yahoo.jdisc.application.ContainerThread
- All Implemented Interfaces:
Runnable
This class decorates Thread
to allow for internal jDISC optimizations. Whenever possible a jDISC
application should use this class instead of Thread. The ContainerThread.Factory
class is a helper-class for
working with the Executors
framework.
- Author:
- Simon Thoresen Hult
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
This class implements theThreadFactory
interface on top of aProvider
forMetricConsumer
instances.Nested 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
ConstructorDescriptionContainerThread
(Runnable target, MetricConsumer consumer) Allocates a new ContainerThread object. -
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
ContainerThread
Allocates a new ContainerThread object. This constructor calls the parentThread(Runnable)
constructor.- Parameters:
target
- the object whoserun
method is called.consumer
- the MetricConsumer of this thread.
-
-
Method Details
-
consumer
Returns the
MetricConsumer
of this. Note that this may be null.- Returns:
- The MetricConsumer of this, or null.
-