Package com.helger.commons.pool
Interface IMutableObjectPool<DATATYPE>
- Type Parameters:
DATATYPE- The type of object to be pooled.
- All Known Implementing Classes:
ObjectPool
public interface IMutableObjectPool<DATATYPE>
Simple pool interface.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionBorrow an object from the pool.returnObject(DATATYPE aItem) Return a previously borrowed object back to the pool.
-
Method Details
-
borrowObject
Borrow an object from the pool. This method blocks until an object is available.- Returns:
- The borrowed object. May be
nulldepending on the factory, and the locking used.
-
returnObject
Return a previously borrowed object back to the pool.- Parameters:
aItem- The previously borrowed object to be returned. Nevernull.- Returns:
ESuccess.SUCCESSupon success
-