org.apache.mina.util
Interface ThreadPool

All Known Implementing Classes:
BaseThreadPool, IoThreadPoolFilter, ProtocolThreadPoolFilter

public interface ThreadPool

A generic thread pool interface.

Version:
$Rev: 332218 $, $Date: 2005-11-10 12:52:42 +0900 $
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

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


getMaximumPoolSize

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


getKeepAliveTime

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


setMaximumPoolSize

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


setKeepAliveTime

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


start

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


stop

void stop()
Stops all thread pool threads.



Copyright © 2004-2005 . All Rights Reserved.