Interface ResourcePool<R extends AutoCloseable>

Type Parameters:
R - the type of the resources of a ResourcePool.
All Superinterfaces:
AutoCloseable, Closeable, GroupCloseable, OpennessRequestable
All Known Implementing Classes:
AbstractResourcePool, SqlConnectionPool

public interface ResourcePool<R extends AutoCloseable> extends GroupCloseable
A ResourcePool manages resources that are AutoCloseables.
Author:
Silvan Wyss
  • Method Details

    • borrowResource

      R borrowResource()
      Returns:
      resource from the current ResourcePool which will be borrowed. When The resource is closed its internal resource will be given back to the current ResourcePool and will be available again.