@NotThreadSafe public class BatchStatementBuilder extends StatementBuilder<BatchStatementBuilder,BatchStatement>
This class is mutable and not thread-safe.
consistencyLevel, executionProfile, executionProfileName, idempotent, node, nowInSeconds, 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 |
setKeyspace(CqlIdentifier keyspace)
Sets the CQL keyspace to execute this batch in.
|
BatchStatementBuilder |
setKeyspace(String keyspaceName)
Sets the CQL keyspace to execute this batch in.
|
addCustomPayload, buildCustomPayload, clearCustomPayload, setConsistencyLevel, setExecutionProfile, setExecutionProfileName, setIdempotence, setNode, setNowInSeconds, setPageSize, setPagingState, setQueryTimestamp, setRoutingKey, setRoutingKey, setRoutingKeyspace, setRoutingKeyspace, setRoutingToken, setSerialConsistencyLevel, setTimeout, setTracing, setTracing
public BatchStatementBuilder(@NonNull BatchType batchType)
public BatchStatementBuilder(@NonNull BatchStatement template)
@NonNull public BatchStatementBuilder setKeyspace(@NonNull CqlIdentifier keyspace)
null
.Request.getKeyspace()
@NonNull public BatchStatementBuilder setKeyspace(@NonNull String keyspaceName)
setKeyspace(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–2024. All rights reserved.