Interface ConnectionTester

All Superinterfaces:
Serializable
All Known Subinterfaces:
FullQueryConnectionTester, QueryConnectionTester, UnifiedConnectionTester
All Known Implementing Classes:
AbstractConnectionTester

public interface ConnectionTester extends Serializable

Define your own Connection tester if you want to override c3p0's default behavior for testing the validity of Connections and responding to Connection errors encountered.

Recommended: If you'd like your ConnectionTester to support the user-configured preferredTestQuery parameter, please implement UnifiedConnectionTester.

ConnectionTesters should be Serializable, immutable, and must have public, no-arg constructors.

See Also:
  • Field Details

  • Method Details

    • activeCheckConnection

      int activeCheckConnection(Connection c)
    • statusOnException

      int statusOnException(Connection c, Throwable t)
    • equals

      boolean equals(Object o)
      Multiple testers that are of the same class and use the same criteria for determining fatality should test as equals().
      Overrides:
      equals in class Object
    • hashCode

      int hashCode()
      keep consistent with equals()
      Overrides:
      hashCode in class Object