oemware.core.pool
Class ObjectPool

java.lang.Object
  extended by org.apache.commons.pool.BaseObjectPool
      extended by org.apache.commons.pool.impl.GenericObjectPool
          extended by oemware.core.pool.ObjectPool
All Implemented Interfaces:
org.apache.commons.pool.ObjectPool

public class ObjectPool
extends org.apache.commons.pool.impl.GenericObjectPool

The object pool manager. Extends commons generic object pool.

Version:
$Id: ObjectPool.java 13 2008-06-15 19:43:04Z oemware $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.pool.impl.GenericObjectPool
org.apache.commons.pool.impl.GenericObjectPool.Config
 
Field Summary
 
Fields inherited from class org.apache.commons.pool.impl.GenericObjectPool
DEFAULT_MAX_ACTIVE, DEFAULT_MAX_IDLE, DEFAULT_MAX_WAIT, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_MIN_IDLE, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_TEST_ON_BORROW, DEFAULT_TEST_ON_RETURN, DEFAULT_TEST_WHILE_IDLE, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, DEFAULT_WHEN_EXHAUSTED_ACTION, WHEN_EXHAUSTED_BLOCK, WHEN_EXHAUSTED_FAIL, WHEN_EXHAUSTED_GROW
 
Constructor Summary
ObjectPool(java.lang.String pName, org.apache.commons.pool.PoolableObjectFactory pObjectFactory, int pMaxActive, int pMaxIdle, long pMaxWait)
          Create a new object and set some of the properties.
ObjectPool(java.lang.String pName, org.apache.commons.pool.PoolableObjectFactory pObjectFactory, int pMaxActive, int pMaxIdle, long pMaxWait, boolean pTestOnBorrow, boolean pTestOnReturn, boolean pTestWhileIdle, byte pExhaustedAction)
          Create a new object and set some of the properties.
 
Method Summary
 
Methods inherited from class org.apache.commons.pool.impl.GenericObjectPool
addObject, borrowObject, clear, close, evict, getMaxActive, getMaxIdle, getMaxWait, getMinEvictableIdleTimeMillis, getMinIdle, getNumActive, getNumIdle, getNumTestsPerEvictionRun, getSoftMinEvictableIdleTimeMillis, getTestOnBorrow, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, getWhenExhaustedAction, invalidateObject, returnObject, setConfig, setFactory, setMaxActive, setMaxIdle, setMaxWait, setMinEvictableIdleTimeMillis, setMinIdle, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis, setWhenExhaustedAction, startEvictor
 
Methods inherited from class org.apache.commons.pool.BaseObjectPool
assertOpen, isClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectPool

public ObjectPool(java.lang.String pName,
                  org.apache.commons.pool.PoolableObjectFactory pObjectFactory,
                  int pMaxActive,
                  int pMaxIdle,
                  long pMaxWait)
Create a new object and set some of the properties. This constructor blocks empty requests until max wait has been reached. It doesn't run any tests.

Parameters:
pName - The object pool name.
pObjectFactory - The object factory.
pMaxActive - The maximum number of items in the pool.
pMaxIdle - The max number of idle objects.
pMaxWait - The max wait in ms. GenericObjectPool).

ObjectPool

public ObjectPool(java.lang.String pName,
                  org.apache.commons.pool.PoolableObjectFactory pObjectFactory,
                  int pMaxActive,
                  int pMaxIdle,
                  long pMaxWait,
                  boolean pTestOnBorrow,
                  boolean pTestOnReturn,
                  boolean pTestWhileIdle,
                  byte pExhaustedAction)
Create a new object and set some of the properties.

Parameters:
pName - The object pool name.
pObjectFactory - The object factory.
pMaxActive - The maximum number of items in the pool.
pMaxIdle - The max number of idle objects.
pMaxWait - The max wait in ms.
pTestOnBorrow - The test on borrow flag.
pTestOnReturn - The test on return flag.
pTestWhileIdle - The test while idle flag.
pExhaustedAction - The exhausted action (see commons GenericObjectPool).


Copyright © 2008 Deft Labs - Released under LGPL, Version 3.0