Class AbstractConnectionCustomizer
java.lang.Object
com.mchange.v2.c3p0.AbstractConnectionCustomizer
- All Implemented Interfaces:
ConnectionCustomizer
- Direct Known Subclasses:
InitSqlConnectionCustomizer
An abstract implementation of the
ConnectionCustomizer interface
in which all methods are no-ops.
Just a convenience class since
most clients will only need to
implement a single method.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected MapextensionsForToken(String parentDataSourceIdentityToken) inthashCode()voidonAcquire(Connection c, String parentDataSourceIdentityToken) Called immediately after a Connection is acquired from the underlying database for incorporation into the pool.voidonCheckIn(Connection c, String parentDataSourceIdentityToken) Called immediately after a Connection is checked in, prior to reincorporation into the pool.voidonCheckOut(Connection c, String parentDataSourceIdentityToken) Called immediately before a Connection is made available to a client upon checkout.voidonDestroy(Connection c, String parentDataSourceIdentityToken) Called immediately before a Connection is destroyed after being removed from the pool.
-
Constructor Details
-
AbstractConnectionCustomizer
public AbstractConnectionCustomizer()
-
-
Method Details
-
extensionsForToken
-
onAcquire
Description copied from interface:ConnectionCustomizerCalled immediately after a Connection is acquired from the underlying database for incorporation into the pool.
This method is only called once per Connection. If standard JDBC Connection properties are modified — specifically catalog, holdability, transactionIsolation, readOnly, and typeMap — those modifications will override defaults throughout the Connection's tenure in the pool.
- Specified by:
onAcquirein interfaceConnectionCustomizer- Throws:
Exception
-
onDestroy
Description copied from interface:ConnectionCustomizerCalled immediately before a Connection is destroyed after being removed from the pool.- Specified by:
onDestroyin interfaceConnectionCustomizer- Throws:
Exception
-
onCheckOut
Description copied from interface:ConnectionCustomizerCalled immediately before a Connection is made available to a client upon checkout.- Specified by:
onCheckOutin interfaceConnectionCustomizer- Throws:
Exception
-
onCheckIn
Description copied from interface:ConnectionCustomizerCalled immediately after a Connection is checked in, prior to reincorporation into the pool.- Specified by:
onCheckInin interfaceConnectionCustomizer- Throws:
Exception
-
equals
-
hashCode
-