パッケージ org.postgresql.ds
クラス PGPooledConnection
java.lang.Object
org.postgresql.ds.PGPooledConnection
- すべての実装されたインタフェース:
PooledConnection
- 直系の既知のサブクラス:
PGXAConnection
PostgreSQL implementation of the PooledConnection interface. This shouldn't be used directly, as
the pooling client should just interact with the ConnectionPool instead.
-
コンストラクタの概要
コンストラクタコンストラクタ説明PGPooledConnection
(Connection con, boolean autoCommit) PGPooledConnection
(Connection con, boolean autoCommit, boolean isXA) Creates a new PooledConnection representing the specified physical connection. -
メソッドの概要
修飾子とタイプメソッド説明void
addConnectionEventListener
(ConnectionEventListener connectionEventListener) Adds a listener for close or fatal error events on the connection handed out to a client.void
void
close()
Closes the physical database connection represented by this PooledConnection.protected ConnectionEvent
createConnectionEvent
(@Nullable SQLException e) 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
-
コンストラクタの詳細
-
PGPooledConnection
Creates a new PooledConnection representing the specified physical connection.- パラメータ:
con
- connectionautoCommit
- whether to autocommitisXA
- whether connection is a XA connection
-
PGPooledConnection
-
-
メソッドの詳細
-
addConnectionEventListener
Adds a listener for close or fatal error events on the connection handed out to a client.- 定義:
addConnectionEventListener
インタフェース内PooledConnection
-
removeConnectionEventListener
Removes a listener for close or fatal error events on the connection handed out to a client.- 定義:
removeConnectionEventListener
インタフェース内PooledConnection
-
close
Closes the physical database connection represented by this PooledConnection. If any client has a connection based on this PooledConnection, it is forcibly closed as well.- 定義:
close
インタフェース内PooledConnection
- 例外:
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 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
インタフェース内PooledConnection
- 例外:
SQLException
-
createConnectionEvent
-
removeStatementEventListener
- 定義:
removeStatementEventListener
インタフェース内PooledConnection
-
addStatementEventListener
- 定義:
addStatementEventListener
インタフェース内PooledConnection
-