|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.db.toplink.ObjectPool<T>
T
- the type of the object to poolpublic abstract class ObjectPool<T>
Object pool allocator that leverages a ConcurrentLinkedQueue
for
synchronization.
Constructor Summary | |
---|---|
ObjectPool()
|
Method Summary | |
---|---|
T |
allocate()
Allocate an object from the pool or create a new one if we cannot get one from the queue. |
protected abstract T |
newInstance()
Subclasses must override the object creation method. |
void |
replace(T value)
Return an object to the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectPool()
Method Detail |
---|
public final T allocate()
public final void replace(T value)
value
- the object being returnedprotected abstract T newInstance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |