Package com.sun.istack
Class Pool.Impl<T>
java.lang.Object
com.sun.istack.Pool.Impl<T>
- All Implemented Interfaces:
Pool<T>
Default implementation that uses
ConcurrentLinkedQueue
as the data store.
Note for Implementors
Don't rely on the fact that this class extends from ConcurrentLinkedQueue.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Impl
public Impl()
-
-
Method Details
-
take
Gets a new object from the pool.If no object is available in the pool, this method creates a new one.
-
recycle
Returns an object back to the pool. -
create
Creates a new instance of object.This method is used when someone wants to
takean object from an empty pool.Also note that multiple threads may call this method concurrently.
-