com.cafesoft.core.pool
Interface ObjectPoolFactory


public interface ObjectPoolFactory

The ObjectPoolFactory defines an interface to create ObjectPool objects.

The implementing class should be aware of the corresponding PoolableObjectFactory without it no objects can be created. In addition, a recommendation for the implementing class would be to treat it as a singleton and to provide a static ObjectPoolFactory getInstance() method.

Since:
10/19/01

Method Summary
 ObjectPool createPool()
          Create an ObjectPool
 ObjectPool createPool(int minimum)
          Create an ObjectPool
 ObjectPool createPool(int minimum, int maximum)
          Create an ObjectPool
 ObjectPool createPool(int minimum, int maximum, long expiration)
          Create an ObjectPool
 

Method Detail

createPool

public ObjectPool createPool()
                      throws Exception
Create an ObjectPool

Returns:
a newly created ObjectPool
Throws:
Exception - thrown if an error occured while trying to create the ObjectPool

createPool

public ObjectPool createPool(int minimum)
                      throws Exception
Create an ObjectPool

Parameters:
minimum - The minimum number of objects that the pool must maintain
Returns:
a newly created ObjectPool
Throws:
Exception - thrown if an error occured while trying to create the ObjectPool

createPool

public ObjectPool createPool(int minimum,
                             int maximum)
                      throws Exception
Create an ObjectPool

Parameters:
minimum - The minimum number of objects that the pool must maintain
maximum - The maximum number of objects that the pool can have
Returns:
a newly created ObjectPool
Throws:
Exception - thrown if an error occured while trying to create the ObjectPool

createPool

public ObjectPool createPool(int minimum,
                             int maximum,
                             long expiration)
                      throws Exception
Create an ObjectPool

Parameters:
minimum - The minimum number of objects that the pool must maintain
maximum - The maximum number of objects that the pool can have
expiration - The expiration time at which idle objects will begin to expire
Returns:
a newly created ObjectPool
Throws:
Exception - thrown if an error occured while trying to create the ObjectPool


Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.