@NotThreadSafe public class BatchStatementBuilder extends StatementBuilder<BatchStatementBuilder,BatchStatement>
consistencyLevel, executionProfile, executionProfileName, idempotent, node, pageSize, pagingState, routingKey, routingKeyspace, routingToken, serialConsistencyLevel, timeout, timestamp, tracing
Constructor and Description |
---|
BatchStatementBuilder(BatchStatement template) |
BatchStatementBuilder(BatchType batchType) |
Modifier and Type | Method and Description |
---|---|
BatchStatementBuilder |
addStatement(BatchableStatement<?> statement)
Adds a new statement to the batch.
|
BatchStatementBuilder |
addStatements(BatchableStatement<?>... statements)
Adds new statements to the batch.
|
BatchStatementBuilder |
addStatements(Iterable<BatchableStatement<?>> statements)
Adds new statements to the batch.
|
BatchStatement |
build() |
BatchStatementBuilder |
clearStatements()
Clears all the statements in this batch.
|
int |
getStatementsCount() |
BatchStatementBuilder |
withKeyspace(CqlIdentifier keyspace)
Sets the CQL keyspace to execute this batch in.
|
BatchStatementBuilder |
withKeyspace(String keyspaceName)
Sets the CQL keyspace to execute this batch in.
|
addCustomPayload, buildCustomPayload, clearCustomPayload, withConsistencyLevel, withExecutionProfile, withExecutionProfileName, withIdempotence, withNode, withPageSize, withPagingState, withRoutingKey, withRoutingKeyspace, withRoutingKeyspace, withRoutingToken, withSerialConsistencyLevel, withTimeout, withTimestamp, withTracing
public BatchStatementBuilder(@NonNull BatchType batchType)
public BatchStatementBuilder(@NonNull BatchStatement template)
@NonNull public BatchStatementBuilder withKeyspace(@NonNull CqlIdentifier keyspace)
null
.Request.getKeyspace()
@NonNull public BatchStatementBuilder withKeyspace(@NonNull String keyspaceName)
withKeyspace(CqlIdentifier.fromCql(keyspaceName))
.null
.@NonNull public BatchStatementBuilder addStatement(@NonNull BatchableStatement<?> statement)
null
.BatchStatement.add(BatchableStatement)
@NonNull public BatchStatementBuilder addStatements(@NonNull Iterable<BatchableStatement<?>> statements)
null
.BatchStatement.addAll(Iterable)
@NonNull public BatchStatementBuilder addStatements(@NonNull BatchableStatement<?>... statements)
null
.BatchStatement.addAll(BatchableStatement[])
@NonNull public BatchStatementBuilder clearStatements()
null
.@NonNull public BatchStatement build()
build
in class StatementBuilder<BatchStatementBuilder,BatchStatement>
null
..public int getStatementsCount()
Copyright © 2017–2018. All rights reserved.