Package com.tailf.dp
Class DpWorkerThreadPool
Object
AbstractExecutorService
ThreadPoolExecutor
com.tailf.dp.DpWorkerThreadPool
- All Implemented Interfaces:
Executor
,ExecutorService
Dp Thread pool of worker thread. These threads are assigned an worker socket
and reads requests from these sockets.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
Constructor Summary
ConstructorDescriptionDpWorkerThreadPool
(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) Constructor for Thread pool. -
Method Summary
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, execute, 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, toString
-
Constructor Details
-
DpWorkerThreadPool
public DpWorkerThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) Constructor for Thread pool.- Parameters:
corePoolSize
- - initial number of threads in the poolmaximumPoolSize
- - maximal number of threads in the poolkeepAliveTime
- - time in TimeUnit to wait for work, if over corePoolSizeunit
- - The TimeUnit for keepAliveTimeworkQueue
- - queue for work waiting to process
-