Interface ObjectPool<T>
- All Known Implementing Classes:
DataBufferPool
public interface ObjectPool<T>
Object pool interface that allows reference tracking.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
give
(PooledObjectReference<T> itemReference) Return an item to the pool (permanently).take()
Take an item from the pool.
-
Method Details
-
take
Take an item from the pool.- Returns:
- A reference that encapsulates access to the item, to allow reclamation per the pool implementation's policies.
-
give
Return an item to the pool (permanently).- Parameters:
itemReference
- The reference returns previously by a call to give.
-