public interface ConnectionPool
extends java.io.Closeable
Client-side connection pool abstraction.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConnectionPool.Factory
Factory for ConnectionPool instances.
|
static interface |
ConnectionPool.Multiplexable
Marks a connection pool as supporting multiplexed connections.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
acquire()
Returns an idle connection, if available, or schedules the opening
of a new connection and returns
null. |
void |
close()
Closes this ConnectionPool.
|
boolean |
isActive(Connection connection) |
boolean |
isClosed() |
boolean |
isEmpty() |
boolean |
release(Connection connection)
Returns the given connection, previously obtained via
acquire(),
back to this ConnectionPool. |
boolean |
remove(Connection connection)
Removes the given connection from this ConnectionPool.
|
boolean isActive(Connection connection)
connection - the connection to testboolean isEmpty()
boolean isClosed()
close()Connection acquire()
Returns an idle connection, if available, or schedules the opening
of a new connection and returns null.
boolean release(Connection connection)
Returns the given connection, previously obtained via acquire(),
back to this ConnectionPool.
connection - the connection to releaseboolean remove(Connection connection)
Removes the given connection from this ConnectionPool.
connection - the connection to removevoid close()
close in interface java.lang.AutoCloseableclose in interface java.io.CloseableisClosed()Copyright © 1995–2021 Webtide. All rights reserved.