Package org.hibernate.testing.jdbc.leak
Interface IdleConnectionCounter
-
- All Known Implementing Classes:
H2IdleConnectionCounter,MySQLIdleConnectionCounter,OracleIdleConnectionCounter,PostgreSQLIdleConnectionCounter
public interface IdleConnectionCounter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanappliesTo(Class<? extends org.hibernate.dialect.Dialect> dialect)Specifies which Dialect the counter applies to.intcount(Connection connection)Count the number of idle connections.
-
-
-
Method Detail
-
appliesTo
boolean appliesTo(Class<? extends org.hibernate.dialect.Dialect> dialect)
Specifies which Dialect the counter applies to.- Parameters:
dialect- dialect- Returns:
- applicability.
-
count
int count(Connection connection)
Count the number of idle connections.- Parameters:
connection- current JDBC connection to be used for querying the number of idle connections.- Returns:
- idle connection count.
-
-