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()
The values to use for this statement.
|
Batch.Options |
using(Using using)
Adds a new options for this BATCH statement.
|
escapeId, getObject, getQueryString, isIdempotent, setForceNoValues, toStringdisableTracing, enableTracing, getConsistencyLevel, getFetchSize, getRetryPolicy, getSerialConsistencyLevel, isTracing, setConsistencyLevel, 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()
RegularStatement
Note: Values for a RegularStatement (i.e. if this method does not return
null) 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(int) or you use
Cassandra 1.2).
getValues in class BuiltStatementnull 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 BuiltStatementCopyright © 2012–2015. All rights reserved.