Package org.mariadb.jdbc
Class MariaDbPoolConnection
java.lang.Object
org.mariadb.jdbc.MariaDbPoolConnection
- All Implemented Interfaces:
PooledConnection,XAConnection
- Direct Known Subclasses:
MariaDbPoolPinnedConnection
MariaDB pool connection implementation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidclose()Close underlying connectionvoidFire connection close event to registered listeners.voidfireConnectionErrorOccurred(SQLException returnEx) Fire connection error event to registered listeners.voidfireStatementClosed(PreparedStatement statement) Fire statement close event to registered listeners.voidfireStatementErrorOccurred(PreparedStatement statement, SQLException returnEx) Fire statement error event to registered listeners.protected static StringflagsToString(int flags) protected static XAExceptionmapXaException(SQLException sqle) protected voidvoidvoidstatic StringxidToString(Xid xid) Create XID string
-
Constructor Details
-
MariaDbPoolConnection
Constructor.- Parameters:
connection- connection to retrieve connection options
-
-
Method Details
-
xidToString
Create XID string- Parameters:
xid- xid value- Returns:
- XID string
-
getConnection
- Specified by:
getConnectionin interfacePooledConnection
-
addConnectionEventListener
- Specified by:
addConnectionEventListenerin interfacePooledConnection
-
removeConnectionEventListener
- Specified by:
removeConnectionEventListenerin interfacePooledConnection
-
addStatementEventListener
- Specified by:
addStatementEventListenerin interfacePooledConnection
-
removeStatementEventListener
- Specified by:
removeStatementEventListenerin interfacePooledConnection
-
fireStatementClosed
Fire statement close event to registered listeners.- Parameters:
statement- closing statement
-
fireStatementErrorOccurred
Fire statement error event to registered listeners.- Parameters:
statement- closing statementreturnEx- exception
-
fireConnectionClosed
Fire connection close event to registered listeners.- Parameters:
event- close connection event
-
fireConnectionErrorOccurred
Fire connection error event to registered listeners.- Parameters:
returnEx- exception
-
close
Close underlying connection- Specified by:
closein interfacePooledConnection- Throws:
SQLException- if close fails
-
realClose
- Throws:
SQLException
-
getXAResource
- Specified by:
getXAResourcein interfaceXAConnection
-
mapXaException
-
flagsToString
-