org.jacorb.poa

Class RPPoolManager

public abstract class RPPoolManager extends Object

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

Version: $Id: RPPoolManager.java,v 1.22 2006/07/07 12:09:50 alphonse.bendt Exp $

Author: Gerald Brose Reimo Tiedemann

See Also: RequestProcessor

Constructor Summary
protected RPPoolManager(Current _current, int min, int max, Logger _logger, Configuration _configuration)
Method Summary
protected voidaddRPPoolManagerListener(RPPoolManagerListener listener)
protected voiddestroy(boolean really)
shutdown this poolManager. clients should invoke destroy instead.
protected intgetPoolCount()
returns the number of unused processors contained in the pool
protected intgetPoolSize()
returns the size of the processor pool (used and unused processors)
protected RequestProcessorgetProcessor()
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 voidreleaseProcessor(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 terminate
protected voidremoveRPPoolManagerListener(RPPoolManagerListener listener)
protected voidwarnPoolIsEmpty()

Constructor Detail

RPPoolManager

protected RPPoolManager(Current _current, int min, int max, Logger _logger, Configuration _configuration)

Method Detail

addRPPoolManagerListener

protected void addRPPoolManagerListener(RPPoolManagerListener listener)

destroy

protected void destroy(boolean really)
shutdown this poolManager. clients should invoke destroy instead.

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 terminate

removeRPPoolManagerListener

protected void removeRPPoolManagerListener(RPPoolManagerListener listener)

warnPoolIsEmpty

protected void warnPoolIsEmpty()