public class MonitoredThreadPool extends ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| 构造器和说明 |
|---|
MonitoredThreadPool(String name,
ThreadPoolExecutor executor)
构造一个新的被监控的线程池。
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getLastUpdateTimeMills()
获取最后一次参数更新时间
|
String |
getName()
获取线程池名称
|
ThreadPoolExecutor |
getOriginalExecutor()
获取原始的线程池执行器
|
long |
getRejectedCount()
获取被拒绝的任务总数
|
void |
setLastUpdateTimeMills(long lastUpdateTimeMills)
设置最后一次参数更新时间
|
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, 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, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic MonitoredThreadPool(String name, ThreadPoolExecutor executor)
name - 线程池名称executor - 原始线程池执行器public ThreadPoolExecutor getOriginalExecutor()
public long getRejectedCount()
public long getLastUpdateTimeMills()
public void setLastUpdateTimeMills(long lastUpdateTimeMills)
lastUpdateTimeMills - 最后一次参数更新时间public String getName()
Copyright © 2025. All rights reserved.