R - The type of result returned when executing this statementF - The type of future result returned when executing this statementT - The type of POJO associated with this statementpublic abstract class SequenceStatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T> extends StatementImpl<R,F,T>
SequenceStatementImpl abstract class extends the StatementImpl
class to provide support for a statement that represents a sequence (not a
batch) of statements that must be executed one after the other.bridge, CI_PREFIX, idempotent, isCounterOp, mgr, MK_PREFIX, resultClass, simpleSize, UDT_C_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
SequenceStatementImpl(Class<R> resultClass,
ClassInfoImpl.Context context,
StatementManagerImpl mgr,
StatementBridge bridge)
Instantiates a new
SequenceStatementImpl object. |
protected |
SequenceStatementImpl(Class<R> resultClass,
String keyspace,
StatementManagerImpl mgr,
StatementBridge bridge)
Instantiates a new
SequenceStatementImpl object. |
protected |
SequenceStatementImpl(SequenceStatementImpl<R,F,T> sequence)
Instantiates a new
SequenceStatementImpl object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendGroupType(StringBuilder builder)
Appends the type of group this is; used when building a query string.
|
protected StringBuilder[] |
buildQueryStrings()
Builds the query strings (one per underlying statement) to be collected if
the statement represents some a batch, sequence, or a group statement.
|
protected abstract List<StatementImpl<?,?,?>> |
buildSequencedStatements()
Gets all underlying sequenced statements recursively in the proper order
for this statement.
|
protected List<StatementImpl<?,?,?>> |
buildStatements()
Gets all underlying statements or this statement if none contained within.
|
protected com.datastax.driver.core.ResultSetFuture |
executeAsyncRaw0()
Executes the provided statement asynchronously and returned a raw result set.
|
Boolean |
isIdempotent() |
protected void |
setDirty()
Sets the dirty bit for the cached query string and clear the number of
statements.
|
protected int |
simpleSize()
Gets the number of simple statements in this statement.
|
appendGroupSubType, appendOptions, buildQueryString, clearKeyspace, disable, disableErrorTracing, disableTracing, enable, enableErrorTracing, enableErrorTracing, enableTracing, enableTracing, execute, executeAsync, executeAsync0, executeAsyncRaw, executeRaw, getClassInfo, getClassInfoImpl, getConsistencyLevel, getContext, getDefaultTimestamp, getFetchSize, getKeyspace, getObject, getObjectClass, getPOJOContext, getQueryString, getReadTimeoutMillis, getRetryPolicy, getSerialConsistencyLevel, getUserData, init, init, isCounterOp, isDirty, isEnabled, isErrorTracing, isTracing, setConsistencyLevel, setCounterOp, setDefaultTimestamp, setDirty, setFetchSize, setIdempotent, setReadTimeoutMillis, setRetryPolicy, setSerialConsistencyLevel, setUserData, toStringprotected SequenceStatementImpl(Class<R> resultClass, ClassInfoImpl.Context context, StatementManagerImpl mgr, StatementBridge bridge)
SequenceStatementImpl object.resultClass - the result class from the execution of this statementcontext - the class info context for the POJO associated with this
statement or null if this statement is not associated
with a POJOmgr - the non-null statement managerbridge - the non-null statement bridgeNullPointerException - if resultClass is nullIllegalArgumentException - if the result class is not a supported oneprotected SequenceStatementImpl(Class<R> resultClass, String keyspace, StatementManagerImpl mgr, StatementBridge bridge)
SequenceStatementImpl object.resultClass - the result class from the execution of this statementkeyspace - the keyspace for this statement if knownmgr - the non-null statement managerbridge - the non-null statement bridgeNullPointerException - if resultClass is nullIllegalArgumentException - if the result class is not a supported oneprotected SequenceStatementImpl(SequenceStatementImpl<R,F,T> sequence)
SequenceStatementImpl object.sequence - the non-null statement being copied or
wrappedprotected abstract List<StatementImpl<?,?,?>> buildSequencedStatements()
null list of all underlying statements from this
statementprotected void appendGroupType(StringBuilder builder)
appendGroupType in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>builder - the builder to which to append the type of groupStatementImpl.appendGroupType(java.lang.StringBuilder)protected final List<StatementImpl<?,?,?>> buildStatements()
Note: Any statements that contains other statements should be flattened out based on its type. For example, a batch will flattened out all included batches recursively. A sequence will do the same with contained sequences but not with contained groups or batches. A group will do the same with contained groups but not with contained sequences or batches.
buildStatements in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>null list of all underlying statements from this
statementStatementImpl.buildStatements()protected final int simpleSize()
simpleSize in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.simpleSize()protected final StringBuilder[] buildQueryStrings()
buildQueryStrings in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>null if nothing to batchStatementImpl.buildQueryStrings()protected void setDirty()
setDirty in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setDirty()protected com.datastax.driver.core.ResultSetFuture executeAsyncRaw0()
ResultSetFuture.
Note that for queries that doesn't return a result (INSERT, UPDATE and
DELETE), you will need to access the ResultSetFuture (that is call one of
its get method) to make sure the statement was successful.executeAsyncRaw0 in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.executeAsyncRaw0()public Boolean isIdempotent()
isIdempotent in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>isIdempotent in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.isIdempotent()Copyright (C) 2015-2017 The Helenus Driver Project Authors.