java.util.concurrent.Executor, Container, Destroyable, Dumpable, LifeCycle, ThreadPool, ThreadPool.SizedThreadPool, TryExecutor@ManagedObject public class MonitoredQueuedThreadPool extends QueuedThreadPool
A QueuedThreadPool subclass that monitors its own activity by recording queue and task statistics.
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.ListenerThreadPool.SizedThreadPoolTryExecutor.NoTryExecutorFAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGNO_TRY| Constructor | Description |
|---|---|
MonitoredQueuedThreadPool() |
|
MonitoredQueuedThreadPool(int maxThreads) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
execute(java.lang.Runnable job) |
|
long |
getAverageQueueLatency() |
|
long |
getAverageTaskLatency() |
|
int |
getMaxBusyThreads() |
|
long |
getMaxQueueLatency() |
|
int |
getMaxQueueSize() |
|
long |
getMaxTaskLatency() |
|
long |
getTasks() |
|
void |
reset() |
Resets the statistics.
|
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdoStart, 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, tryExecuteasTryExecutorpublic MonitoredQueuedThreadPool()
public MonitoredQueuedThreadPool(int maxThreads)
public void execute(java.lang.Runnable job)
execute in interface java.util.concurrent.Executorexecute in interface TryExecutorexecute in class QueuedThreadPool@ManagedOperation(value="resets the statistics", impact="ACTION") public void reset()
@ManagedAttribute("the number of tasks executed") public long getTasks()
@ManagedAttribute("the maximum number of busy threads") public int getMaxBusyThreads()
@ManagedAttribute("the maximum task queue size") public int getMaxQueueSize()
@ManagedAttribute("the average time a task remains in the queue, in nanoseconds") public long getAverageQueueLatency()
@ManagedAttribute("the maximum time a task remains in the queue, in nanoseconds") public long getMaxQueueLatency()
@ManagedAttribute("the average task execution time, in nanoseconds") public long getAverageTaskLatency()
@ManagedAttribute("the maximum task execution time, in nanoseconds") public long getMaxTaskLatency()
Copyright © 1995–2018 Webtide. All rights reserved.