BuiltStatement. Use
CachedPreparedStatementCreator.@Deprecated public class CachedPreparedStatementCreator extends Object implements PreparedStatementCreator
PreparedStatementCreator maintains a static cache of all prepared statements for the duration of the JVM
runtime, more specific the lifecycle of the associated ClassLoader. When preparing statements with Cassandra,
each Statement should be prepared once and only once due to the overhead of preparing the statement.
CachedPreparedStatementCreator is thread-safe and does not require external synchronization when used by
concurrent threads.
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log
Deprecated.
|
| Constructor and Description |
|---|
CachedPreparedStatementCreator(String cql)
Deprecated.
Create a
PreparedStatementCreator from the provided CQL. |
| Modifier and Type | Method and Description |
|---|---|
com.datastax.driver.core.PreparedStatement |
createPreparedStatement(com.datastax.driver.core.Session session)
Deprecated.
Create a statement in this session.
|
String |
getCql()
Deprecated.
Returns the CQL statement on which the
PreparedStatement will be based. |
public CachedPreparedStatementCreator(String cql)
PreparedStatementCreator from the provided CQL.cql - must not be empty or null.public String getCql()
PreparedStatement will be based.PreparedStatement.public com.datastax.driver.core.PreparedStatement createPreparedStatement(com.datastax.driver.core.Session session)
throws com.datastax.driver.core.exceptions.DriverException
PreparedStatementCreatorPreparedStatement.createPreparedStatement in interface PreparedStatementCreatorsession - Session to use to create statement.com.datastax.driver.core.exceptions.DriverException - there is no need to catch DriverException that may be thrown in the implementation
of this method. The CqlTemplate class will handle them.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.