Class PoolUtils.ObjectPoolAdaptor<V>

java.lang.Object
org.apache.commons.pool.PoolUtils.ObjectPoolAdaptor<V>
All Implemented Interfaces:
ObjectPool<V>
Enclosing class:
PoolUtils

private static class PoolUtils.ObjectPoolAdaptor<V> extends Object implements ObjectPool<V>
Adapts a KeyedObjectPool to make it an ObjectPool by fixing restricting to a fixed key.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Object
    Fixed key
    private final KeyedObjectPool<Object,V>
    Underlying KeyedObjectPool
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new ObjectPoolAdaptor using the provided KeyedObjectPool and fixed key.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Create an object using the factory or other implementation dependent mechanism, passivate it, and then place it in the idle object pool.
    Obtains an instance from this pool.
    void
    Clears any objects sitting idle in the pool, releasing any associated resources (optional operation).
    void
    Close this pool, and free any resources associated with it.
    int
    Return the number of instances currently borrowed from this pool (optional operation).
    int
    Return the number of instances currently idle in this pool (optional operation).
    void
    Invalidates an object from the pool.
    void
    Return an instance to the pool.
    void
    Deprecated.
    to be removed in version 2.0

    Methods inherited from class java.lang.Object

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