T
- the data source typepublic abstract class AbstractDataSourcePoolMetadata<T extends javax.sql.DataSource> extends java.lang.Object implements DataSourcePoolMetadata<T>
DataSourcePoolMetadata
implementation.Modifier | Constructor and Description |
---|---|
protected |
AbstractDataSourcePoolMetadata(T dataSource)
Create an instance with the data source to use.
|
Modifier and Type | Method and Description |
---|---|
T |
getDataSource()
Allow implementations to get the datasource for usage in metrics, etc.
|
java.lang.Float |
getUsage()
Return the usage of the pool as value between 0 and 1 (or -1 if the pool is not
limited).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getActive, getDefaultAutoCommit, getIdle, getMax, getMin, getValidationQuery
protected AbstractDataSourcePoolMetadata(T dataSource)
dataSource
- the data sourcepublic java.lang.Float getUsage()
DataSourcePoolMetadata
null
if the data source does not provide the necessary
information to compute the poll usage.getUsage
in interface DataSourcePoolMetadata<T extends javax.sql.DataSource>
null
public T getDataSource()
getDataSource
in interface DataSourcePoolMetadata<T extends javax.sql.DataSource>