|
istack common utility code 2.6.1-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.istack.Pool.Impl<T>
public abstract static class Pool.Impl<T>
Default implementation that uses ConcurrentLinkedQueue
as the data store.
Don't rely on the fact that this class extends from ConcurrentLinkedQueue
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.sun.istack.Pool |
---|
Pool.Impl<T> |
Constructor Summary | |
---|---|
Pool.Impl()
|
Method Summary | |
---|---|
protected abstract T |
create()
Creates a new instance of object. |
void |
recycle(T t)
Returns an object back to the pool. |
T |
take()
Gets a new object from the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pool.Impl()
Method Detail |
---|
@NotNull public final T take()
If no object is available in the pool, this method creates a new one.
take
in interface Pool<T>
public final void recycle(T t)
recycle
in interface Pool<T>
@NotNull protected abstract T create()
This method is used when someone wants to
take
an object from an empty pool.
Also note that multiple threads may call this method concurrently.
|
istack common utility code 2.6.1-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |