| org.apache.commons.pool.impl.GenericObjectPool org.apache.commons.pool.impl.FairGenericObjectPool
FairGenericObjectPool | public class FairGenericObjectPool extends GenericObjectPool (Code) | | Version of GenericObjectPool which is 'fair' with respect to the client
threads using
FairGenericObjectPool.borrowObject borrowObject . Those which enter
first will receive objects from the pool first.
See Also: GenericObjectPool author: Gordon Mohr version: $Revision: 4672 $ $Date: 2006-09-27 00:03:16 +0000 (Wed, 27 Sep 2006) $ |
Constructor Summary | |
public | FairGenericObjectPool() Create a new FairGenericObjectPool. | public | FairGenericObjectPool(PoolableObjectFactory factory) Create a new FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(PoolableObjectFactory factory, GenericObjectPool.Config config) Create a new FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(PoolableObjectFactory factory, int maxActive) Create a new FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait) Create a new FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, boolean testOnBorrow, boolean testOnReturn) Create a new FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle) Create a new FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn) Create a new FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(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 FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(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 FairGenericObjectPool using the specified values. | public | FairGenericObjectPool(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 FairGenericObjectPool using the specified values.
Parameters: factory - the (possibly null)PoolableObjectFactory to use to create, validate and destroy objects Parameters: maxActive - the maximum number of objects that can be borrowed from me at one time (see FairGenericObjectPool.setMaxActive) Parameters: whenExhaustedAction - the action to take when the pool is exhausted (see FairGenericObjectPool.setWhenExhaustedAction) Parameters: maxWait - the maximum amount of time to wait for an idle object when the pool is exhausted an and whenExhaustedAction is FairGenericObjectPool.WHEN_EXHAUSTED_BLOCK (otherwise ignored) (see FairGenericObjectPool.setMaxWait) Parameters: maxIdle - the maximum number of idle objects in my pool (see FairGenericObjectPool.setMaxIdle) Parameters: minIdle - the minimum number of idle objects in my pool (see FairGenericObjectPool.setMinIdle) Parameters: testOnBorrow - whether or not to validate objects before they are returned by the FairGenericObjectPool.borrowObject method (see FairGenericObjectPool.setTestOnBorrow) Parameters: testOnReturn - whether or not to validate objects after they are returned to the FairGenericObjectPool.returnObject method (see FairGenericObjectPool.setTestOnReturn) Parameters: timeBetweenEvictionRunsMillis - the amount of time (in milliseconds) to sleep between examining idle objects for eviction (see FairGenericObjectPool.setTimeBetweenEvictionRunsMillis) Parameters: numTestsPerEvictionRun - the number of idle objects to examine per run within the idle object eviction thread (if any) (see FairGenericObjectPool.setNumTestsPerEvictionRun) Parameters: minEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligable for evcition (see FairGenericObjectPool.setMinEvictableIdleTimeMillis) Parameters: testWhileIdle - whether or not to validate objects in the idle object eviction thread, if any (see FairGenericObjectPool.setTestWhileIdle) Parameters: softMinEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligable for evcition with the extra condition that at least "minIdle" amount of object remain in the pool. |
_borrowerQueue | protected List _borrowerQueue(Code) | | Waiting borrowers (threads in #borrowObject )
|
FairGenericObjectPool | public FairGenericObjectPool()(Code) | | Create a new FairGenericObjectPool.
|
FairGenericObjectPool | public FairGenericObjectPool(PoolableObjectFactory factory)(Code) | | Create a new FairGenericObjectPool using the specified values.
Parameters: factory - the (possibly null)PoolableObjectFactory to use to create, validate and destroy objects |
FairGenericObjectPool | public FairGenericObjectPool(PoolableObjectFactory factory, GenericObjectPool.Config config)(Code) | | Create a new FairGenericObjectPool using the specified values.
Parameters: factory - the (possibly null)PoolableObjectFactory to use to create, validate and destroy objects Parameters: config - a non-null GenericObjectPool.Config describing my configuration |
FairGenericObjectPool | public FairGenericObjectPool(PoolableObjectFactory factory, int maxActive)(Code) | | Create a new FairGenericObjectPool using the specified values.
Parameters: factory - the (possibly null)PoolableObjectFactory to use to create, validate and destroy objects Parameters: maxActive - the maximum number of objects that can be borrowed from me at one time (see FairGenericObjectPool.setMaxActive) |
FairGenericObjectPool | public FairGenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait)(Code) | | Create a new FairGenericObjectPool using the specified values.
Parameters: factory - the (possibly null)PoolableObjectFactory to use to create, validate and destroy objects Parameters: maxActive - the maximum number of objects that can be borrowed from me at one time (see FairGenericObjectPool.setMaxActive) Parameters: whenExhaustedAction - the action to take when the pool is exhausted (see FairGenericObjectPool.getWhenExhaustedAction) Parameters: maxWait - the maximum amount of time to wait for an idle object when the pool is exhausted an and whenExhaustedAction is FairGenericObjectPool.WHEN_EXHAUSTED_BLOCK (otherwise ignored) (see FairGenericObjectPool.getMaxWait) |
FairGenericObjectPool | public FairGenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle)(Code) | | Create a new FairGenericObjectPool using the specified values.
Parameters: factory - the (possibly null)PoolableObjectFactory to use to create, validate and destroy objects Parameters: maxActive - the maximum number of objects that can be borrowed from me at one time (see FairGenericObjectPool.setMaxActive) Parameters: whenExhaustedAction - the action to take when the pool is exhausted (see FairGenericObjectPool.setWhenExhaustedAction) Parameters: maxWait - the maximum amount of time to wait for an idle object when the pool is exhausted an and whenExhaustedAction is FairGenericObjectPool.WHEN_EXHAUSTED_BLOCK (otherwise ignored) (see FairGenericObjectPool.setMaxWait) Parameters: maxIdle - the maximum number of idle objects in my pool (see FairGenericObjectPool.setMaxIdle) Parameters: testOnBorrow - whether or not to validate objects before they are returned by the FairGenericObjectPool.borrowObject method (see FairGenericObjectPool.setTestOnBorrow) Parameters: testOnReturn - whether or not to validate objects after they are returned to the FairGenericObjectPool.returnObject method (see FairGenericObjectPool.setTestOnReturn) Parameters: timeBetweenEvictionRunsMillis - the amount of time (in milliseconds) to sleep between examining idle objects for eviction (see FairGenericObjectPool.setTimeBetweenEvictionRunsMillis) Parameters: numTestsPerEvictionRun - the number of idle objects to examine per run within the idle object eviction thread (if any) (see FairGenericObjectPool.setNumTestsPerEvictionRun) Parameters: minEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligable for evcition (see FairGenericObjectPool.setMinEvictableIdleTimeMillis) Parameters: testWhileIdle - whether or not to validate objects in the idle object eviction thread, if any (see FairGenericObjectPool.setTestWhileIdle) |
FairGenericObjectPool | public FairGenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle)(Code) | | Create a new FairGenericObjectPool using the specified values.
Parameters: factory - the (possibly null)PoolableObjectFactory to use to create, validate and destroy objects Parameters: maxActive - the maximum number of objects that can be borrowed from me at one time (see FairGenericObjectPool.setMaxActive) Parameters: whenExhaustedAction - the action to take when the pool is exhausted (see FairGenericObjectPool.setWhenExhaustedAction) Parameters: maxWait - the maximum amount of time to wait for an idle object when the pool is exhausted an and whenExhaustedAction is FairGenericObjectPool.WHEN_EXHAUSTED_BLOCK (otherwise ignored) (see FairGenericObjectPool.setMaxWait) Parameters: maxIdle - the maximum number of idle objects in my pool (see FairGenericObjectPool.setMaxIdle) Parameters: minIdle - the minimum number of idle objects in my pool (see FairGenericObjectPool.setMinIdle) Parameters: testOnBorrow - whether or not to validate objects before they are returned by the FairGenericObjectPool.borrowObject method (see FairGenericObjectPool.setTestOnBorrow) Parameters: testOnReturn - whether or not to validate objects after they are returned to the FairGenericObjectPool.returnObject method (see FairGenericObjectPool.setTestOnReturn) Parameters: timeBetweenEvictionRunsMillis - the amount of time (in milliseconds) to sleep between examining idle objects for eviction (see FairGenericObjectPool.setTimeBetweenEvictionRunsMillis) Parameters: numTestsPerEvictionRun - the number of idle objects to examine per run within the idle object eviction thread (if any) (see FairGenericObjectPool.setNumTestsPerEvictionRun) Parameters: minEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligable for evcition (see FairGenericObjectPool.setMinEvictableIdleTimeMillis) Parameters: testWhileIdle - whether or not to validate objects in the idle object eviction thread, if any (see FairGenericObjectPool.setTestWhileIdle) |
FairGenericObjectPool | public FairGenericObjectPool(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)(Code) | | Create a new FairGenericObjectPool using the specified values.
Parameters: factory - the (possibly null)PoolableObjectFactory to use to create, validate and destroy objects Parameters: maxActive - the maximum number of objects that can be borrowed from me at one time (see FairGenericObjectPool.setMaxActive) Parameters: whenExhaustedAction - the action to take when the pool is exhausted (see FairGenericObjectPool.setWhenExhaustedAction) Parameters: maxWait - the maximum amount of time to wait for an idle object when the pool is exhausted an and whenExhaustedAction is FairGenericObjectPool.WHEN_EXHAUSTED_BLOCK (otherwise ignored) (see FairGenericObjectPool.setMaxWait) Parameters: maxIdle - the maximum number of idle objects in my pool (see FairGenericObjectPool.setMaxIdle) Parameters: minIdle - the minimum number of idle objects in my pool (see FairGenericObjectPool.setMinIdle) Parameters: testOnBorrow - whether or not to validate objects before they are returned by the FairGenericObjectPool.borrowObject method (see FairGenericObjectPool.setTestOnBorrow) Parameters: testOnReturn - whether or not to validate objects after they are returned to the FairGenericObjectPool.returnObject method (see FairGenericObjectPool.setTestOnReturn) Parameters: timeBetweenEvictionRunsMillis - the amount of time (in milliseconds) to sleep between examining idle objects for eviction (see FairGenericObjectPool.setTimeBetweenEvictionRunsMillis) Parameters: numTestsPerEvictionRun - the number of idle objects to examine per run within the idle object eviction thread (if any) (see FairGenericObjectPool.setNumTestsPerEvictionRun) Parameters: minEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligable for evcition (see FairGenericObjectPool.setMinEvictableIdleTimeMillis) Parameters: testWhileIdle - whether or not to validate objects in the idle object eviction thread, if any (see FairGenericObjectPool.setTestWhileIdle) Parameters: softMinEvictableIdleTimeMillis - the minimum number of milliseconds an object can sit idle in the pool before it is eligable for evcition with the extra condition that at least "minIdle" amount of object remain in the pool. (see FairGenericObjectPool.setSoftMinEvictableIdleTimeMillis) |
borrowObject | public Object borrowObject() throws Exception(Code) | | See Also: org.apache.commons.pool.ObjectPool.borrowObject |
|
|