public class BatchStatement extends ModificationStatement
BATCH
statement parsed from a CQL query.ModificationStatement.Type
ParsedStatement.Prepared
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ModificationStatement> |
statements |
type
cfName
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, setTimestamp
columnFamily, keyspace
getBoundTerms, setBoundTerms
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBoundTerms
protected 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 CFStatement
InvalidRequestException
public void checkAccess(ClientState state) throws InvalidRequestException, UnauthorizedException
CQLStatement
checkAccess
in interface CQLStatement
checkAccess
in class ModificationStatement
state
- the current client stateInvalidRequestException
UnauthorizedException
public void validate(ClientState state) throws InvalidRequestException
CQLStatement
validate
in interface CQLStatement
validate
in class ModificationStatement
state
- the current client stateInvalidRequestException
protected void validateConsistency(ConsistencyLevel cl) throws InvalidRequestException
validateConsistency
in class ModificationStatement
InvalidRequestException
public java.util.Collection<? extends IMutation> getMutations(java.util.List<java.nio.ByteBuffer> variables, boolean local, ConsistencyLevel cl, long now) throws RequestExecutionException, RequestValidationException
ModificationStatement
getMutations
in class ModificationStatement
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 requestsRequestExecutionException
RequestValidationException
public ParsedStatement.Prepared prepare(ColumnSpecification[] boundNames) throws InvalidRequestException
prepare
in class ModificationStatement
InvalidRequestException
public ParsedStatement.Prepared prepare() throws InvalidRequestException
prepare
in class ParsedStatement
InvalidRequestException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014 The Apache Software Foundation