java.lang.AutoCloseable, java.io.CloseableAbstractConnectionPool, DuplexConnectionPool, LeakTrackingConnectionPool, MultiplexConnectionPool, ValidatingConnectionPoolpublic interface ConnectionPool
extends java.io.Closeable
Client-side connection pool abstraction.
| Modifier and Type | Interface | Description |
|---|---|---|
static interface |
ConnectionPool.Factory |
Factory for ConnectionPool instances.
|
| Modifier and Type | Method | 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–2017 Webtide. All rights reserved.