Client-side connection pool abstraction.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | ConnectionPool.
Factory for ConnectionPool instances. |
| public static interface | ConnectionPool.
Marks a connection as supporting multiplexed requests. |
| public static interface | ConnectionPool.
Marks a connection as being usable for a maximum number of requests. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: whether the connection has been acceptedthe connection to accept connection)Accepts the given connection to be managed by this ConnectionPool. |
| public Connection | Returns: an idle connection ornull if no idle connections are availablewhether to schedule the opening of a connection if no idle connections are available create)Returns an idle connection, if available;
if an idle connection is not available, and the given |
| public boolean | isActive(Connection
the connection to test connection)Returns: whether the given connection is currently in use |
| public boolean | |
| public default CompletableFuture | preCreateConnections(int
the number of connections to pre-start. connectionCount)Optionally pre-create up to |
| public boolean | Returns: true if the connection has been released, false if the connection should be closedthe connection to release connection)Returns the given connection, previously obtained via |
| public boolean | Returns: true if the connection was removed from this ConnectionPoolthe connection to remove connection)Removes the given connection from this ConnectionPool. |
| accept | back to summary |
|---|---|
| public boolean accept(Connection connection) Accepts the given connection to be managed by this ConnectionPool.
| |
| acquire | back to summary |
|---|---|
| public Connection acquire(boolean create) Returns an idle connection, if available;
if an idle connection is not available, and the given
| |
| isActive | back to summary |
|---|---|
public boolean isActive(Connection connection)
| |
| isEmpty | back to summary |
|---|---|
public boolean isEmpty()
| |
| preCreateConnections | back to summary |
|---|---|
| public default CompletableFuture Optionally pre-create up to
| |
| release | back to summary |
|---|---|
| public boolean release(Connection connection) Returns the given connection, previously obtained via
| |
| remove | back to summary |
|---|---|
| public boolean remove(Connection connection) Removes the given connection from this ConnectionPool.
| |
| Modifier and Type | Method and Description |
|---|---|
| public ConnectionPool | Returns: the newly created ConnectionPoolthe destination to create the ConnectionPool for destination)Creates a new ConnectionPool for the given destination. |
| newConnectionPool | back to summary |
|---|---|
| public ConnectionPool newConnectionPool(Destination destination) Creates a new ConnectionPool for the given destination.
| |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| getMaxMultiplex | back to summary |
|---|---|
public int getMaxMultiplex()
| |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| getMaxUsage | back to summary |
|---|---|
public int getMaxUsage()
| |