public abstract class ModificationStatement extends CFStatement implements CQLStatement, MeasurableForPreparedCache
| Modifier and Type | Class and Description |
|---|---|
static class |
ModificationStatement.Type |
ParsedStatement.Prepared| Modifier and Type | Field and Description |
|---|---|
protected ModificationStatement.Type |
type |
cfName| Constructor and Description |
|---|
ModificationStatement(CFName name,
Attributes attrs) |
ModificationStatement(CFName name,
java.lang.Long timestamp,
int timeToLive) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkAccess(ClientState state)
Perform any access verification necessary for the statement.
|
ResultMessage |
execute(ConsistencyLevel cl,
QueryState queryState,
java.util.List<java.nio.ByteBuffer> variables)
Execute the statement and return the resulting result or null if there is no result.
|
ResultMessage |
executeInternal(QueryState queryState)
Variante of execute used for internal query against the system tables, and thus only query the local node.
|
protected abstract java.util.Collection<? extends IMutation> |
getMutations(java.util.List<java.nio.ByteBuffer> variables,
boolean local,
ConsistencyLevel cl,
long now)
Convert statement into a list of mutations to apply on the server
|
long |
getTimestamp(long now) |
int |
getTimeToLive() |
boolean |
isSetTimestamp() |
abstract ParsedStatement.Prepared |
prepare(ColumnSpecification[] boundNames) |
protected java.util.Map<java.nio.ByteBuffer,ColumnGroupMap> |
readRows(java.util.List<java.nio.ByteBuffer> keys,
ColumnNameBuilder builder,
java.util.Set<java.nio.ByteBuffer> toRead,
CompositeType composite,
boolean local,
ConsistencyLevel cl) |
void |
setTimestamp(long timestamp) |
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
protected abstract void |
validateConsistency(ConsistencyLevel cl) |
columnFamily, keyspace, prepareKeyspacegetBoundTerms, prepare, setBoundTermsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBoundTermsmeasureForPreparedCacheprotected ModificationStatement.Type type
public ModificationStatement(CFName name, Attributes attrs)
public ModificationStatement(CFName name, java.lang.Long timestamp, int timeToLive)
public void checkAccess(ClientState state) throws InvalidRequestException, UnauthorizedException
CQLStatementcheckAccess in interface CQLStatementstate - the current client stateInvalidRequestExceptionUnauthorizedExceptionpublic void validate(ClientState state) throws InvalidRequestException
CQLStatementvalidate in interface CQLStatementstate - the current client stateInvalidRequestExceptionprotected abstract void validateConsistency(ConsistencyLevel cl) throws InvalidRequestException
InvalidRequestExceptionpublic ResultMessage execute(ConsistencyLevel cl, QueryState queryState, java.util.List<java.nio.ByteBuffer> variables) throws RequestExecutionException, RequestValidationException
CQLStatementexecute in interface CQLStatementqueryState - the current query statevariables - the values for bounded variables. The implementation
can assume that each bound term have a corresponding value.RequestExecutionExceptionRequestValidationExceptionpublic ResultMessage executeInternal(QueryState queryState) throws RequestValidationException, RequestExecutionException
CQLStatementexecuteInternal in interface CQLStatementqueryState - the current query stateRequestValidationExceptionRequestExecutionExceptionpublic long getTimestamp(long now)
public void setTimestamp(long timestamp)
public boolean isSetTimestamp()
public int getTimeToLive()
protected java.util.Map<java.nio.ByteBuffer,ColumnGroupMap> readRows(java.util.List<java.nio.ByteBuffer> keys, ColumnNameBuilder builder, java.util.Set<java.nio.ByteBuffer> toRead, CompositeType composite, boolean local, ConsistencyLevel cl) throws RequestExecutionException, RequestValidationException
protected abstract java.util.Collection<? extends IMutation> getMutations(java.util.List<java.nio.ByteBuffer> variables, boolean local, ConsistencyLevel cl, long now) throws RequestExecutionException, RequestValidationException
variables - value for prepared statement markerslocal - if true, any requests (for collections) performed by getMutation should be done locally only.cl - the consistency to use for the potential reads involved in generating the mutations (for lists set/delete operations)now - the current timestamp in microseconds to use if no timestamp is user provided.InvalidRequestException - on invalid requestsRequestExecutionExceptionRequestValidationExceptionpublic abstract ParsedStatement.Prepared prepare(ColumnSpecification[] boundNames) throws InvalidRequestException
InvalidRequestExceptionCopyright © 2014 The Apache Software Foundation