Package com.google.code.yanf4j.core.impl
Class PoolDispatcher
- java.lang.Object
-
- com.google.code.yanf4j.core.impl.PoolDispatcher
-
- All Implemented Interfaces:
Dispatcher
public class PoolDispatcher extends Object implements Dispatcher
Pool dispatcher,wrap a threadpool.- Author:
- dennis
-
-
Field Summary
Fields Modifier and Type Field Description static floatDEFAULT_MAX_POOL_SIZE_FACTORstatic intDEFAULT_POOL_QUEUE_SIZE_FACTOR
-
Constructor Summary
Constructors Constructor Description PoolDispatcher(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)
-
-
-
Field Detail
-
DEFAULT_POOL_QUEUE_SIZE_FACTOR
public static final int DEFAULT_POOL_QUEUE_SIZE_FACTOR
- See Also:
- Constant Field Values
-
DEFAULT_MAX_POOL_SIZE_FACTOR
public static final float DEFAULT_MAX_POOL_SIZE_FACTOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
dispatch
public final void dispatch(Runnable r)
- Specified by:
dispatchin interfaceDispatcher
-
stop
public void stop()
- Specified by:
stopin interfaceDispatcher
-
-