Package org.cometd.benchmark
Class MonitoringThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.cometd.benchmark.MonitoringThreadPoolExecutor
- All Implemented Interfaces:
AutoCloseable
,Executor
,ExecutorService
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
Constructor Summary
ConstructorDescriptionMonitoringThreadPoolExecutor
(int maximumPoolSize, long keepAliveTime, TimeUnit unit) MonitoringThreadPoolExecutor
(int maximumPoolSize, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler handler) -
Method Summary
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.ExecutorService
close
-
Constructor Details
-
MonitoringThreadPoolExecutor
-
MonitoringThreadPoolExecutor
public MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler handler)
-
-
Method Details
-
reset
public void reset() -
getTasks
public long getTasks() -
getMaxTaskLatency
public long getMaxTaskLatency() -
getAverageTaskLatency
public long getAverageTaskLatency() -
getMaxQueueLatency
public long getMaxQueueLatency() -
getAverageQueueLatency
public long getAverageQueueLatency() -
getMaxQueueSize
public int getMaxQueueSize() -
getMaxActiveThreads
public int getMaxActiveThreads() -
execute
- Specified by:
execute
in interfaceExecutor
- Overrides:
execute
in classThreadPoolExecutor
-