com.mchange.v2.c3p0

Interface ConnectionTester

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 QueryConnectionTester.

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

Field Summary
static intCONNECTION_IS_INVALID
static intCONNECTION_IS_OKAY
static intDATABASE_IS_INVALID
Method Summary
intactiveCheckConnection(Connection c)
booleanequals(Object o)
Multiple testers that are of the same class and use the same criteria for determining fatality should test as equals().
inthashCode()
keep consistent with equals()
intstatusOnException(Connection c, Throwable t)

Field Detail

CONNECTION_IS_INVALID

public static final int CONNECTION_IS_INVALID

CONNECTION_IS_OKAY

public static final int CONNECTION_IS_OKAY

DATABASE_IS_INVALID

public static final int DATABASE_IS_INVALID

Method Detail

activeCheckConnection

public int activeCheckConnection(Connection c)

equals

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

hashCode

public int hashCode()
keep consistent with equals()

statusOnException

public int statusOnException(Connection c, Throwable t)