Class DbcpDataSourcePoolMetadata
- java.lang.Object
-
- io.micronaut.jdbc.metadata.AbstractDataSourcePoolMetadata<org.apache.commons.dbcp2.BasicDataSource>
-
- io.micronaut.configuration.jdbc.dbcp.metadata.DbcpDataSourcePoolMetadata
-
- All Implemented Interfaces:
DataSourcePoolMetadata<org.apache.commons.dbcp2.BasicDataSource>
public class DbcpDataSourcePoolMetadata extends AbstractDataSourcePoolMetadata<org.apache.commons.dbcp2.BasicDataSource>
DataSourcePoolMetadatafor a DBCPBasicDataSource. NOTICE: Forked from Spring Boot.- Since:
- 1.0.0
- Author:
- Stephane Nicoll, Christian Oestreich
-
-
Constructor Summary
Constructors Constructor Description DbcpDataSourcePoolMetadata(org.apache.commons.dbcp2.BasicDataSource dataSource)DBCP typedDataSourcePoolMetadataobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetActive()Return the current number of active connections that have been allocated from the data source ornullif that information is not available.java.lang.BooleangetDefaultAutoCommit()The default auto-commit state of connections created by this pool.java.lang.IntegergetIdle()Return the number of idle connections in the pool.java.lang.IntegergetMax()Return the maximum number of active connections that can be allocated at the same time or-1if there is no limit.java.lang.IntegergetMin()Return the minimum number of idle connections in the pool ornullif that information is not available.java.lang.StringgetValidationQuery()Return the query to use to validate that a connection is valid ornullif that information is not available.-
Methods inherited from class io.micronaut.jdbc.metadata.AbstractDataSourcePoolMetadata
getDataSource, getUsage
-
-
-
-
Constructor Detail
-
DbcpDataSourcePoolMetadata
public DbcpDataSourcePoolMetadata(org.apache.commons.dbcp2.BasicDataSource dataSource)
DBCP typedDataSourcePoolMetadataobject.- Parameters:
dataSource- The datasource
-
-
Method Detail
-
getIdle
public java.lang.Integer getIdle()
Description copied from interface:DataSourcePoolMetadataReturn the number of idle connections in the pool.- Returns:
- the idle value
-
getActive
public java.lang.Integer getActive()
Description copied from interface:DataSourcePoolMetadataReturn the current number of active connections that have been allocated from the data source ornullif that information is not available.- Returns:
- the number of active connections or
null
-
getMax
public java.lang.Integer getMax()
Description copied from interface:DataSourcePoolMetadataReturn the maximum number of active connections that can be allocated at the same time or-1if there is no limit. Can also returnnullif that information is not available.- Returns:
- the maximum number of active connections or
null
-
getMin
public java.lang.Integer getMin()
Description copied from interface:DataSourcePoolMetadataReturn the minimum number of idle connections in the pool ornullif that information is not available.- Returns:
- the minimum number of active connections or
null
-
getValidationQuery
public java.lang.String getValidationQuery()
Description copied from interface:DataSourcePoolMetadataReturn the query to use to validate that a connection is valid ornullif that information is not available.- Returns:
- the validation query or
null
-
getDefaultAutoCommit
public java.lang.Boolean getDefaultAutoCommit()
Description copied from interface:DataSourcePoolMetadataThe default auto-commit state of connections created by this pool. If not set (null), default is JDBC driver default (If set to null then the java.sql.Connection.setAutoCommit(boolean) method will not be called.)- Returns:
- the default auto-commit state or
null
-
-