Class PostgreSQLIdleConnectionCounter

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

public class PostgreSQLIdleConnectionCounter extends Object implements IdleConnectionCounter
  • Field Details

  • Constructor Details

    • PostgreSQLIdleConnectionCounter

      public PostgreSQLIdleConnectionCounter()
  • 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.