public class DataSourceMonitor extends AbstractPoolMonitor
DEFAULT_MAX_WAITlogger, name| Constructor and Description |
|---|
DataSourceMonitor(DataSource dataSource)
Creates a new instance that monitors the given data source.
|
| Modifier and Type | Method and Description |
|---|---|
protected StatusCode |
checkPool()
Performs a health check on a the pool.
|
protected int |
getActiveCount()
Gets the number of pool resources active at present.
|
protected int |
getIdleCount()
Gets the number of pool resources idle at present.
|
void |
setValidationQuery(String query)
Sets the validation query used to monitor the data source.
|
observe, setExecutor, setMaxWaitgetName, setNamepublic DataSourceMonitor(DataSource dataSource)
dataSource - Data source to monitor.public void setValidationQuery(String query)
query - Validation query that should be as efficient as possible.protected StatusCode checkPool() throws Exception
AbstractPoolMonitorcheckPool in class AbstractPoolMonitorException - Thrown to indicate a serious problem with pool validation.protected int getIdleCount()
AbstractPoolMonitorgetIdleCount in class AbstractPoolMonitorprotected int getActiveCount()
AbstractPoolMonitorgetActiveCount in class AbstractPoolMonitorCopyright © 2004-2014 Jasig. All Rights Reserved.