|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectzinger.util.recycling.SynchronizedObjectPool
public class SynchronizedObjectPool
Field Summary | |
---|---|
protected ObjectPool |
pool
|
Constructor Summary | |
---|---|
SynchronizedObjectPool(ObjectPool pool)
|
Method Summary | |
---|---|
void |
clearCache()
Clears existing cache. |
java.lang.Object |
getObject()
Gets an instance out of the pool with default initialization. |
java.lang.Object |
getObject(java.lang.Object arg)
Gets an instance out of the pool and initializes it using the specified parameter object. |
boolean |
recycleObject(java.lang.Object obj)
Returns an object into the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ObjectPool pool
Constructor Detail |
---|
public SynchronizedObjectPool(ObjectPool pool)
Method Detail |
---|
public java.lang.Object getObject() throws java.lang.IllegalArgumentException
ObjectPool
getObject(null)
.
getObject
in interface ObjectPool
java.lang.IllegalArgumentException
ObjectPool.getObject(java.lang.Object)
public java.lang.Object getObject(java.lang.Object arg) throws java.lang.IllegalArgumentException
ObjectPool
getObject
in interface ObjectPool
arg
- Initialization parameter. If null
, default initialziation is used.
java.lang.IllegalArgumentException
public boolean recycleObject(java.lang.Object obj)
ObjectPool
getObject()
or getObject(arg)
.
recycleObject
in interface ObjectPool
ObjectPool.getObject()
,
ObjectPool.getObject(java.lang.Object)
public void clearCache()
ObjectPool
clearCache
in interface ObjectPool
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |