org.apache.mina.common
Class PooledThreadModel
java.lang.Object
org.apache.mina.common.PooledThreadModel
- All Implemented Interfaces:
- IoFilterChainBuilder, ThreadModel
public class PooledThreadModel
- extends Object
- implements ThreadModel
A ThreadModel
which represents a thread model with an independant
thread pool per service.
Please note that reusing an instance of this model means a thread pool
is shared among multiple services. If don't want to shared a thread pool,
please create each instance of this model whenever you bind a service or
connect to a remote service.
- Version:
- $Rev: 391213 $, $Date: 2006-04-04 11:33:55 +0900 (Tue, 04 Apr 2006) $
- Author:
- The Apache Directory Project (mina-dev@directory.apache.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAXIMUM_POOL_SIZE
public static final int DEFAULT_MAXIMUM_POOL_SIZE
- See Also:
ThreadPoolFilter.DEFAULT_MAXIMUM_POOL_SIZE
,
Constant Field Values
DEFAULT_KEEP_ALIVE_TIME
public static final int DEFAULT_KEEP_ALIVE_TIME
- See Also:
ThreadPoolFilter.DEFAULT_KEEP_ALIVE_TIME
,
Constant Field Values
PooledThreadModel
public PooledThreadModel()
PooledThreadModel
public PooledThreadModel(int maxThreads)
PooledThreadModel
public PooledThreadModel(String threadNamePrefix)
PooledThreadModel
public PooledThreadModel(String threadNamePrefix,
int maxThreads)
getThreadNamePrefix
public String getThreadNamePrefix()
setThreadNamePrefix
public void setThreadNamePrefix(String threadNamePrefix)
getMaximumPoolSize
public int getMaximumPoolSize()
getKeepAliveTime
public int getKeepAliveTime()
setMaximumPoolSize
public void setMaximumPoolSize(int maximumPoolSize)
setKeepAliveTime
public void setKeepAliveTime(int keepAliveTime)
buildFilterChain
public void buildFilterChain(IoFilterChain chain)
throws Exception
- Description copied from interface:
IoFilterChainBuilder
- Modifies the specified chain.
- Specified by:
buildFilterChain
in interface IoFilterChainBuilder
- Throws:
Exception