org.jacorb.poa
Class RPPoolManager

java.lang.Object
  extended byorg.jacorb.poa.RPPoolManager

public class RPPoolManager
extends java.lang.Object

This class provides and manages a pool of ready started threads for request processing.

Version:
1.04, 10/26/99, RT
Author:
Gerald Brose, Reimo Tiedemann, FU Berlin
See Also:
RequestProcessor

Constructor Summary
protected RPPoolManager(Current _current, int min, int max, org.apache.avalon.framework.logger.Logger _logger, org.apache.avalon.framework.configuration.Configuration _configuration)
           
 
Method Summary
protected  void addRPPoolManagerListener(RPPoolManagerListener listener)
           
protected  void destroy()
           
protected  int getPoolCount()
          returns the number of unused processors contained in the pool
protected  int getPoolSize()
          returns the size of the processor pool (used and unused processors)
protected  RequestProcessor getProcessor()
          returns a processor from pool, the first call causes the initialization of the processor pool, if no processor available the number of processors will increased until the max_pool_size is reached, this method blocks if no processor available and the max_pool_size is reached until a processor will released
protected  void releaseProcessor(RequestProcessor rp)
          gives a processor back into the pool if the number of available processors is smaller than min_pool_size, otherwise the processor will terminated
protected  void removeRPPoolManagerListener(RPPoolManagerListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPPoolManager

protected RPPoolManager(Current _current,
                        int min,
                        int max,
                        org.apache.avalon.framework.logger.Logger _logger,
                        org.apache.avalon.framework.configuration.Configuration _configuration)
Method Detail

addRPPoolManagerListener

protected void addRPPoolManagerListener(RPPoolManagerListener listener)

destroy

protected void destroy()

getPoolCount

protected int getPoolCount()
returns the number of unused processors contained in the pool


getPoolSize

protected int getPoolSize()
returns the size of the processor pool (used and unused processors)


getProcessor

protected RequestProcessor getProcessor()
returns a processor from pool, the first call causes the initialization of the processor pool, if no processor available the number of processors will increased until the max_pool_size is reached, this method blocks if no processor available and the max_pool_size is reached until a processor will released


releaseProcessor

protected void releaseProcessor(RequestProcessor rp)
gives a processor back into the pool if the number of available processors is smaller than min_pool_size, otherwise the processor will terminated


removeRPPoolManagerListener

protected void removeRPPoolManagerListener(RPPoolManagerListener listener)