|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scopemvc.util.ObjectPoolManager
Manages pooling of instances of different classes.
Method Summary | |
void |
addObjectPool(java.lang.Class clazz,
ObjectPool pool)
Adds a pool to be managed. |
java.lang.Object |
borrowObject(java.lang.Class clazz)
Obtains an instance of the sepcified class from the pool. |
java.lang.Object |
borrowObjectIfExists(java.lang.Class clazz)
Obtains an instance of the specified class from the pool. |
static ObjectPoolManager |
getInstance()
Obtains the singleton instance of this class. |
ObjectPool |
getObjectPool(java.lang.Class clazz)
Obtains the pool for the given class |
void |
returnObject(java.lang.Object object)
Returns an instance to the pool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ObjectPoolManager getInstance()
public final ObjectPool getObjectPool(java.lang.Class clazz)
clazz
- TODO: Describe the Parameter
public final java.lang.Object borrowObject(java.lang.Class clazz)
clazz
- TODO: Describe the Parameter
public final java.lang.Object borrowObjectIfExists(java.lang.Class clazz)
clazz
- TODO: Describe the Parameter
public final void returnObject(java.lang.Object object)
object
- TODO: Describe the Parameterpublic final void addObjectPool(java.lang.Class clazz, ObjectPool pool)
clazz
- The element to be added to the ObjectPool attributepool
- The element to be added to the ObjectPool attribute
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |