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 statementS - The type of statement encapsulatedpublic abstract class ForwardingStatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T,S extends StatementImpl<R,F,T>> extends StatementImpl<R,F,T>
ForwardingStatementImpl class defines a utility class to
create a statement that encapsulate another one.| Modifier and Type | Field and Description |
|---|---|
protected S |
statement
Holds the encapsulated statement.
|
bridge, CI_PREFIX, idempotent, isCounterOp, mgr, MK_PREFIX, resultClass, simpleSize, UDT_C_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
ForwardingStatementImpl(S statement)
Instantiates a new
ForwardingStatementImpl object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendGroupSubType(StringBuilder builder)
Appends the sub-type of group this is; used when building a query string.
|
protected void |
appendGroupType(StringBuilder builder)
Appends the type of group this is; used when building a query string.
|
protected void |
appendOptions(StringBuilder builder)
Called to append options to the query string when building a batch.
|
protected StringBuilder |
buildQueryString()
Builds the 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 List<StatementImpl<?,?,?>> |
buildStatements()
Gets all underlying statements or this statement if none contained within.
|
GenericStatement<R,F> |
disable() |
GenericStatement<R,F> |
disableErrorTracing() |
GenericStatement<R,F> |
disableTracing() |
GenericStatement<R,F> |
enable() |
GenericStatement<R,F> |
enableErrorTracing() |
GenericStatement<R,F> |
enableErrorTracing(String prefix) |
GenericStatement<R,F> |
enableTracing() |
GenericStatement<R,F> |
enableTracing(String prefix) |
R |
execute() |
F |
executeAsync() |
com.datastax.driver.core.ResultSetFuture |
executeAsyncRaw() |
com.datastax.driver.core.ResultSet |
executeRaw() |
com.datastax.driver.core.ConsistencyLevel |
getConsistencyLevel() |
ClassInfoImpl.Context |
getContext()
Gets the context associated with the POJO class for this statement or
null if this statement is not associated with a POJO class. |
long |
getDefaultTimestamp() |
int |
getFetchSize() |
String |
getKeyspace() |
Class<T> |
getObjectClass()
Gets the class of POJO for this statement or
null if this
statement is not associated with a POJO class. |
ClassInfoImpl.POJOContext |
getPOJOContext()
Gets the POJO context associated with the POJO class for this statement
or
null if this statement is not associated with a POJO object. |
String |
getQueryString() |
int |
getReadTimeoutMillis() |
com.datastax.driver.core.policies.RetryPolicy |
getRetryPolicy() |
com.datastax.driver.core.ConsistencyLevel |
getSerialConsistencyLevel() |
<U> U |
getUserData() |
protected boolean |
isCounterOp()
Checks if we encountered a counter assignment operation.
|
protected boolean |
isDirty()
Gets the dirty bit for the cached query string.
|
boolean |
isEnabled() |
boolean |
isErrorTracing() |
Boolean |
isIdempotent() |
boolean |
isTracing() |
GenericStatement<R,F> |
setConsistencyLevel(com.datastax.driver.core.ConsistencyLevel consistency) |
protected void |
setCounterOp(boolean isCounterOp)
Sets a flag indicating we have a counter assignment operation.
|
GenericStatement<R,F> |
setDefaultTimestamp(long defaultTimestamp) |
protected void |
setDirty()
Sets the dirty bit for the cached query string and clear the number of
statements.
|
protected void |
setDirty(boolean recurse)
Sets the dirty bit for the cached query string and clear the number of
statements potentially recursively for all contained statement.
|
GenericStatement<R,F> |
setFetchSize(int fetchSize) |
GenericStatement<R,F> |
setIdempotent(boolean idempotent) |
GenericStatement<R,F> |
setReadTimeoutMillis(int readTimeoutMillis) |
GenericStatement<R,F> |
setRetryPolicy(com.datastax.driver.core.policies.RetryPolicy policy) |
GenericStatement<R,F> |
setSerialConsistencyLevel(com.datastax.driver.core.ConsistencyLevel serialConsistency) |
<U> void |
setUserData(U data) |
protected int |
simpleSize()
Gets the number of simple statements in this statement.
|
clearKeyspace, executeAsync0, executeAsyncRaw0, getClassInfo, getClassInfoImpl, getObject, init, init, toStringprotected S extends StatementImpl<R,F,T> statement
protected ForwardingStatementImpl(S statement)
ForwardingStatementImpl object.statement - the encapsulated statementprotected 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 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 void appendGroupSubType(StringBuilder builder)
appendGroupSubType in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>builder - the builder to which to append the sub-type of groupStatementImpl.appendGroupSubType(java.lang.StringBuilder)protected void appendOptions(StringBuilder builder)
appendOptions in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>builder - the builder to which to append optionsStatementImpl.appendOptions(java.lang.StringBuilder)protected 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 StringBuilder buildQueryString()
buildQueryString in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>null
if there is no query builtStatementImpl.buildQueryString()protected void setDirty()
setDirty in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setDirty()protected void setDirty(boolean recurse)
setDirty in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>recurse - true to recursively set the dirty bit;
false to simply set this statement dirty bitStatementImpl.setDirty(boolean)protected boolean isDirty()
isDirty in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>true if the cache is dirty; false
otherwiseStatementImpl.isDirty()protected int simpleSize()
simpleSize in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.simpleSize()protected boolean isCounterOp()
isCounterOp in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>true if we encountered a counter assignment operation;
false otherwiseStatementImpl.isCounterOp()protected void setCounterOp(boolean isCounterOp)
setCounterOp in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>isCounterOp - true if we are encountering a counter
assignment operation; false otherwiseStatementImpl.setCounterOp(boolean)public Class<T> getObjectClass()
null if this
statement is not associated with a POJO class.getObjectClass in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getObjectClass()public ClassInfoImpl.Context getContext()
null if this statement is not associated with a POJO class.getContext in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getContext()public ClassInfoImpl.POJOContext getPOJOContext()
null if this statement is not associated with a POJO object.getPOJOContext in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getPOJOContext()public String getKeyspace()
getKeyspace in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getKeyspace in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getKeyspace()public GenericStatement<R,F> enable()
enable in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>enable in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.enable()public GenericStatement<R,F> disable()
disable in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>disable in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.disable()public boolean isEnabled()
isEnabled in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>isEnabled in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.isEnabled()public GenericStatement<R,F> setConsistencyLevel(com.datastax.driver.core.ConsistencyLevel consistency)
setConsistencyLevel in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>setConsistencyLevel in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setConsistencyLevel(com.datastax.driver.core.ConsistencyLevel)public com.datastax.driver.core.ConsistencyLevel getConsistencyLevel()
getConsistencyLevel in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getConsistencyLevel in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getConsistencyLevel()public GenericStatement<R,F> setSerialConsistencyLevel(com.datastax.driver.core.ConsistencyLevel serialConsistency)
setSerialConsistencyLevel in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>setSerialConsistencyLevel in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setSerialConsistencyLevel(com.datastax.driver.core.ConsistencyLevel)public com.datastax.driver.core.ConsistencyLevel getSerialConsistencyLevel()
getSerialConsistencyLevel in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getSerialConsistencyLevel in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getSerialConsistencyLevel()public GenericStatement<R,F> enableTracing()
enableTracing in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>enableTracing in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.enableTracing()public GenericStatement<R,F> enableTracing(String prefix)
enableTracing in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>enableTracing in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.enableTracing(java.lang.String)public GenericStatement<R,F> disableTracing()
disableTracing in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>disableTracing in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.disableTracing()public boolean isTracing()
isTracing in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>isTracing in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.isTracing()public GenericStatement<R,F> enableErrorTracing()
enableErrorTracing in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>enableErrorTracing in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.enableErrorTracing()public GenericStatement<R,F> enableErrorTracing(String prefix)
enableErrorTracing in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>enableErrorTracing in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.enableErrorTracing(java.lang.String)public GenericStatement<R,F> disableErrorTracing()
disableErrorTracing in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>disableErrorTracing in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.disableErrorTracing()public boolean isErrorTracing()
isErrorTracing in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>isErrorTracing in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.isErrorTracing()public GenericStatement<R,F> setRetryPolicy(com.datastax.driver.core.policies.RetryPolicy policy)
setRetryPolicy in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>setRetryPolicy in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setRetryPolicy(com.datastax.driver.core.policies.RetryPolicy)public com.datastax.driver.core.policies.RetryPolicy getRetryPolicy()
getRetryPolicy in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getRetryPolicy in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getRetryPolicy()public GenericStatement<R,F> setFetchSize(int fetchSize)
setFetchSize in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>setFetchSize in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setFetchSize(int)public int getFetchSize()
getFetchSize in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getFetchSize in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getFetchSize()public GenericStatement<R,F> setDefaultTimestamp(long defaultTimestamp)
setDefaultTimestamp in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>setDefaultTimestamp in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setDefaultTimestamp(long)public long getDefaultTimestamp()
getDefaultTimestamp in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getDefaultTimestamp in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getDefaultTimestamp()public GenericStatement<R,F> setReadTimeoutMillis(int readTimeoutMillis)
setReadTimeoutMillis in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>setReadTimeoutMillis in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setReadTimeoutMillis(int)public int getReadTimeoutMillis()
getReadTimeoutMillis in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getReadTimeoutMillis in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getReadTimeoutMillis()public GenericStatement<R,F> setIdempotent(boolean idempotent)
setIdempotent in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>setIdempotent in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setIdempotent(boolean)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()public String getQueryString()
getQueryString in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getQueryString in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getQueryString()public <U> U getUserData()
getUserData in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>getUserData in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.getUserData()public <U> void setUserData(U data)
setUserData in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>setUserData in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.setUserData(java.lang.Object)public R execute()
execute in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>execute in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.execute()public F executeAsync()
executeAsync in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>executeAsync in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.executeAsync()public com.datastax.driver.core.ResultSet executeRaw()
executeRaw in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>executeRaw in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.executeRaw()public com.datastax.driver.core.ResultSetFuture executeAsyncRaw()
executeAsyncRaw in interface GenericStatement<R,F extends com.google.common.util.concurrent.ListenableFuture<R>>executeAsyncRaw in class StatementImpl<R,F extends com.google.common.util.concurrent.ListenableFuture<R>,T>StatementImpl.executeAsyncRaw()Copyright (C) 2015-2017 The Helenus Driver Project Authors.