Package org.hibernate.testing.jdbc.leak
Class OracleIdleConnectionCounter
- java.lang.Object
-
- org.hibernate.testing.jdbc.leak.OracleIdleConnectionCounter
-
- All Implemented Interfaces:
IdleConnectionCounter
public class OracleIdleConnectionCounter extends Object implements IdleConnectionCounter
-
-
Field Summary
Fields Modifier and Type Field Description static IdleConnectionCounter
INSTANCE
-
Constructor Summary
Constructors Constructor Description OracleIdleConnectionCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
appliesTo(Class<? extends Dialect> dialect)
Specifies which Dialect the counter applies to.int
count(Connection connection)
Count the number of idle connections.
-
-
-
Field Detail
-
INSTANCE
public static final IdleConnectionCounter INSTANCE
-
-
Method Detail
-
appliesTo
public boolean appliesTo(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(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.
-
-