org.apache.mina.util
Interface ThreadPool

All Known Implementing Classes:
BaseThreadPool, IoThreadPoolFilter, ProtocolThreadPoolFilter

public interface ThreadPool

A generic thread pool interface.

Version:
$Rev: 326586 $, $Date: 2005-10-19 17:50:29 +0200 (Wed, 19 Oct 2005) $
Author:
The Apache Directory Project (dev@directory.apache.org)

Method Summary
 int getKeepAliveTime()
          Returns the keep-alive time until the thread suicides after it became idle (milliseconds unit).
 int getMaximumPoolSize()
          Returns the maximum size of the thread pool.
 int getPoolSize()
          Returns the number of threads in the thread pool.
 void setKeepAliveTime(int keepAliveTime)
          Sets the keep-alive time until the thread suicides after it became idle (milliseconds unit).
 void setMaximumPoolSize(int maximumPoolSize)
          Sets the maximum size of the thread pool.
 void start()
          Starts thread pool threads and starts forwarding events to them.
 void stop()
          Stops all thread pool threads.
 

Method Detail

getPoolSize

public int getPoolSize()
Returns the number of threads in the thread pool.


getMaximumPoolSize

public int getMaximumPoolSize()
Returns the maximum size of the thread pool.


getKeepAliveTime

public int getKeepAliveTime()
Returns the keep-alive time until the thread suicides after it became idle (milliseconds unit).


setMaximumPoolSize

public void setMaximumPoolSize(int maximumPoolSize)
Sets the maximum size of the thread pool.


setKeepAliveTime

public void setKeepAliveTime(int keepAliveTime)
Sets the keep-alive time until the thread suicides after it became idle (milliseconds unit).


start

public void start()
Starts thread pool threads and starts forwarding events to them.


stop

public void stop()
Stops all thread pool threads.