Package com.complexible.common.pool

# Class ApachePoolImpl<T>

java.lang.Object
com.complexible.common.pool.ApachePoolImpl<T>

All Implemented Interfaces:
  `Pool<T,Exception>`

public class ApachePoolImpl<T> extends Object implements Pool<T,Exception>

Pool implementation using an Apache object pool

Since:
  3.1
Version:
  0.5.1
Author:
  Michael Grove

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApachePoolImpl(org.apache.commons.pool.PoolableObjectFactory<T> theFactory, int theMin, org.apache.commons.pool.impl.GenericObjectPool.Config theConfig)`
  Create a new ApachePoolImpl

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `obtain()`
  Get an object from the pool
  `void`
  `release(T theObj)`
  Return the object to the pool
  `void`
  `shutdown()`
  Shutdown the pool

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ApachePoolImpl

    public ApachePoolImpl(org.apache.commons.pool.PoolableObjectFactory<T> theFactory, int theMin, org.apache.commons.pool.impl.GenericObjectPool.Config theConfig)
    Create a new ApachePoolImpl
    Parameters:
      `theFactory` - the object factory
      `theMin` - the min # of objects in the pool
      `theConfig` - the configuration of the pool

- ## Method Details

  - ### obtain

    public T obtain() throws Exception
    Get an object from the pool
    Specified by:
      `obtain` in interface `Pool<T,Exception>`
    Returns:
      the object
    Throws:
      `Exception`

  - ### shutdown

    public void shutdown() throws Exception
    Shutdown the pool
    Specified by:
      `shutdown` in interface `Pool<T,Exception>`
    Throws:
      `Exception`

  - ### release

    public void release(T theObj) throws Exception
    Return the object to the pool
    Specified by:
      `release` in interface `Pool<T,Exception>`
    Parameters:
      `theObj` - the object
    Throws:
      `Exception`