|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.pool.impl.GenericObjectPoolFactory
public class GenericObjectPoolFactory
A factory for creating GenericObjectPool
instances.
GenericObjectPool
,
ObjectPoolFactory
Field Summary | |
---|---|
protected PoolableObjectFactory |
_factory
|
protected boolean |
_lifo
|
protected int |
_maxActive
|
protected int |
_maxIdle
|
protected long |
_maxWait
|
protected long |
_minEvictableIdleTimeMillis
|
protected int |
_minIdle
|
protected int |
_numTestsPerEvictionRun
|
protected long |
_softMinEvictableIdleTimeMillis
|
protected boolean |
_testOnBorrow
|
protected boolean |
_testOnReturn
|
protected boolean |
_testWhileIdle
|
protected long |
_timeBetweenEvictionRunsMillis
|
protected byte |
_whenExhaustedAction
|
Constructor Summary | |
---|---|
GenericObjectPoolFactory(PoolableObjectFactory factory)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
GenericObjectPool.Config config)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
boolean testOnBorrow,
boolean testOnReturn)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
boolean testOnBorrow,
boolean testOnReturn)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
boolean testOnBorrow,
boolean testOnReturn,
long timeBetweenEvictionRunsMillis,
int numTestsPerEvictionRun,
long minEvictableIdleTimeMillis,
boolean testWhileIdle)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
int minIdle,
boolean testOnBorrow,
boolean testOnReturn,
long timeBetweenEvictionRunsMillis,
int numTestsPerEvictionRun,
long minEvictableIdleTimeMillis,
boolean testWhileIdle)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
int minIdle,
boolean testOnBorrow,
boolean testOnReturn,
long timeBetweenEvictionRunsMillis,
int numTestsPerEvictionRun,
long minEvictableIdleTimeMillis,
boolean testWhileIdle,
long softMinEvictableIdleTimeMillis)
Create a new GenericObjectPoolFactory. |
|
GenericObjectPoolFactory(PoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
int minIdle,
boolean testOnBorrow,
boolean testOnReturn,
long timeBetweenEvictionRunsMillis,
int numTestsPerEvictionRun,
long minEvictableIdleTimeMillis,
boolean testWhileIdle,
long softMinEvictableIdleTimeMillis,
boolean lifo)
Create a new GenericObjectPoolFactory. |
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 |
---|
protected int _maxIdle
protected int _minIdle
protected int _maxActive
protected long _maxWait
protected byte _whenExhaustedAction
protected boolean _testOnBorrow
protected boolean _testOnReturn
protected boolean _testWhileIdle
protected long _timeBetweenEvictionRunsMillis
protected int _numTestsPerEvictionRun
protected long _minEvictableIdleTimeMillis
protected long _softMinEvictableIdleTimeMillis
protected boolean _lifo
protected PoolableObjectFactory _factory
Constructor Detail |
---|
public GenericObjectPoolFactory(PoolableObjectFactory factory)
factory
- the PoolableObjectFactory used by created pools.GenericObjectPool.GenericObjectPool(PoolableObjectFactory)
public GenericObjectPoolFactory(PoolableObjectFactory factory, GenericObjectPool.Config config) throws NullPointerException
factory
- the PoolableObjectFactory used by created pools.config
- a non-null
GenericObjectPool.Config describing the configuration.
NullPointerException
- when config is null
.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, GenericObjectPool.Config)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.whenExhaustedAction
- the action to take when the pool is exhausted.maxWait
- the maximum amount of time to wait for an idle object when the pool is exhausted.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int, byte, long)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, boolean testOnBorrow, boolean testOnReturn)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.whenExhaustedAction
- the action to take when the pool is exhausted.maxWait
- the maximum amount of time to wait for an idle object when the pool is exhausted.testOnBorrow
- whether to validate objects before they are returned by the borrowObject.testOnReturn
- whether to validate objects after they are returned to the returnObject.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int, byte, long, boolean, boolean)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.whenExhaustedAction
- the action to take when the pool is exhausted.maxWait
- the maximum amount of time to wait for an idle object when the pool is exhausted.maxIdle
- the maximum number of idle objects in my pool.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int, byte, long, int)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.whenExhaustedAction
- the action to take when the pool is exhausted.maxWait
- the maximum amount of time to wait for an idle object when the pool is exhausted.maxIdle
- the maximum number of idle objects in my pool.testOnBorrow
- whether to validate objects before they are returned by the borrowObject.testOnReturn
- whether to validate objects after they are returned to the returnObject.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int, byte, long, int, boolean, boolean)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.whenExhaustedAction
- the action to take when the pool is exhausted.maxWait
- the maximum amount of time to wait for an idle object when the pool is exhausted.maxIdle
- the maximum number of idle objects in my pool.testOnBorrow
- whether to validate objects before they are returned by the borrowObject.testOnReturn
- whether to validate objects after they are returned to the returnObject.timeBetweenEvictionRunsMillis
- the number of milliseconds to sleep between examining idle objects for eviction.numTestsPerEvictionRun
- the number of idle objects to examine per run within the idle object eviction thread.minEvictableIdleTimeMillis
- the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction.testWhileIdle
- whether or not to validate objects in the idle object eviction thread.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int, byte, long, int, boolean, boolean, long, int, long, boolean)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.whenExhaustedAction
- the action to take when the pool is exhausted.maxWait
- the maximum amount of time to wait for an idle object when the pool is exhausted.maxIdle
- the maximum number of idle objects in my pool.minIdle
- the minimum number of idle objects in my pool.testOnBorrow
- whether to validate objects before they are returned by the borrowObject.testOnReturn
- whether to validate objects after they are returned to the returnObject.timeBetweenEvictionRunsMillis
- the number of milliseconds to sleep between examining idle objects for eviction.numTestsPerEvictionRun
- the number of idle objects to examine per run within the idle object eviction thread.minEvictableIdleTimeMillis
- the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction.testWhileIdle
- whether or not to validate objects in the idle object eviction thread.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int, byte, long, int, int, boolean, boolean, long, int, long, boolean)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.whenExhaustedAction
- the action to take when the pool is exhausted.maxWait
- the maximum amount of time to wait for an idle object when the pool is exhausted.maxIdle
- the maximum number of idle objects in my pool.minIdle
- the minimum number of idle objects in my pool.testOnBorrow
- whether to validate objects before they are returned by the borrowObject.testOnReturn
- whether to validate objects after they are returned to the returnObject.timeBetweenEvictionRunsMillis
- the number of milliseconds to sleep between examining idle objects for eviction.numTestsPerEvictionRun
- the number of idle objects to examine per run within the idle object eviction thread.minEvictableIdleTimeMillis
- the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction.testWhileIdle
- whether or not to validate objects in the idle object eviction thread.softMinEvictableIdleTimeMillis
- the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction with the extra condition that at least "minIdle" amount of object remain in the pool.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int, byte, long, int, int, boolean, boolean, long, int, long, boolean, long)
public GenericObjectPoolFactory(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis, boolean lifo)
factory
- the PoolableObjectFactory used by created pools.maxActive
- maximum number of objects that can be borrowed from created pools at one time.whenExhaustedAction
- the action to take when the pool is exhausted.maxWait
- the maximum amount of time to wait for an idle object when the pool is exhausted.maxIdle
- the maximum number of idle objects in my pool.minIdle
- the minimum number of idle objects in my pool.testOnBorrow
- whether to validate objects before they are returned by the borrowObject.testOnReturn
- whether to validate objects after they are returned to the returnObject.timeBetweenEvictionRunsMillis
- the number of milliseconds to sleep between examining idle objects for eviction.numTestsPerEvictionRun
- the number of idle objects to examine per run within the idle object eviction thread.minEvictableIdleTimeMillis
- the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction.testWhileIdle
- whether or not to validate objects in the idle object eviction thread.softMinEvictableIdleTimeMillis
- the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction with the extra condition that at least "minIdle" amount of object remain in the pool.lifo
- whether or not objects are returned in last-in-first-out order from the idle object pool.GenericObjectPool.GenericObjectPool(PoolableObjectFactory, int, byte, long, int, int, boolean, boolean, long, int, long, boolean, long, boolean)
Method Detail |
---|
public ObjectPool createPool()
ObjectPoolFactory
ObjectPool
.
createPool
in interface ObjectPoolFactory
ObjectPool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |