@ManagedObject public class MonitoredQueuedThreadPool extends QueuedThreadPool
A QueuedThreadPool subclass that monitors its own activity by recording queue and task statistics.
AbstractLifeCycle.AbstractLifeCycleListenerThreadPool.SizedThreadPoolTryExecutor.NoTryExecutorContainer.InheritedListener, Container.ListenerLifeCycle.ListenerFAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGNO_TRY| Constructor and Description |
|---|
MonitoredQueuedThreadPool() |
MonitoredQueuedThreadPool(int maxThreads) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Runnable job) |
long |
getAverageQueueLatency() |
long |
getAverageTaskLatency() |
int |
getMaxBusyThreads() |
long |
getMaxQueueLatency() |
int |
getMaxQueueSize() |
long |
getMaxTaskLatency() |
long |
getTasks() |
void |
reset()
Resets the statistics.
|
doStart, doStop, dump, dumpThread, 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, toString, tryExecuteaddBean, 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, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdump, dump, dumpObject, dumpObjectsasTryExecutorpublic MonitoredQueuedThreadPool()
public MonitoredQueuedThreadPool(int maxThreads)
public void execute(Runnable job)
execute in interface Executorexecute in interface TryExecutorexecute in class QueuedThreadPool@ManagedOperation(value="resets the statistics", impact="ACTION") public void reset()
@ManagedAttribute(value="the number of tasks executed") public long getTasks()
@ManagedAttribute(value="the maximum number of busy threads") public int getMaxBusyThreads()
@ManagedAttribute(value="the maximum task queue size") public int getMaxQueueSize()
@ManagedAttribute(value="the average time a task remains in the queue, in nanoseconds") public long getAverageQueueLatency()
@ManagedAttribute(value="the maximum time a task remains in the queue, in nanoseconds") public long getMaxQueueLatency()
@ManagedAttribute(value="the average task execution time, in nanoseconds") public long getAverageTaskLatency()
@ManagedAttribute(value="the maximum task execution time, in nanoseconds") public long getMaxTaskLatency()
Copyright © 1995–2018 Webtide. All rights reserved.