public class CachedThreadPoolExecutor extends ThreadPoolExecutor
See SpecialExecutors.newBoundedCachedThreadPool(int, int, java.lang.String) for more details.
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
CachedThreadPoolExecutor(int maximumPoolSize,
int maximumQueueSize,
String threadPrefix)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.google.common.base.MoreObjects.ToStringHelper |
addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper) |
long |
getLargestQueueSize() |
BlockingQueue<Runnable> |
getQueue() |
RejectedExecutionHandler |
getRejectedExecutionHandler() |
void |
setRejectedExecutionHandler(RejectedExecutionHandler handler) |
String |
toString() |
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setThreadFactory, shutdown, shutdownNow, terminatedinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic CachedThreadPoolExecutor(int maximumPoolSize,
int maximumQueueSize,
String threadPrefix)
maximumPoolSize - the maximum number of threads to allow in the pool. Threads will terminate after
being idle for 60 seconds.maximumQueueSize - the capacity of the queue.threadPrefix - the name prefix for threads created by this executor.public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
setRejectedExecutionHandler in class ThreadPoolExecutorpublic RejectedExecutionHandler getRejectedExecutionHandler()
getRejectedExecutionHandler in class ThreadPoolExecutorpublic BlockingQueue<Runnable> getQueue()
getQueue in class ThreadPoolExecutorpublic long getLargestQueueSize()
protected com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
public final String toString()
toString in class ThreadPoolExecutorCopyright © 2018 OpenDaylight. All rights reserved.