Class DatabricksPooledConnection
java.lang.Object
com.databricks.jdbc.pooling.DatabricksPooledConnection
- All Implemented Interfaces:
PooledConnection
-
Constructor Summary
ConstructorsConstructorDescriptionDatabricksPooledConnection(Connection physicalConnection) Creates a new PooledConnection representing the specified physical connection. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnectionEventListener(ConnectionEventListener connectionEventListener) voidvoidclose()Close the physical connection once the pooled connection is closedGets a handle for a client to use.voidremoveConnectionEventListener(ConnectionEventListener connectionEventListener) void
-
Constructor Details
-
DatabricksPooledConnection
Creates a new PooledConnection representing the specified physical connection.- Parameters:
physicalConnection- connection
-
-
Method Details
-
addConnectionEventListener
- Specified by:
addConnectionEventListenerin interfacePooledConnection
-
removeConnectionEventListener
- Specified by:
removeConnectionEventListenerin interfacePooledConnection
-
removeStatementEventListener
- Specified by:
removeStatementEventListenerin interfacePooledConnection
-
addStatementEventListener
- Specified by:
addStatementEventListenerin interfacePooledConnection
-
close
Close the physical connection once the pooled connection is closed- Specified by:
closein interfacePooledConnection- Throws:
SQLException
-
getConnection
Gets a handle for a client to use. This is a wrapper around the physical connection, so the client can call close, and it will just return the connection to the pool without really closing the physical connection.According to the JDBC 4.3 Optional Package spec (11.4), only one client may have an active handle to the connection at a time, so if there is a previous handle active when this is called, the previous one is forcibly closed.
- Specified by:
getConnectionin interfacePooledConnection- Throws:
SQLException
-
getPhysicalConnection
-