Package picard.util
Class ThreadPoolExecutorWithExceptions
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- picard.util.ThreadPoolExecutorWithExceptions
-
- All Implemented Interfaces:
Executor
,ExecutorService
public class ThreadPoolExecutorWithExceptions extends ThreadPoolExecutor
This version of the thread pool executor will throw an exception if any of the internal jobs have throw exceptions while executing
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
-
Constructor Summary
Constructors Constructor Description ThreadPoolExecutorWithExceptions(int threads)
Creates a fixed size thread pool executor that will rethrow exceptions from submitted jobs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterExecute(Runnable r, Throwable t)
protected void
beforeExecute(Thread t, Runnable r)
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, 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, toString
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
-
-
-
Field Detail
-
exception
public Throwable exception
-
-
Method Detail
-
afterExecute
protected void afterExecute(Runnable r, Throwable t)
- Overrides:
afterExecute
in classThreadPoolExecutor
-
beforeExecute
protected void beforeExecute(Thread t, Runnable r)
- Overrides:
beforeExecute
in classThreadPoolExecutor
-
-