Interface ConnectionPool

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
AbstractConnectionPool, DuplexConnectionPool, LeakTrackingConnectionPool, MultiplexConnectionPool, RandomConnectionPool, RoundRobinConnectionPool, ValidatingConnectionPool

@Deprecated(since="2021-05-27") public interface ConnectionPool extends Closeable
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.

Client-side connection pool abstraction.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    static interface 
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Returns an idle connection, if available, or schedules the opening of a new connection and returns null.
    void
    Deprecated.
    Closes this ConnectionPool.
    boolean
    isActive(Connection connection)
    Deprecated.
     
    boolean
    Deprecated.
     
    boolean
    Deprecated.
     
    preCreateConnections(int connectionCount)
    Deprecated.
    Optionally pre-create up to connectionCount connections so they are immediately ready for use.
    boolean
    release(Connection connection)
    Deprecated.
    Returns the given connection, previously obtained via acquire(), back to this ConnectionPool.
    boolean
    remove(Connection connection)
    Deprecated.
    Removes the given connection from this ConnectionPool.
  • Method Details

    • preCreateConnections

      default CompletableFuture<Void> preCreateConnections(int connectionCount)
      Deprecated.
      Optionally pre-create up to connectionCount connections so they are immediately ready for use.
      Parameters:
      connectionCount - the number of connections to pre-start.
    • isActive

      boolean isActive(Connection connection)
      Deprecated.
      Parameters:
      connection - the connection to test
      Returns:
      whether the given connection is currently in use
    • isEmpty

      boolean isEmpty()
      Deprecated.
      Returns:
      whether this ConnectionPool has no open connections
    • isClosed

      boolean isClosed()
      Deprecated.
      Returns:
      whether this ConnectionPool has been closed
      See Also:
    • acquire

      Connection acquire()
      Deprecated.

      Returns an idle connection, if available, or schedules the opening of a new connection and returns null.

      Returns:
      an available connection, or null
    • release

      boolean release(Connection connection)
      Deprecated.

      Returns the given connection, previously obtained via acquire(), back to this ConnectionPool.

      Parameters:
      connection - the connection to release
      Returns:
      true if the connection has been released, false if the connection should be closed
    • remove

      boolean remove(Connection connection)
      Deprecated.

      Removes the given connection from this ConnectionPool.

      Parameters:
      connection - the connection to remove
      Returns:
      true if the connection was removed from this ConnectionPool
    • close

      void close()
      Deprecated.
      Closes this ConnectionPool.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      See Also: