Package biz.onixs.util.pool
Class Pool<T>
- java.lang.Object
-
- biz.onixs.util.pool.Pool<T>
-
- All Implemented Interfaces:
ObjectPool<T>
public class Pool<T> extends Object implements ObjectPool<T>
-
-
Constructor Summary
Constructors Constructor Description Pool(PoolableObjectFactory<T> objectFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TborrowObject()intgetNumActive()intgetNumIdle()voidreturnObject(T object)voidreturnObjects(Collection<T> collection)
-
-
-
Constructor Detail
-
Pool
public Pool(PoolableObjectFactory<T> objectFactory)
-
-
Method Detail
-
borrowObject
public T borrowObject()
- Specified by:
borrowObjectin interfaceObjectPool<T>
-
returnObject
public void returnObject(T object)
- Specified by:
returnObjectin interfaceObjectPool<T>
-
returnObjects
public void returnObjects(Collection<T> collection)
- Specified by:
returnObjectsin interfaceObjectPool<T>
-
getNumActive
public int getNumActive()
- Specified by:
getNumActivein interfaceObjectPool<T>
-
getNumIdle
public int getNumIdle()
- Specified by:
getNumIdlein interfaceObjectPool<T>
-
-