Package org.apache.commons.pool.impl
Class StackObjectPoolFactory<T>
java.lang.Object
org.apache.commons.pool.impl.StackObjectPoolFactory<T>
- Type Parameters:
T
- the type of objects held in this pool
- All Implemented Interfaces:
ObjectPoolFactory<T>
A factory for creating
StackObjectPool
instances.- Since:
- Pool 1.0
- Version:
- $Revision: 1222396 $ $Date: 2011-12-22 14:02:25 -0500 (Thu, 22 Dec 2011) $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PoolableObjectFactory<T>
Deprecated.to be made private in pool 2.0protected int
Deprecated.to be made private in pool 2.0protected int
Deprecated.to be made private in pool 2.0 -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.to be removed in pool 2.0 - useStackObjectPoolFactory(PoolableObjectFactory)
StackObjectPoolFactory
(int maxIdle) Deprecated.to be removed in pool 2.0 - useStackObjectPoolFactory(PoolableObjectFactory, int)
StackObjectPoolFactory
(int maxIdle, int initIdleCapacity) Deprecated.to be removed in pool 2.0 - useStackObjectPoolFactory(PoolableObjectFactory, int, int)
StackObjectPoolFactory
(PoolableObjectFactory<T> factory) Create a new StackObjectPoolFactory.StackObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxIdle) Create a new StackObjectPoolFactory.StackObjectPoolFactory
(PoolableObjectFactory<T> factory, int maxIdle, int initIdleCapacity) Create a new StackObjectPoolFactory. -
Method Summary
Modifier and TypeMethodDescriptionCreate a StackObjectPool.Returns the factory used by created pools.int
Returns the initial capacity of created pools.int
Returns the maxIdle setting for created pools.
-
Field Details
-
_factory
Deprecated.to be made private in pool 2.0The PoolableObjectFactory used by created pools. -
_maxSleeping
Deprecated.to be made private in pool 2.0The maximum number of idle instances in created pools. -
_initCapacity
Deprecated.to be made private in pool 2.0The initial size of created pools.
-
-
Constructor Details
-
StackObjectPoolFactory
Deprecated.to be removed in pool 2.0 - useStackObjectPoolFactory(PoolableObjectFactory)
Create a new StackObjectPoolFactory.- See Also:
-
StackObjectPoolFactory
Deprecated.to be removed in pool 2.0 - useStackObjectPoolFactory(PoolableObjectFactory, int)
Create a new StackObjectPoolFactory.- Parameters:
maxIdle
- cap on the number of "sleeping" instances in the pool.- See Also:
-
StackObjectPoolFactory
Deprecated.to be removed in pool 2.0 - useStackObjectPoolFactory(PoolableObjectFactory, int, int)
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:
-
StackObjectPoolFactory
Create a new StackObjectPoolFactory.- Parameters:
factory
- the PoolableObjectFactory used by created pools.- See Also:
-
StackObjectPoolFactory
Create a new StackObjectPoolFactory.- Parameters:
factory
- the PoolableObjectFactory used by created pools.maxIdle
- cap on the number of "sleeping" instances in the pool.
-
StackObjectPoolFactory
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 Details
-
createPool
Create a StackObjectPool.- Specified by:
createPool
in interfaceObjectPoolFactory<T>
- Returns:
- a new StackObjectPool with the configured factory, maxIdle and initial capacity settings
-
getFactory
Returns the factory used by created pools.- Returns:
- the PoolableObjectFactory used by created pools
- Since:
- 1.5.5
-
getMaxSleeping
public int getMaxSleeping()Returns the maxIdle setting for created pools.- Returns:
- the maximum number of idle instances in created pools
- Since:
- 1.5.5
-
getInitCapacity
public int getInitCapacity()Returns the initial capacity of created pools.- Returns:
- size of created containers (created pools are not pre-populated)
- Since:
- 1.5.5
-