Interface ConnectionPool

All Superinterfaces:
AutoCloseable

public interface ConnectionPool extends AutoCloseable
The ConnectionPool maintains a cache of reusable Connections.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves a connection managed by the pool.
    void
    Returns a provided connection back to the pool and thus makes it available to be used by other consumers.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • getConnection

      Connection getConnection()
      Retrieves a connection managed by the pool.
      Returns:
      connection to be exclusively used until returned to the pool
    • returnConnection

      void returnConnection(Connection connection)
      Returns a provided connection back to the pool and thus makes it available to be used by other consumers.
      Parameters:
      connection - to be returned to the pool