Interface ResourcePool<R extends AutoCloseable>
- Type Parameters:
R- the type of the resources of aResourcePool.
- All Superinterfaces:
AutoCloseable, Closeable, GroupCloseable, OpennessRequestable
- All Known Implementing Classes:
AbstractResourcePool, SqlConnectionPool
A
ResourcePool manages resources that are AutoCloseables.- Author:
- Silvan Wyss
-
Method Summary
Methods inherited from interface GroupCloseable
close, createCloseDependencyTo, getStoredCloseController, isClosed, noteCloseMethods inherited from interface OpennessRequestable
isOpen
-
Method Details
-
borrowResource
R borrowResource()- Returns:
- resource from the current
ResourcePoolwhich will be borrowed. When The resource is closed its internal resource will be given back to the currentResourcePooland will be available again.
-