Class H2IdleConnectionCounter

java.lang.Object
org.hibernate.testing.jdbc.leak.H2IdleConnectionCounter
All Implemented Interfaces:
IdleConnectionCounter

public class H2IdleConnectionCounter extends Object implements IdleConnectionCounter
  • Field Details

  • Constructor Details

    • H2IdleConnectionCounter

      public H2IdleConnectionCounter()
  • Method Details

    • appliesTo

      public boolean appliesTo(Class<? extends Dialect> dialect)
      Description copied from interface: IdleConnectionCounter
      Specifies which Dialect the counter applies to.
      Specified by:
      appliesTo in interface IdleConnectionCounter
      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 interface IdleConnectionCounter
      Parameters:
      connection - current JDBC connection to be used for querying the number of idle connections.
      Returns:
      idle connection count.