Class HikariDataSourcePoolMetadata
- java.lang.Object
- org.springframework.boot.autoconfigure.jdbc.metadata.AbstractDataSourcePoolMetadata<com.zaxxer.hikari.HikariDataSource>
- org.springframework.boot.autoconfigure.jdbc.metadata.HikariDataSourcePoolMetadata
- All Implemented Interfaces:
DataSourcePoolMetadata
public class HikariDataSourcePoolMetadata extends AbstractDataSourcePoolMetadata<com.zaxxer.hikari.HikariDataSource>
DataSourcePoolMetadatafor a HikariDataSource.- Since:
- 1.2.0
Constructor Summary
Constructors Constructor Description HikariDataSourcePoolMetadata(com.zaxxer.hikari.HikariDataSource dataSource)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetActive()Return the current number of active connections that have been allocated from the data source ornullif that information is not available.IntegergetMax()Return the maximum number of active connections that can be allocated at the same time or-1if there is no limit.IntegergetMin()Return the minimum number of idle connections in the pool ornullif that information is not available.StringgetValidationQuery()Return the query to use to validate that a connection is valid ornullif that information is not available.Methods inherited from class org.springframework.boot.autoconfigure.jdbc.metadata.AbstractDataSourcePoolMetadata
getDataSource, getUsage
Constructor Detail
HikariDataSourcePoolMetadata
public HikariDataSourcePoolMetadata(com.zaxxer.hikari.HikariDataSource dataSource)
Method Detail
getActive
public 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 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 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 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