public class ConnectionPool extends Object implements XPooledConnectionEventListener
| Constructor and Description |
|---|
ConnectionPool(ConnectionFactory connectionFactory,
ConnectionPoolProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
int |
availableSize()
The amount of pooled connections in state available.
|
Reapable |
borrowConnection()
Borrows a connection from the pool.
|
void |
destroy() |
void |
onXPooledConnectionTerminated(XPooledConnection connection)
fired when a connection changed its state to terminated
|
void |
reapPool() |
void |
refresh() |
String |
toString() |
int |
totalSize()
The total amount of pooled connections in any state.
|
public ConnectionPool(ConnectionFactory connectionFactory, ConnectionPoolProperties properties) throws ConnectionPoolException
ConnectionPoolExceptionpublic Reapable borrowConnection() throws CreateConnectionException, PoolExhaustedException, ConnectionPoolException
CreateConnectionException - If the pool attempted to grow but failed.PoolExhaustedException - If the pool could not grow because it is exhausted.ConnectionPoolException - Other errors.public void reapPool()
public void destroy()
public void refresh()
public int availableSize()
public int totalSize()
public void onXPooledConnectionTerminated(XPooledConnection connection)
XPooledConnectionEventListeneronXPooledConnectionTerminated in interface XPooledConnectionEventListenerCopyright © 2016. All Rights Reserved.