public class OpenFinThreadPool extends ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
OpenFinThreadPool(String name,
int nThreads)
Creates a fixed size thread pool.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable task,
Throwable t) |
protected void |
beforeExecute(Thread thread,
Runnable task) |
void |
execute(Runnable task) |
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, 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 OpenFinThreadPool(String name, int nThreads)
name - name of the thread poolnThreads - number of threads in the pool.public void execute(Runnable task)
execute in interface Executorexecute in class ThreadPoolExecutorprotected void beforeExecute(Thread thread, Runnable task)
beforeExecute in class ThreadPoolExecutorprotected void afterExecute(Runnable task, Throwable t)
afterExecute in class ThreadPoolExecutorCopyright © 2022. All rights reserved.