public class ShutdownStreamOnUnhandleThrowableThreadPoolExecutor extends ThreadPoolExecutor
ThreadPoolExecutorThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
ShutdownStreamOnUnhandleThrowableThreadPoolExecutor(int numThreads,
LocalStreamBuilder streamBuilder)
Creates a fixed size thread pool where corePoolSize & maximumPoolSize equal numThreads with an unbounded queue.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
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 ShutdownStreamOnUnhandleThrowableThreadPoolExecutor(int numThreads,
LocalStreamBuilder streamBuilder)
numThreads - number of threads in poolstreamBuilder - streambuilder to call StreamBuilder.stop() on upon receiving an unhandled throwableprotected void afterExecute(Runnable r, Throwable t)
afterExecute in class ThreadPoolExecutorCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.