public interface BeeConnectionPool
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear(boolean forceCloseUsing)
Closes all connections and removes them from pool.
|
void |
clear(boolean forceCloseUsing,
BeeDataSourceConfig config)
Closes all connections and removes them from pool,then re-initialize pool with new configuration.
|
void |
close()
Closes all connections in pool and shutdown all work threads in pool,then pool state change to closed from working,
disable all operation on pool.
|
Connection |
getConnection()
Attempts to get a connection from pool.
|
int |
getConnectionCreatingCount()
Get connection count in creating
|
int |
getConnectionCreatingTimeoutCount()
Get connection count in creating timeout
|
BeeConnectionPoolMonitorVo |
getPoolMonitorVo()
Gets monitor object of pool runtime info.
|
XAConnection |
getXAConnection()
Attempts to get a XAConnection from pool.
|
void |
init(BeeDataSourceConfig config)
Pool initializes,if success,pool state become to be ready for working,then borrowers can get connections from it.
|
Thread[] |
interruptConnectionCreating(boolean onlyInterruptTimeout)
interrupt threads creating connections
|
boolean |
isClosed()
Query pool state whether is closed.
|
void |
setPrintRuntimeLog(boolean indicator)
Changes switch of log print.
|
void init(BeeDataSourceConfig config) throws SQLException
config - is a configuration object,some items of it are used in initializationSQLException - when initializes failedConnection getConnection() throws SQLException
SQLException - when pool creates a connection failedConnectionGetTimeoutException - when borrower wait time out in poolConnectionGetInterruptedException - if interrupted while waiting in poolXAConnection getXAConnection() throws SQLException
SQLException - when pool creates a xa connection failedConnectionGetTimeoutException - when borrower wait time out in poolConnectionGetInterruptedException - if interrupted while waiting in poolvoid close()
boolean isClosed()
void setPrintRuntimeLog(boolean indicator)
indicator - is true that prints logs of pool work,false that disable printBeeConnectionPoolMonitorVo getPoolMonitorVo()
int getConnectionCreatingCount()
int getConnectionCreatingTimeoutCount()
Thread[] interruptConnectionCreating(boolean onlyInterruptTimeout)
onlyInterruptTimeout - is true,attempt to interrupt creation timeout threadsvoid clear(boolean forceCloseUsing)
throws SQLException
forceCloseUsing - is an indicator that close borrowed connections immediately,or that close them when them return to poolSQLException - when pool closed or in cleaningvoid clear(boolean forceCloseUsing,
BeeDataSourceConfig config)
throws SQLException
forceCloseUsing - is an indicator that close borrowed connections immediately,or that close them when them return to poolconfig - is a new configuration objectBeeDataSourceConfigException - when check failed on this new configurationSQLException - when pool closed or in cleaningSQLException - when pool reinitialize failedCopyright © 2024. All rights reserved.