BaseKeyedPooledObjectFactory

A base implementation of <code>KeyedPooledObjectFactory</code>. <p> All operations defined here are essentially no-op's. </p> This class is immutable, and therefore thread-safe.

@see KeyedPooledObjectFactory

@param <K> The type of keys managed by this factory. @param <V> Type of element managed by this factory.

Members

Functions

activateObject
void activateObject(K key, PooledObject!(V) p)

Reinitialize an instance to be returned by the pool. <p> The default implementation is a no-op. </p>

create
V create(K key)

Create an instance that can be served by the pool.

destroyObject
void destroyObject(K key, PooledObject!(V) p)

Destroy an instance no longer needed by the pool. <p> The default implementation is a no-op. </p>

makeObject
PooledObject!(V) makeObject(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
passivateObject
void passivateObject(K key, PooledObject!(V) p)

Uninitialize an instance to be returned to the idle object pool. <p> The default implementation is a no-op. </p>

validateObject
bool validateObject(K key, PooledObject!(V) p)

Ensures that the instance is safe to be returned by the pool. <p> The default implementation always returns {@code true}. </p>

wrap
PooledObject!(V) wrap(V value)

Wrap the provided instance with an implementation of {@link PooledObject}.

Meta