クラス CachedPreparedStatementCreator
java.lang.ObjectSE
org.springframework.data.cassandra.core.cql.support.CachedPreparedStatementCreator
- 実装されたすべてのインターフェース:
PreparedStatementCreator
@DeprecatedSE
public class CachedPreparedStatementCreator
extends ObjectSE
implements PreparedStatementCreator
使用すべきではありません。
3.2 以降、Cassandra ドライバーにはプリペアドステートメントキャッシュが組み込まれており、プリペアドステートメントの外部キャッシュが不要になります。
準備されたステートメントのキャッシュを使用した
PreparedStatementCreator
実装。 通常の CQL ステートメントは、最初の使用時に準備され、準備されたステートメントとして実行されます。準備されたステートメントは、ステートメントを再準備できるようにドライバー内で、および PreparedStatementCache
を使用してこの CachedPreparedStatementCreator
内で、Cassandra 自体によってキャッシュされます (無効化 / 削除可能)。
- 導入:
- 2.0
- 作成者:
- Mark Paluch
- 関連事項:
コンストラクターのサマリー
コンストラクター修飾子コンストラクター説明protected
CachedPreparedStatementCreator
(PreparedStatementCache cache, com.datastax.oss.driver.api.core.cql.SimpleStatement statement) 使用すべきではありません。新しいCachedPreparedStatementCreator
を作成します。メソッドのサマリー
修飾子と型メソッド説明com.datastax.oss.driver.api.core.cql.PreparedStatement
createPreparedStatement
(com.datastax.oss.driver.api.core.CqlSession session) 使用すべきではありません。このセッションでステートメントを作成します。getCache()
使用すべきではありません。of
(PreparedStatementCache cache, com.datastax.oss.driver.api.core.cql.SimpleStatement statement) 使用すべきではありません。of
(PreparedStatementCache cache, StringSE cql) 使用すべきではありません。of
(PreparedStatementCache cache, StringSE cql, QueryOptions queryOptions) 使用すべきではありません。
コンストラクターの詳細
CachedPreparedStatementCreator
protected CachedPreparedStatementCreator(PreparedStatementCache cache, com.datastax.oss.driver.api.core.cql.SimpleStatement statement) 使用すべきではありません。新しいCachedPreparedStatementCreator
を作成します。- パラメーター:
cache
- null であってはなりません。statement
- null であってはなりません。
メソッドの詳細
of
public static CachedPreparedStatementCreator of(PreparedStatementCache cache, com.datastax.oss.driver.api.core.cql.SimpleStatement statement) 使用すべきではありません。準備するPreparedStatementCache
とSimpleStatement
を指定して、新しいCachedPreparedStatementCreator
を作成します。後続の呼び出しでは、キャッシュヒットの同じ CQL テストで指定されたSimpleStatement
オブジェクトが必要です。そうでない場合、ステートメントは再準備される可能性があります。- パラメーター:
cache
- null であってはなりません。statement
- null であってはなりません。- 戻り値:
Statement
のCachedPreparedStatementCreator
。
of
使用すべきではありません。準備のために、PreparedStatementCache
とcql
を指定して新しいCachedPreparedStatementCreator
を作成します。後続の呼び出しでは、キャッシュヒットのために以前に使用した CQL 文字列にare equal
SE する指定された CQL ステートメントが必要です。そうでない場合、ステートメントは再準備される可能性があります。- パラメーター:
cache
- null であってはなりません。cql
- null または空であってはなりません。- 戻り値:
cql
のCachedPreparedStatementCreator
。
of
public static CachedPreparedStatementCreator of(PreparedStatementCache cache, StringSE cql, QueryOptions queryOptions) 使用すべきではありません。準備するPreparedStatementCache
とcql
を指定して、新しいCachedPreparedStatementCreator
を作成します。このメソッドは、準備する前にQueryOptions
をSimpleStatement
に適用します。後続の呼び出しでは、キャッシュヒットのために、以前に使用した CQL 文字列にare equal
SE を適用する CQL ステートメントが必要です。そうでない場合、ステートメントは再準備される可能性があります。- パラメーター:
cache
- null であってはなりません。cql
- null または空であってはなりません。queryOptions
- null であってはなりません。- 戻り値:
cql
のCachedPreparedStatementCreator
。
getCache
使用すべきではありません。- 戻り値:
- 基礎となる
PreparedStatementCache
。
createPreparedStatement
public com.datastax.oss.driver.api.core.cql.PreparedStatement createPreparedStatement(com.datastax.oss.driver.api.core.CqlSession session) throws com.datastax.oss.driver.api.core.DriverException 使用すべきではありません。インターフェースからコピーされた説明:PreparedStatementCreator
このセッションでステートメントを作成します。実装でPreparedStatement
を使用できるようにします。- 次で指定:
- インターフェース
PreparedStatementCreator
のcreatePreparedStatement
- パラメーター:
session
- ステートメントを作成するために使用するCqlSession
。- 戻り値:
- 準備された声明。
- 例外:
com.datastax.oss.driver.api.core.DriverException
- このメソッドの実装でスローされる可能性のあるDriverException
をキャッチする必要はありません。CqlTemplate
クラスが処理します。