| Constructor: |
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory) {
this(factory,GenericKeyedObjectPool.DEFAULT_MAX_ACTIVE,GenericKeyedObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION,GenericKeyedObjectPool.DEFAULT_MAX_WAIT,GenericKeyedObjectPool.DEFAULT_MAX_IDLE,GenericKeyedObjectPool.DEFAULT_TEST_ON_BORROW,GenericKeyedObjectPool.DEFAULT_TEST_ON_RETURN,GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
GenericKeyedObjectPool.Config config) throws NullPointerException {
this(factory,config.maxActive,config.whenExhaustedAction,config.maxWait,config.maxIdle,config.maxTotal,config.minIdle,config.testOnBorrow,config.testOnReturn,config.timeBetweenEvictionRunsMillis,config.numTestsPerEvictionRun,config.minEvictableIdleTimeMillis,config.testWhileIdle,config.lifo);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
config - a non-null GenericKeyedObjectPool.Config describing the configuration.
Throws:
NullPointerException - when config is null.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, GenericKeyedObjectPool.Config)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive) {
this(factory,maxActive,GenericKeyedObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION,GenericKeyedObjectPool.DEFAULT_MAX_WAIT,GenericKeyedObjectPool.DEFAULT_MAX_IDLE, GenericKeyedObjectPool.DEFAULT_MAX_TOTAL,GenericKeyedObjectPool.DEFAULT_TEST_ON_BORROW,GenericKeyedObjectPool.DEFAULT_TEST_ON_RETURN,GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from pools at one time.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait) {
this(factory,maxActive,whenExhaustedAction,maxWait,GenericKeyedObjectPool.DEFAULT_MAX_IDLE, GenericKeyedObjectPool.DEFAULT_MAX_TOTAL,GenericKeyedObjectPool.DEFAULT_TEST_ON_BORROW,GenericKeyedObjectPool.DEFAULT_TEST_ON_RETURN,GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int, byte, long)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle) {
this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle, GenericKeyedObjectPool.DEFAULT_MAX_TOTAL,GenericKeyedObjectPool.DEFAULT_TEST_ON_BORROW,GenericKeyedObjectPool.DEFAULT_TEST_ON_RETURN,GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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 the pools.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int, byte, long, int)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
boolean testOnBorrow,
boolean testOnReturn) {
this(factory,maxActive,whenExhaustedAction,maxWait,GenericKeyedObjectPool.DEFAULT_MAX_IDLE, GenericKeyedObjectPool.DEFAULT_MAX_TOTAL,testOnBorrow,testOnReturn,GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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 borrowObject.
testOnReturn - whether to validate objects after they are returned to returnObject.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int, byte, long, boolean, boolean)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
int maxTotal) {
this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle, maxTotal, GenericKeyedObjectPool.DEFAULT_TEST_ON_BORROW,GenericKeyedObjectPool.DEFAULT_TEST_ON_RETURN,GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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 the pools.
maxTotal - the maximum number of objects that can exists at one time.
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
boolean testOnBorrow,
boolean testOnReturn) {
this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle, GenericKeyedObjectPool.DEFAULT_MAX_TOTAL,testOnBorrow,testOnReturn,GenericKeyedObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericKeyedObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericKeyedObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericKeyedObjectPool.DEFAULT_TEST_WHILE_IDLE);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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 the pools.
testOnBorrow - whether to validate objects before they are returned by borrowObject.
testOnReturn - whether to validate objects after they are returned to returnObject.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int, byte, long, int, boolean, boolean)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
boolean testOnBorrow,
boolean testOnReturn,
long timeBetweenEvictionRunsMillis,
int numTestsPerEvictionRun,
long minEvictableIdleTimeMillis,
boolean testWhileIdle) {
this(factory, maxActive, whenExhaustedAction, maxWait, maxIdle, GenericKeyedObjectPool.DEFAULT_MAX_TOTAL, testOnBorrow, testOnReturn, timeBetweenEvictionRunsMillis, numTestsPerEvictionRun, minEvictableIdleTimeMillis, testWhileIdle);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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 the pools.
testOnBorrow - whether to validate objects before they are returned by borrowObject.
testOnReturn - whether to validate objects after they are returned to returnObject.
timeBetweenEvictionRunsMillis - the number of milliseconds to sleep between examining idle objects for eviction.
numTestsPerEvictionRun - the number of idle objects to examine per run of the evictor.
minEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction.
testWhileIdle - whether to validate objects in the idle object eviction thread.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int, byte, long, int, boolean, boolean, long, int, long, boolean)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
int maxTotal,
boolean testOnBorrow,
boolean testOnReturn,
long timeBetweenEvictionRunsMillis,
int numTestsPerEvictionRun,
long minEvictableIdleTimeMillis,
boolean testWhileIdle) {
this(factory, maxActive, whenExhaustedAction, maxWait, maxIdle, maxTotal, GenericKeyedObjectPool.DEFAULT_MIN_IDLE , testOnBorrow, testOnReturn, timeBetweenEvictionRunsMillis, numTestsPerEvictionRun, minEvictableIdleTimeMillis, testWhileIdle);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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 the pools.
maxTotal - the maximum number of objects that can exists at one time.
testOnBorrow - whether to validate objects before they are returned by borrowObject.
testOnReturn - whether to validate objects after they are returned to returnObject.
timeBetweenEvictionRunsMillis - the number of milliseconds to sleep between examining idle objects for eviction.
numTestsPerEvictionRun - the number of idle objects to examine per run of the evictor.
minEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction.
testWhileIdle - whether to validate objects in the idle object eviction thread.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int, byte, long, int, int, boolean, boolean, long, int, long, boolean)
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
int maxTotal,
int minIdle,
boolean testOnBorrow,
boolean testOnReturn,
long timeBetweenEvictionRunsMillis,
int numTestsPerEvictionRun,
long minEvictableIdleTimeMillis,
boolean testWhileIdle) {
this(factory, maxActive, whenExhaustedAction, maxWait, maxIdle, maxTotal, minIdle, testOnBorrow, testOnReturn, timeBetweenEvictionRunsMillis, numTestsPerEvictionRun, minEvictableIdleTimeMillis, testWhileIdle, GenericKeyedObjectPool.DEFAULT_LIFO);
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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 the pools.
maxTotal - the maximum number of objects that can exists at one time.
minIdle - the minimum number of idle objects to have in the pool at any one time.
testOnBorrow - whether to validate objects before they are returned by borrowObject.
testOnReturn - whether to validate objects after they are returned to returnObject.
timeBetweenEvictionRunsMillis - the number of milliseconds to sleep between examining idle objects for eviction.
numTestsPerEvictionRun - the number of idle objects to examine per run of the evictor.
minEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction.
testWhileIdle - whether to validate objects in the idle object eviction thread.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int, byte, long, int, int, int, boolean, boolean, long, int, long, boolean)
- since:
Pool - 1.3
|
public GenericKeyedObjectPoolFactory(KeyedPoolableObjectFactory factory,
int maxActive,
byte whenExhaustedAction,
long maxWait,
int maxIdle,
int maxTotal,
int minIdle,
boolean testOnBorrow,
boolean testOnReturn,
long timeBetweenEvictionRunsMillis,
int numTestsPerEvictionRun,
long minEvictableIdleTimeMillis,
boolean testWhileIdle,
boolean lifo) {
_maxIdle = maxIdle;
_maxActive = maxActive;
_maxTotal = maxTotal;
_minIdle = minIdle;
_maxWait = maxWait;
_whenExhaustedAction = whenExhaustedAction;
_testOnBorrow = testOnBorrow;
_testOnReturn = testOnReturn;
_testWhileIdle = testWhileIdle;
_timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
_numTestsPerEvictionRun = numTestsPerEvictionRun;
_minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
_factory = factory;
_lifo = lifo;
}
Create a new GenericKeyedObjectPoolFactory. Parameters:
factory - the KeyedPoolableObjectFactory to used by created pools.
maxActive - the maximum number of objects that can be borrowed from 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 the pools.
maxTotal - the maximum number of objects that can exists at one time.
minIdle - the minimum number of idle objects to have in the pool at any one time.
testOnBorrow - whether to validate objects before they are returned by borrowObject.
testOnReturn - whether to validate objects after they are returned to returnObject.
timeBetweenEvictionRunsMillis - the number of milliseconds to sleep between examining idle objects for eviction.
numTestsPerEvictionRun - the number of idle objects to examine per run of the evictor.
minEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligible for eviction.
testWhileIdle - whether to validate objects in the idle object eviction thread.
lifo - whether or not objects are returned in last-in-first-out order from the idle object pool.
Also see:
- GenericKeyedObjectPool#GenericKeyedObjectPool(KeyedPoolableObjectFactory, int, byte, long, int, int, int, boolean, boolean, long, int, long, boolean, boolean)
- since:
Pool - 1.4
|