public class CachedThreadPoolExecutor extends ThreadPoolExecutor
See SpecialExecutors.newBoundedCachedThreadPool(int, int, java.lang.String, java.lang.Class<?>)
for more details.
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
CachedThreadPoolExecutor(int maximumPoolSize,
int maximumQueueSize,
String threadPrefix)
Deprecated.
Please use
CachedThreadPoolExecutor(int, int, String, Class) instead. |
CachedThreadPoolExecutor(int maximumPoolSize,
int maximumQueueSize,
String threadPrefix,
Class<?> loggerIdentity)
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, terminated
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
public CachedThreadPoolExecutor(int maximumPoolSize, int maximumQueueSize, String threadPrefix, Class<?> loggerIdentity)
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.loggerIdentity
- the class to use as logger name for logging uncaught exceptions from the threads.@Deprecated public CachedThreadPoolExecutor(int maximumPoolSize, int maximumQueueSize, String threadPrefix)
CachedThreadPoolExecutor(int, int, String, Class)
instead.public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
setRejectedExecutionHandler
in class ThreadPoolExecutor
public RejectedExecutionHandler getRejectedExecutionHandler()
getRejectedExecutionHandler
in class ThreadPoolExecutor
public BlockingQueue<Runnable> getQueue()
getQueue
in class ThreadPoolExecutor
public long getLargestQueueSize()
protected com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
public final String toString()
toString
in class ThreadPoolExecutor
Copyright © 2019 OpenDaylight. All rights reserved.