Package com.complexible.common.pool
Interface Pool<T,E extends Exception>
- All Known Subinterfaces:
ConnectionPool
- All Known Implementing Classes:
ApachePoolImpl
public interface Pool<T,E extends Exception>
Simple interface for a Pool of objects
- Since:
- 0.5.1
- Version:
- 0.7
- Author:
- Michael Grove
-
Method Summary
-
Method Details
-
obtain
Get an object from the pool- Returns:
- the object
- Throws:
E- if there was an error obtaining the object or the pool is exhausted or at capacity
-
shutdown
void shutdown() throws EShutdown the pool- Throws:
E- if there was an error while shutting the pool down
-
release
Return the object to the pool- Parameters:
theObj- the object- Throws:
E- if there was an error while releasing the object
-