org.apache.avalon.excalibur.pool
Class DefaultPoolController

java.lang.Object
  extended byorg.apache.avalon.excalibur.pool.DefaultPoolController
All Implemented Interfaces:
PoolController

public class DefaultPoolController
extends java.lang.Object
implements PoolController

This is a PoolController that controls how many instances of a Poolable are created at one time.

Since:
4.0
Version:
CVS $Revision: 1.5 $ $Date: 2004/03/29 16:50:37 $
Author:
Avalon Development Team

Constructor Summary
DefaultPoolController()
           
DefaultPoolController(int amount)
           
 
Method Summary
 int grow()
          Called when a Pool reaches it's minimum.
 int shrink()
          Called when a pool reaches it's maximum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPoolController

public DefaultPoolController()

DefaultPoolController

public DefaultPoolController(int amount)
Method Detail

grow

public int grow()
Description copied from interface: PoolController
Called when a Pool reaches it's minimum. Return the number of elements to increase minimum and maximum by.

Specified by:
grow in interface PoolController
Returns:
the element increase

shrink

public int shrink()
Description copied from interface: PoolController
Called when a pool reaches it's maximum. Returns the number of elements to decrease mi and max by.

Specified by:
shrink in interface PoolController
Returns:
the element decrease


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.