Package org.hibernate.testing.jdbc.leak
Class H2IdleConnectionCounter
- java.lang.Object
-
- org.hibernate.testing.jdbc.leak.H2IdleConnectionCounter
-
- All Implemented Interfaces:
IdleConnectionCounter
public class H2IdleConnectionCounter extends java.lang.Object implements IdleConnectionCounter
-
-
Field Summary
Fields Modifier and Type Field Description static IdleConnectionCounter
INSTANCE
-
Constructor Summary
Constructors Constructor Description H2IdleConnectionCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
appliesTo(java.lang.Class<? extends Dialect> dialect)
Specifies which Dialect the counter applies to.int
count(java.sql.Connection connection)
Count the number of idle connections.
-
-
-
Field Detail
-
INSTANCE
public static final IdleConnectionCounter INSTANCE
-
-
Method Detail
-
appliesTo
public boolean appliesTo(java.lang.Class<? extends Dialect> dialect)
Description copied from interface:IdleConnectionCounter
Specifies which Dialect the counter applies to.- Specified by:
appliesTo
in interfaceIdleConnectionCounter
- Parameters:
dialect
- dialect- Returns:
- applicability.
-
count
public int count(java.sql.Connection connection)
Description copied from interface:IdleConnectionCounter
Count the number of idle connections.- Specified by:
count
in interfaceIdleConnectionCounter
- Parameters:
connection
- current JDBC connection to be used for querying the number of idle connections.- Returns:
- idle connection count.
-
-