org.apache.commons.pool.impl
Class StackObjectPoolFactory

java.lang.Object
  extended by org.apache.commons.pool.impl.StackObjectPoolFactory
All Implemented Interfaces:
ObjectPoolFactory

public class StackObjectPoolFactory
extends Object
implements ObjectPoolFactory

A factory for creating StackObjectPool instances.

Since:
Pool 1.0
Version:
$Revision: 777748 $ $Date: 2009-05-22 20:00:44 -0400 (Fri, 22 May 2009) $
Author:
Rodney Waldhoff
See Also:
StackObjectPool, StackKeyedObjectPoolFactory

Field Summary
protected  PoolableObjectFactory _factory
           
protected  int _initCapacity
           
protected  int _maxSleeping
           
 
Constructor Summary
StackObjectPoolFactory()
          Create a new StackObjectPoolFactory.
StackObjectPoolFactory(int maxIdle)
          Create a new StackObjectPoolFactory.
StackObjectPoolFactory(int maxIdle, int initIdleCapacity)
          Create a new StackObjectPoolFactory.
StackObjectPoolFactory(PoolableObjectFactory factory)
          Create a new StackObjectPoolFactory.
StackObjectPoolFactory(PoolableObjectFactory factory, int maxIdle)
          Create a new StackObjectPoolFactory.
StackObjectPoolFactory(PoolableObjectFactory factory, int maxIdle, int initIdleCapacity)
          Create a new StackObjectPoolFactory.
 
Method Summary
 ObjectPool createPool()
          Create and return a new ObjectPool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_factory

protected PoolableObjectFactory _factory

_maxSleeping

protected int _maxSleeping

_initCapacity

protected int _initCapacity
Constructor Detail

StackObjectPoolFactory

public StackObjectPoolFactory()
Create a new StackObjectPoolFactory.

See Also:
StackObjectPool.StackObjectPool()

StackObjectPoolFactory

public StackObjectPoolFactory(int maxIdle)
Create a new StackObjectPoolFactory.

Parameters:
maxIdle - cap on the number of "sleeping" instances in the pool.
See Also:
StackObjectPool.StackObjectPool(int)

StackObjectPoolFactory

public StackObjectPoolFactory(int maxIdle,
                              int initIdleCapacity)
Create a new StackObjectPoolFactory.

Parameters:
maxIdle - cap on the number of "sleeping" instances in the pool.
initIdleCapacity - - initial size of the pool (this specifies the size of the container, it does not cause the pool to be pre-populated.)
See Also:
StackObjectPool.StackObjectPool(int, int)

StackObjectPoolFactory

public StackObjectPoolFactory(PoolableObjectFactory factory)
Create a new StackObjectPoolFactory.

Parameters:
factory - the PoolableObjectFactory used by created pools.
See Also:
StackObjectPool.StackObjectPool(PoolableObjectFactory)

StackObjectPoolFactory

public StackObjectPoolFactory(PoolableObjectFactory factory,
                              int maxIdle)
Create a new StackObjectPoolFactory.

Parameters:
factory - the PoolableObjectFactory used by created pools.
maxIdle - cap on the number of "sleeping" instances in the pool.

StackObjectPoolFactory

public StackObjectPoolFactory(PoolableObjectFactory factory,
                              int maxIdle,
                              int initIdleCapacity)
Create a new StackObjectPoolFactory.

Parameters:
factory - the PoolableObjectFactory used by created pools.
maxIdle - cap on the number of "sleeping" instances in the pool.
initIdleCapacity - - initial size of the pool (this specifies the size of the container, it does not cause the pool to be pre-populated.)
Method Detail

createPool

public ObjectPool createPool()
Description copied from interface: ObjectPoolFactory
Create and return a new ObjectPool.

Specified by:
createPool in interface ObjectPoolFactory
Returns:
a new ObjectPool


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.