Executor, ExecutorServicepublic class ThreadPoolExecutorWithExceptions extends ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor | Description |
|---|---|
ThreadPoolExecutorWithExceptions(int threads) |
Creates a fixed size thread pool executor that will rethrow exceptions from submitted jobs.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
|
protected void |
beforeExecute(Thread t,
Runnable r) |
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitallowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, 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, toStringpublic Throwable exception
public ThreadPoolExecutorWithExceptions(int threads)
threads - The number of threads in the executor pool.protected void afterExecute(Runnable r, Throwable t)
afterExecute in class ThreadPoolExecutorprotected void beforeExecute(Thread t, Runnable r)
beforeExecute in class ThreadPoolExecutor