public interface DataSourcePool extends DataSource
| Modifier and Type | Method and Description |
|---|---|
SQLException |
getDataSourceDownReason()
Returns the reason, why the dataSource is down.
|
String |
getName()
Return the dataSource name.
|
PoolStatistics |
getStatistics(boolean reset)
Return the aggregated execution statistics collected on all the connections in the pool.
|
PoolStatus |
getStatus(boolean reset)
Return the current status of the connection pool.
|
int |
getWarningSize()
Return the warning size.
|
boolean |
isAutoCommit()
Return true if the pool defaults to using autocommit.
|
boolean |
isDataSourceUp()
Returns false when the dataSource is down.
|
boolean |
isOnline()
Return true if the DataSource is online.
|
void |
offline()
Take the DataSource offline closing all connections and stopping heart beat checking.
|
void |
online()
Bring the DataSource online ensuring min connections and start heart beat checking.
|
void |
setMaxSize(int max)
Set a new maximum size.
|
void |
setWarningSize(int warningSize)
Set a new maximum size.
|
void |
shutdown()
Shutdown the pool.
|
void |
shutdown(boolean deregisterDriver)
Shutdown the pool with the option to deregister the driver.
|
getConnection, getConnectiongetLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterisWrapperFor, unwrapboolean isAutoCommit()
boolean isOnline()
Effectively the same as (synonym for) isDataSourceUp().
void online() throws SQLException
SQLExceptionvoid offline()
void shutdown()
This is functionally the same as offline() but generally we expect to only
shutdown the pool once where as we can expect to making many calls to offline() and
online().
void shutdown(boolean deregisterDriver)
PoolStatus getStatus(boolean reset)
This is cheaper than getStatistics() in that it just the counts of free, busy, wait etc and does not included times (total connection time etc).
If you pass reset = true then the counters are reset.
PoolStatistics getStatistics(boolean reset)
If reset is set to true the counters are reset once the statistics have been collected.
boolean isDataSourceUp()
Effectively the same as (synonym for) isOnline().
SQLException getDataSourceDownReason()
void setMaxSize(int max)
void setWarningSize(int warningSize)
int getWarningSize()
Copyright © 2019. All rights reserved.