public class ContainerThread extends Thread
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.
Modifier and Type | Class and Description |
---|---|
static class |
ContainerThread.Factory
This class implements the
ThreadFactory interface on top of a Provider for MetricConsumer instances. |
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
private MetricConsumer |
consumer |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
ContainerThread(Runnable target,
MetricConsumer consumer)
Allocates a new ContainerThread object.
|
Modifier and Type | Method and Description |
---|---|
MetricConsumer |
consumer()
Returns the
MetricConsumer of this. |
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
private final MetricConsumer consumer
public ContainerThread(Runnable target, MetricConsumer consumer)
Thread.Thread(Runnable)
constructor.target
- the object whose run
method is called.consumer
- the MetricConsumer of this thread.public MetricConsumer consumer()
Returns the MetricConsumer
of this. Note that this may be null.
Copyright © 2018. All rights reserved.