Package org.cometd.benchmark
Class MonitoringThreadPoolExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- org.cometd.benchmark.MonitoringThreadPoolExecutor
-
- All Implemented Interfaces:
java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
public class MonitoringThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
-
-
Constructor Summary
Constructors Constructor Description MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit)
MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.RejectedExecutionHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(java.lang.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
-
-
-
-
Constructor Detail
-
MonitoringThreadPoolExecutor
public MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit)
-
MonitoringThreadPoolExecutor
public MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.RejectedExecutionHandler handler)
-
-
Method Detail
-
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
public void execute(java.lang.Runnable task)
- Specified by:
execute
in interfacejava.util.concurrent.Executor
- Overrides:
execute
in classjava.util.concurrent.ThreadPoolExecutor
-
-