public class Batch extends BuiltStatement
| Modifier and Type | Class and Description |
|---|---|
static class |
Batch.Options
The options of a BATCH statement.
|
idempotent| Modifier and Type | Method and Description |
|---|---|
Batch |
add(RegularStatement statement)
Adds a new statement to this batch.
|
String |
getKeyspace()
Returns the keyspace of the first statement in this batch.
|
ByteBuffer |
getRoutingKey()
Returns the first non-null routing key of the statements in this batch
or null otherwise.
|
ByteBuffer[] |
getValues(ProtocolVersion protocolVersion)
The values to use for this statement.
|
Batch.Options |
using(Using using)
Adds a new options for this BATCH statement.
|
escapeId, getObject, getQueryString, hasValues, isIdempotent, setForceNoValues, toStringgetValues, getValuesdisableTracing, enableTracing, getConsistencyLevel, getDefaultTimestamp, getFetchSize, getRetryPolicy, getSerialConsistencyLevel, isTracing, setConsistencyLevel, setDefaultTimestamp, setFetchSize, setIdempotent, setPagingState, setPagingStateUnsafe, setRetryPolicy, setSerialConsistencyLevelpublic Batch add(RegularStatement statement)
statement - the new statement to add.IllegalArgumentException - if counter and non-counter operations
are mixed.public ByteBuffer[] getValues(ProtocolVersion protocolVersion)
RegularStatementnull) are not supported with the native protocol version 1: you
will get an UnsupportedProtocolVersionException when submitting
one if version 1 of the protocol is in use (i.e. if you've force version
1 through Cluster.Builder.withProtocolVersion(com.datastax.driver.core.ProtocolVersion) or you use
Cassandra 1.2).getValues in class BuiltStatementprotocolVersion - the protocol version in which the returned values
must be serialized for.null if there is
no such values.SimpleStatement.SimpleStatement(String, Object...)public Batch.Options using(Using using)
using - the option to add.public ByteBuffer getRoutingKey()
getRoutingKey in class BuiltStatementpublic String getKeyspace()
getKeyspace in class BuiltStatement