public class BatchStatement extends ModificationStatement
BATCH statement parsed from a CQL query.ModificationStatement.TypeParsedStatement.Prepared| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<ModificationStatement> |
statements |
typecfName| Constructor and Description |
|---|
BatchStatement(ModificationStatement.Type type,
java.util.List<ModificationStatement> statements,
Attributes attrs)
Creates a new BatchStatement from a list of statements and a
Thrift consistency level.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkAccess(ClientState state)
Perform any access verification necessary for the statement.
|
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 |
measureForPreparedCache(org.github.jamm.MemoryMeter meter) |
ParsedStatement.Prepared |
prepare() |
ParsedStatement.Prepared |
prepare(ColumnSpecification[] boundNames) |
void |
prepareKeyspace(ClientState state) |
java.lang.String |
toString() |
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
protected void |
validateConsistency(ConsistencyLevel cl) |
execute, executeInternal, getTimestamp, getTimeToLive, isSetTimestamp, readRows, setTimestampcolumnFamily, keyspacegetBoundTerms, setBoundTermsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBoundTermsprotected final java.util.List<ModificationStatement> statements
public BatchStatement(ModificationStatement.Type type, java.util.List<ModificationStatement> statements, Attributes attrs)
type - type of the batchstatements - a list of UpdateStatementsattrs - additional attributes for statement (CL, timestamp, timeToLive)public long measureForPreparedCache(org.github.jamm.MemoryMeter meter)
public void prepareKeyspace(ClientState state) throws InvalidRequestException
prepareKeyspace in class CFStatementInvalidRequestExceptionpublic void checkAccess(ClientState state) throws InvalidRequestException, UnauthorizedException
CQLStatementcheckAccess in interface CQLStatementcheckAccess in class ModificationStatementstate - the current client stateInvalidRequestExceptionUnauthorizedExceptionpublic void validate(ClientState state) throws InvalidRequestException
CQLStatementvalidate in interface CQLStatementvalidate in class ModificationStatementstate - the current client stateInvalidRequestExceptionprotected void validateConsistency(ConsistencyLevel cl) throws InvalidRequestException
validateConsistency in class ModificationStatementInvalidRequestExceptionpublic java.util.Collection<? extends IMutation> getMutations(java.util.List<java.nio.ByteBuffer> variables, boolean local, ConsistencyLevel cl, long now) throws RequestExecutionException, RequestValidationException
ModificationStatementgetMutations in class ModificationStatementvariables - 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 ParsedStatement.Prepared prepare(ColumnSpecification[] boundNames) throws InvalidRequestException
prepare in class ModificationStatementInvalidRequestExceptionpublic ParsedStatement.Prepared prepare() throws InvalidRequestException
prepare in class ParsedStatementInvalidRequestExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014 The Apache Software Foundation