Package com.google.code.yanf4j.core.impl
Class PoolDispatcher
java.lang.Object
com.google.code.yanf4j.core.impl.PoolDispatcher
- All Implemented Interfaces:
Dispatcher
Pool dispatcher,wrap a threadpool.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPoolDispatcher(int poolSize) PoolDispatcher(int poolSize, int poolQueueSizeFactor, float maxPoolSizeFactor, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler rejectedExecutionHandler, String prefix) PoolDispatcher(int poolSize, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler rejectedExecutionHandler, String prefix) -
Method Summary
-
Field Details
-
DEFAULT_POOL_QUEUE_SIZE_FACTOR
public static final int DEFAULT_POOL_QUEUE_SIZE_FACTOR- See Also:
-
DEFAULT_MAX_POOL_SIZE_FACTOR
public static final float DEFAULT_MAX_POOL_SIZE_FACTOR- See Also:
-
threadPool
-
-
Constructor Details
-
PoolDispatcher
public PoolDispatcher(int poolSize) -
PoolDispatcher
public PoolDispatcher(int poolSize, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler rejectedExecutionHandler, String prefix) -
PoolDispatcher
public PoolDispatcher(int poolSize, int poolQueueSizeFactor, float maxPoolSizeFactor, long keepAliveTime, TimeUnit unit, RejectedExecutionHandler rejectedExecutionHandler, String prefix)
-
-
Method Details
-
dispatch
- Specified by:
dispatchin interfaceDispatcher
-
stop
public void stop()- Specified by:
stopin interfaceDispatcher
-