public class IntolerantThreadPoolExecutor extends ThreadPoolExecutor
RuntimeException. The number of
threads in the pool is fixed.ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
IntolerantThreadPoolExecutor()
Constructor for a thread pool executor that stops by itself as soon as
any thread throws an exception.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t)
Shuts the Executor down if the thread ended in an exception.
|
Throwable |
getTerminalException()
If an unrecoverable exception was thrown during processing, it can be
retrieved here.
|
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, 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, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic IntolerantThreadPoolExecutor()
protected void afterExecute(Runnable r, Throwable t)
afterExecute in class ThreadPoolExecutorr - t - public Throwable getTerminalException()
Copyright © 2019. All rights reserved.