public class InstrumentedQueuedThreadPool
extends org.eclipse.jetty.util.thread.QueuedThreadPool
QueuedThreadPool
that binds metrics about the Jetty server thread pool.
This can be passed when constructing a Jetty server. For example:
Server server = new Server(new InstrumentedQueuedThreadPool(registry, Tags.empty()));
// ...
JettyServerThreadPoolMetrics
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
org.eclipse.jetty.util.thread.ThreadPool.SizedThreadPool
org.eclipse.jetty.util.thread.TryExecutor.NoTryExecutor
Constructor and Description |
---|
InstrumentedQueuedThreadPool(MeterRegistry registry,
java.lang.Iterable<Tag> tags)
Default values for the instrumented thread pool.
|
InstrumentedQueuedThreadPool(MeterRegistry registry,
java.lang.Iterable<Tag> tags,
int maxThreads)
Instrumented thread pool.
|
InstrumentedQueuedThreadPool(MeterRegistry registry,
java.lang.Iterable<Tag> tags,
int maxThreads,
int minThreads)
Instrumented thread pool.
|
InstrumentedQueuedThreadPool(MeterRegistry registry,
java.lang.Iterable<Tag> tags,
int maxThreads,
int minThreads,
int idleTimeout)
Instrumented thread pool.
|
InstrumentedQueuedThreadPool(MeterRegistry registry,
java.lang.Iterable<Tag> tags,
int maxThreads,
int minThreads,
int idleTimeout,
java.util.concurrent.BlockingQueue<java.lang.Runnable> queue)
Instrumented thread pool.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
doStop, dump, dumpThread, execute, getBusyThreads, getIdleThreads, getIdleTimeout, getLowThreadsThreshold, getMaxThreads, getMinThreads, getName, getQueue, getQueueSize, getReservedThreads, getThreadPoolBudget, getThreads, getThreadsPriority, interruptThread, isDaemon, isDetailedDump, isLowOnThreads, join, newThread, removeThread, runJob, setDaemon, setDetailedDump, setIdleTimeout, setLowThreadsThreshold, setMaxThreads, setMinThreads, setName, setQueue, setReservedThreads, setThreadPoolBudget, setThreadsPriority, startThread, toString, tryExecute
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public InstrumentedQueuedThreadPool(MeterRegistry registry, java.lang.Iterable<Tag> tags)
registry
- where metrics will be boundtags
- tags to apply to metrics bound from thispublic InstrumentedQueuedThreadPool(MeterRegistry registry, java.lang.Iterable<Tag> tags, int maxThreads)
registry
- where metrics will be boundtags
- tags to apply to metrics bound from thismaxThreads
- maximum threads for the thread poolpublic InstrumentedQueuedThreadPool(MeterRegistry registry, java.lang.Iterable<Tag> tags, int maxThreads, int minThreads)
registry
- where metrics will be boundtags
- tags to apply to metrics bound from thismaxThreads
- maximum threads for the thread poolminThreads
- minimum threads for the thread poolpublic InstrumentedQueuedThreadPool(MeterRegistry registry, java.lang.Iterable<Tag> tags, int maxThreads, int minThreads, int idleTimeout)
registry
- where metrics will be boundtags
- tags to apply to metrics bound from thismaxThreads
- maximum threads for the thread poolminThreads
- minimum threads for the thread poolidleTimeout
- timeout for idle threads in poolpublic InstrumentedQueuedThreadPool(MeterRegistry registry, java.lang.Iterable<Tag> tags, int maxThreads, int minThreads, int idleTimeout, java.util.concurrent.BlockingQueue<java.lang.Runnable> queue)
registry
- where metrics will be boundtags
- tags to apply to metrics bound from thismaxThreads
- maximum threads for the thread poolminThreads
- minimum threads for the thread poolidleTimeout
- timeout for idle threads in poolqueue
- backing queue for thread pool tasks