Java org.apache.commons.pool KeyedObjectPool fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.pool KeyedObjectPool fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.pool KeyedObjectPool.

The text is from its open source code.

Implementation

org.apache.commons.pool.KeyedObjectPool has the following implementations.
Click this link to see all its implementation.

Method

voidaddObject(Object key)
Create an object using the KeyedPoolableObjectFactory factory or other implementation dependent mechanism, passivate it, and then place it in the idle object pool.
ObjectborrowObject(Object key)
Obtains an instance from this pool for the specified key.
voidclear()
Clears the pool, removing all pooled instances (optional operation).
voidclear(Object key)
Clears the specified pool, removing all pooled instances corresponding to the given key (optional operation).
voidclose()
Close this pool, and free any resources associated with it.
intgetNumActive()
Returns the total number of instances current borrowed from this pool but not yet returned (optional operation).
intgetNumActive(Object key)
Returns the number of instances currently borrowed from but not yet returned to the pool corresponding to the given key (optional operation).
intgetNumIdle()
Returns the total number of instances currently idle in this pool (optional operation).
intgetNumIdle(Object key)
Returns the number of instances corresponding to the given key currently idle in this pool (optional operation).
voidinvalidateObject(Object key, Object obj)
Invalidates an object from the pool By contract, obj must have been obtained using #borrowObject borrowObject or a related method as defined in an implementation or sub-interface using a key that is equivalent to the one used to borrow the Object in the first place.
voidreturnObject(Object key, Object obj)
Return an instance to the pool.
voidsetFactory(KeyedPoolableObjectFactory factory)
Sets the KeyedPoolableObjectFactory factory the pool uses to create new instances (optional operation).