|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||
java.lang.Objectorg.apache.commons.dbcp.AbandonedTrace
org.apache.commons.dbcp.DelegatingConnection
org.apache.commons.dbcp.PoolingConnection
PreparedStatement をプールする DelegatingConnection です。
prepareStatement(java.lang.String) メソッドは毎回新たな PreparedStatement
を生成せず、未使用のステートメントのプールから PreparedStatement を取り出します。
返された PreparedStatement の Statement.close()
メソッドは実際にはステートメントをクローズせず、プールに自身を戻します。(PoolablePreparedStatement を参照)
PoolablePreparedStatement | フィールドの概要 | |
protected org.apache.commons.pool.KeyedObjectPool |
_pstmtPool
PreparedStatement のプールです。 |
| クラス org.apache.commons.dbcp.DelegatingConnection から継承したフィールド |
_closed, _conn |
| インタフェース java.sql.Connection から継承したフィールド |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| コンストラクタの概要 | |
PoolingConnection(Connection c)
コンストラクタ。 |
|
PoolingConnection(Connection c,
org.apache.commons.pool.KeyedObjectPool pool)
コンストラクタ。 |
|
| メソッドの概要 | |
void |
activateObject(Object key,
Object obj)
PreparedStatement をアクティブにするための KeyedPoolableObjectFactory インターフェイスのメソッドです。
|
void |
close()
プール内の PreparedStatement をクローズ、開放し、内部に保持するコネクションをクローズします。
|
protected Object |
createKey(String sql)
渡された引数から PoolingConnection.PStmtKey を生成します。
|
protected Object |
createKey(String sql,
int resultSetType,
int resultSetConcurrency)
渡された引数から PoolingConnection.PStmtKey を生成します。
|
void |
destroyObject(Object key,
Object obj)
PreparedStatement を破棄するための KeyedPoolableObjectFactory インターフェイスのメソッドです。
|
Object |
makeObject(Object obj)
PreparedStatement を生成するための KeyedPoolableObjectFactory インターフェイスのメソッドです。
|
protected String |
normalizeSQL(String sql)
渡されたSQLステートメントを標準化し、元と同じ意味を持つ標準的なフォームを生成します。 |
void |
passivateObject(Object key,
Object obj)
PreparedStatement を非活性化するための KeyedPoolableObjectFactory インターフェイスのメソッドです。
|
PreparedStatement |
prepareStatement(String sql)
プールから PreparedStatement を生成、または取得します。
|
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
プールから PreparedStatement を生成、または取得します。
|
String |
toString()
|
boolean |
validateObject(Object key,
Object obj)
PreparedStatement をチェックするための KeyedPoolableObjectFactory インターフェイスのメソッドです。
|
| クラス org.apache.commons.dbcp.DelegatingConnection から継承したメソッド |
activate, checkOpen, clearWarnings, commit, createStatement, createStatement, getAutoCommit, getCatalog, getDelegate, getInnermostDelegate, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, passivate, prepareCall, prepareCall, rollback, setAutoCommit, setCatalog, setDelegate, setReadOnly, setTransactionIsolation, setTypeMap |
| クラス org.apache.commons.dbcp.AbandonedTrace から継承したメソッド |
addTrace, clearTrace, getConfig, getLastUsed, getTrace, printStackTrace, removeTrace, setLastUsed, setLastUsed, setStackTrace |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| フィールドの詳細 |
protected org.apache.commons.pool.KeyedObjectPool _pstmtPool
PreparedStatement のプールです。
| コンストラクタの詳細 |
public PoolingConnection(Connection c)
c - 内部に保持する Connection.
public PoolingConnection(Connection c,
org.apache.commons.pool.KeyedObjectPool pool)
c - 内部に保持する Connection.
| メソッドの詳細 |
public void activateObject(Object key,
Object obj)
PreparedStatement をアクティブにするための KeyedPoolableObjectFactory インターフェイスのメソッドです。
現状では何も行いません。
org.apache.commons.pool.KeyedPoolableObjectFactory 内の activateObjectkey - 無視されます
obj - PreparedStatement
public void close()
throws SQLException
PreparedStatement をクローズ、開放し、内部に保持するコネクションをクローズします。
Connection 内の closeDelegatingConnection 内の closeSQLExceptionprotected Object createKey(String sql)
PoolingConnection.PStmtKey を生成します。
}
protected Object createKey(String sql,
int resultSetType,
int resultSetConcurrency)
PoolingConnection.PStmtKey を生成します。
}
public void destroyObject(Object key,
Object obj)
PreparedStatement を破棄するための KeyedPoolableObjectFactory インターフェイスのメソッドです。
org.apache.commons.pool.KeyedPoolableObjectFactory 内の destroyObjectkey - 無視されます
obj - 破棄する PreparedStatement
public Object makeObject(Object obj)
PreparedStatement を生成するための KeyedPoolableObjectFactory インターフェイスのメソッドです。
org.apache.commons.pool.KeyedPoolableObjectFactory 内の makeObjectobj - PreparedStatement を生成するためのキー
protected String normalizeSQL(String sql)
public void passivateObject(Object key,
Object obj)
PreparedStatement を非活性化するための KeyedPoolableObjectFactory インターフェイスのメソッドです。
現状では PreparedStatement.clearParameters() を行います。
org.apache.commons.pool.KeyedPoolableObjectFactory 内の passivateObjectkey - 無視されます
obj - PreparedStatement
public PreparedStatement prepareStatement(String sql)
throws SQLException
PreparedStatement を生成、または取得します。
Connection 内の prepareStatementDelegatingConnection 内の prepareStatementPoolablePreparedStatement
SQLException
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
throws SQLException
PreparedStatement を生成、または取得します。
Connection 内の prepareStatementDelegatingConnection 内の prepareStatementPoolablePreparedStatement
SQLExceptionpublic String toString()
public boolean validateObject(Object key,
Object obj)
PreparedStatement をチェックするための KeyedPoolableObjectFactory インターフェイスのメソッドです。
PreparedStatements.}
org.apache.commons.pool.KeyedPoolableObjectFactory 内の validateObjectkey - 無視されます
obj - 無視されます
|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||