org.apache.commons.pool.impl
public class SoftReferenceObjectPool extends BaseObjectPool implements ObjectPool
java.lang.ref.SoftReference SoftReference
based
ObjectPool.
Version: $Revision: 383290 $ $Date: 2006-03-05 02:00:15 -0500 (Sun, 05 Mar 2006) $
Constructor Summary | |
---|---|
SoftReferenceObjectPool() | |
SoftReferenceObjectPool(PoolableObjectFactory factory) | |
SoftReferenceObjectPool(PoolableObjectFactory factory, int initSize) |
Method Summary | |
---|---|
void | addObject()
Create an object, and place it into the pool.
addObject() is useful for "pre-loading" a pool with idle objects. |
Object | borrowObject() |
void | clear() |
void | close() |
int | getNumActive() |
int | getNumIdle() Returns an approximation not less than the of the number of idle instances in the pool. |
void | invalidateObject(Object obj) |
void | returnObject(Object obj) |
void | setFactory(PoolableObjectFactory factory) |