Package org.cometd.benchmark
Class MonitoringThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.cometd.benchmark.MonitoringThreadPoolExecutor
- All Implemented Interfaces:
Executor
,ExecutorService
public class MonitoringThreadPoolExecutor extends ThreadPoolExecutor
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
Constructor Summary
Constructors Constructor Description MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, TimeUnit unit)
MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler handler)
-
Method Summary
Modifier and Type Method Description void
execute(Runnable task)
long
getAverageQueueLatency()
long
getAverageTaskLatency()
int
getMaxActiveThreads()
long
getMaxQueueLatency()
int
getMaxQueueSize()
long
getMaxTaskLatency()
long
getTasks()
void
reset()
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
-
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
-