public class RedshiftPooledConnection extends Object implements PooledConnection
RedshiftConnectionPoolDataSource| Constructor and Description |
|---|
RedshiftPooledConnection(Connection con,
boolean autoCommit) |
RedshiftPooledConnection(Connection con,
boolean autoCommit,
boolean isXA)
Creates a new PooledConnection representing the specified physical connection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionEventListener(ConnectionEventListener connectionEventListener)
Adds a listener for close or fatal error events on the connection handed out to a client.
|
void |
addStatementEventListener(StatementEventListener listener) |
void |
close()
Closes the physical database connection represented by this PooledConnection.
|
protected ConnectionEvent |
createConnectionEvent(SQLException e) |
Connection |
getConnection()
Gets a handle for a client to use.
|
void |
removeConnectionEventListener(ConnectionEventListener connectionEventListener)
Removes a listener for close or fatal error events on the connection handed out to a client.
|
void |
removeStatementEventListener(StatementEventListener listener) |
public RedshiftPooledConnection(Connection con, boolean autoCommit, boolean isXA)
con - connectionautoCommit - whether to autocommitisXA - whether connection is a XA connectionpublic RedshiftPooledConnection(Connection con, boolean autoCommit)
public void addConnectionEventListener(ConnectionEventListener connectionEventListener)
addConnectionEventListener in interface PooledConnectionpublic void removeConnectionEventListener(ConnectionEventListener connectionEventListener)
removeConnectionEventListener in interface PooledConnectionpublic void close()
throws SQLException
close in interface PooledConnectionSQLExceptionpublic Connection getConnection() throws SQLException
According to the JDBC 2.0 Optional Package spec (6.2.3), 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 and its work rolled back.
getConnection in interface PooledConnectionSQLExceptionprotected ConnectionEvent createConnectionEvent(SQLException e)
public void removeStatementEventListener(StatementEventListener listener)
removeStatementEventListener in interface PooledConnectionpublic void addStatementEventListener(StatementEventListener listener)
addStatementEventListener in interface PooledConnectionCopyright © 2024 Amazon.com Inc.. All rights reserved.