public class ThreadPoolExecutorEx extends ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
ThreadPoolExecutorEx(int coreThreads,
int maxThreads,
int maxIdleInSecond,
TimeUnit timeUnit,
BlockingQueue<Runnable> queue) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
void |
execute(Runnable command) |
int |
getNotFinished() |
int |
getRejectedCount() |
void |
rejectedExecution(Runnable r,
ThreadPoolExecutor e) |
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, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic ThreadPoolExecutorEx(int coreThreads,
int maxThreads,
int maxIdleInSecond,
TimeUnit timeUnit,
BlockingQueue<Runnable> queue)
public void execute(Runnable command)
execute in interface Executorexecute in class ThreadPoolExecutorpublic void rejectedExecution(Runnable r, ThreadPoolExecutor e)
protected void afterExecute(Runnable r, Throwable t)
afterExecute in class ThreadPoolExecutorpublic int getNotFinished()
public int getRejectedCount()
Copyright © 2017–2019 The Apache Software Foundation. All rights reserved.