public final class BlockingThreadPoolExecutor extends ThreadPoolExecutor
ThreadPoolExecutor which has a limited number of outstanding permits for executing tasks and when there
are no more permits left, new tasks will block waiting for a permit to free up instead of throwing
an exception.
| Modifier and Type | Class and Description |
|---|---|
static interface |
BlockingThreadPoolExecutor.ExceptionHandler |
static class |
BlockingThreadPoolExecutor.SilentExceptionHandler |
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
BlockingThreadPoolExecutor(int theCorePoolSize,
int theMaxPoolSize,
long theKeepAliveTime,
TimeUnit theTimeUnit,
BlockingQueue<Runnable> theWorkQueue,
int theBoundedSize) |
BlockingThreadPoolExecutor(int theCorePoolSize,
int theMaxPoolSize,
long theKeepAliveTime,
TimeUnit theTimeUnit,
BlockingQueue<Runnable> theWorkQueue,
RejectedExecutionHandler theRejectedExecutionHandler,
int theBoundedSize) |
BlockingThreadPoolExecutor(int theCorePoolSize,
int theMaxPoolSize,
long theKeepAliveTime,
TimeUnit theTimeUnit,
BlockingQueue<Runnable> theWorkQueue,
ThreadFactory theThreadFactory,
int theBoundedSize) |
BlockingThreadPoolExecutor(int theCorePoolSize,
int theMaxPoolSize,
long theKeepAliveTime,
TimeUnit theTimeUnit,
BlockingQueue<Runnable> theWorkQueue,
ThreadFactory theThreadFactory,
RejectedExecutionHandler theRejectedExecutionHandler,
int theBoundedSize) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable theRunnable,
Throwable theThrowable) |
void |
execute(Runnable task) |
void |
setExceptionHandler(BlockingThreadPoolExecutor.ExceptionHandler theExceptionHandler) |
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 BlockingThreadPoolExecutor(int theCorePoolSize,
int theMaxPoolSize,
long theKeepAliveTime,
TimeUnit theTimeUnit,
BlockingQueue<Runnable> theWorkQueue,
int theBoundedSize)
public BlockingThreadPoolExecutor(int theCorePoolSize,
int theMaxPoolSize,
long theKeepAliveTime,
TimeUnit theTimeUnit,
BlockingQueue<Runnable> theWorkQueue,
ThreadFactory theThreadFactory,
int theBoundedSize)
public BlockingThreadPoolExecutor(int theCorePoolSize,
int theMaxPoolSize,
long theKeepAliveTime,
TimeUnit theTimeUnit,
BlockingQueue<Runnable> theWorkQueue,
RejectedExecutionHandler theRejectedExecutionHandler,
int theBoundedSize)
public BlockingThreadPoolExecutor(int theCorePoolSize,
int theMaxPoolSize,
long theKeepAliveTime,
TimeUnit theTimeUnit,
BlockingQueue<Runnable> theWorkQueue,
ThreadFactory theThreadFactory,
RejectedExecutionHandler theRejectedExecutionHandler,
int theBoundedSize)
public void setExceptionHandler(BlockingThreadPoolExecutor.ExceptionHandler theExceptionHandler)
public void execute(Runnable task)
execute in interface Executorexecute in class ThreadPoolExecutorprotected void afterExecute(Runnable theRunnable, Throwable theThrowable)
afterExecute in class ThreadPoolExecutorCopyright © 2010-2016 Stardog Union. All Rights Reserved.