java.lang.Object
com.aoapps.sql.wrapper.DriverWrapper
com.aoapps.sql.failfast.FailFastDriver
com.aoapps.sql.failfast.Driver
- All Implemented Interfaces:
Driver
A registered driver that makes connections obtained from other drivers
perform in a fail-fast manner. All access to the connection will fail once a
SQLException
has been thrown
by the underlying driver, with this state only being cleared by rollback.- Author:
- AO Industries, Inc.
-
Constructor Summary
-
Method Summary
Methods inherited from class com.aoapps.sql.failfast.FailFastDriver
newConnectionWrapper
Methods inherited from class com.aoapps.sql.wrapper.DriverWrapper
acceptsURL, connect, getDriverMajorVersion, getDriverMinorVersion, getDriverName, getDriverVersion, getPropertyInfo, jdbcCompliant, onDeregister, toString, toWrappedUrl, toWrapperUrl, wrapConnection
-
Constructor Details
-
Driver
public Driver()Public constructor required for service loader.- See Also:
-
-
Method Details
-
register
Registers the driver if not yet already registered. This is done automatically during class initialization.- Returns:
true
when an new driver instance is registered, orfalse
when already registered.- Throws:
SQLException
- See Also:
-
deregister
Deregisters the driver if currently registered.- Returns:
true
when the driver instance is deregistered, orfalse
when nothing to deregister.- Throws:
SQLException
- See Also:
-
getUrlPrefix
- Specified by:
getUrlPrefix
in classDriverWrapper
-
getVersion
- Specified by:
getVersion
in classDriverWrapper
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersion
in interfaceDriver
- Specified by:
getMajorVersion
in classDriverWrapper
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersion
in interfaceDriver
- Specified by:
getMinorVersion
in classDriverWrapper
-
getParentLogger
- Specified by:
getParentLogger
in interfaceDriver
- Specified by:
getParentLogger
in classDriverWrapper
-