Executor
, ExecutorService
public class MonitoringThreadPoolExecutor extends ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor | Description |
---|---|
MonitoringThreadPoolExecutor(int maximumPoolSize,
long keepAliveTime,
TimeUnit unit) |
|
MonitoringThreadPoolExecutor(int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
RejectedExecutionHandler handler) |
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() |
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
public MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, TimeUnit unit)
public MonitoringThreadPoolExecutor(int maximumPoolSize, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler handler)
public void reset()
public long getTasks()
public long getMaxTaskLatency()
public long getAverageTaskLatency()
public long getMaxQueueLatency()
public long getAverageQueueLatency()
public int getMaxQueueSize()
public int getMaxActiveThreads()
public void execute(Runnable task)
execute
in interface Executor
execute
in class ThreadPoolExecutor
Copyright © 2008–2017 The CometD Project. All rights reserved.