public class TomcatDataSourcePoolMetadata extends AbstractDataSourcePoolMetadata<org.apache.tomcat.jdbc.pool.DataSource>
DataSourcePoolMetadata
for a Tomcat DataSource
.Constructor and Description |
---|
TomcatDataSourcePoolMetadata(org.apache.tomcat.jdbc.pool.DataSource dataSource)
Tomcat typed
DataSourcePoolMetadata object. |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getActive()
Return the current number of active connections that have been allocated from the
data source or
null if that information is not available. |
long |
getBorrowed()
Return the number of connections that have been borrowed from the
data source or 0 if that information is not available.
|
java.lang.Boolean |
getDefaultAutoCommit()
The default auto-commit state of connections created by this pool.
|
java.lang.Integer |
getIdle()
Return the number of idle connections in the pool.
|
java.lang.Integer |
getMax()
Return the maximum number of active connections that can be allocated at the same
time or
-1 if there is no limit. |
java.lang.Integer |
getMin()
Return the minimum number of idle connections in the pool or
null if that
information is not available. |
long |
getReleasedCount()
Return the number of connections that have been released from the
data source or 0 if that information is not available.
|
java.lang.String |
getValidationQuery()
Return the query to use to validate that a connection is valid or
null if
that information is not available. |
getDataSource, getUsage
public TomcatDataSourcePoolMetadata(org.apache.tomcat.jdbc.pool.DataSource dataSource)
DataSourcePoolMetadata
object.dataSource
- The datasourcepublic java.lang.Integer getIdle()
DataSourcePoolMetadata
public java.lang.Integer getActive()
DataSourcePoolMetadata
null
if that information is not available.null
public final long getBorrowed()
public final long getReleasedCount()
public java.lang.Integer getMax()
DataSourcePoolMetadata
-1
if there is no limit. Can also return null
if that
information is not available.null
public java.lang.Integer getMin()
DataSourcePoolMetadata
null
if that
information is not available.null
public java.lang.String getValidationQuery()
DataSourcePoolMetadata
null
if
that information is not available.null
public java.lang.Boolean getDefaultAutoCommit()
DataSourcePoolMetadata
null
), default is JDBC driver default (If set to null then the
java.sql.Connection.setAutoCommit(boolean) method will not be called.)null