|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.webmacro.util.UPool
This is an unsynchronized object pool. It does synchronize on the objects added to and removed from the pool but it never synchronizes on its own data structures. As a result a null may be returned from the pool when an object actually exists (rare case), but an object is still guaranteed to be returned to only one thread.
Constructor Summary | |
UPool(int size)
Create a new Pool. |
Method Summary | |
java.lang.Object |
get()
Get an item from the pool |
void |
put(java.lang.Object o)
Add an item to the pool for later re-use |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UPool(int size)
Method Detail |
public void put(java.lang.Object o)
put
in interface Pool
public java.lang.Object get()
get
in interface Pool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |