@NotThreadSafe public abstract class StatementBuilder<SelfT extends StatementBuilder<SelfT,StatementT>,StatementT extends Statement<StatementT>> extends Object
Modifier and Type | Field and Description |
---|---|
protected ConsistencyLevel |
consistencyLevel |
protected DriverExecutionProfile |
executionProfile |
protected String |
executionProfileName |
protected Boolean |
idempotent |
protected Node |
node |
protected int |
nowInSeconds |
protected int |
pageSize |
protected ByteBuffer |
pagingState |
protected ByteBuffer |
routingKey |
protected CqlIdentifier |
routingKeyspace |
protected Token |
routingToken |
protected ConsistencyLevel |
serialConsistencyLevel |
protected Duration |
timeout |
protected long |
timestamp |
protected boolean |
tracing |
Modifier | Constructor and Description |
---|---|
protected |
StatementBuilder() |
protected |
StatementBuilder(StatementT template) |
Modifier and Type | Method and Description |
---|---|
SelfT |
addCustomPayload(String key,
ByteBuffer value) |
abstract StatementT |
build() |
protected Map<String,ByteBuffer> |
buildCustomPayload() |
SelfT |
clearCustomPayload() |
SelfT |
disableTracing()
Deprecated.
this method only exists to ease the transition from driver 3, it is an alias for
setTracing(false) . |
SelfT |
enableTracing()
Deprecated.
this method only exists to ease the transition from driver 3, it is an alias for
setTracing(true) . |
SelfT |
setConsistencyLevel(ConsistencyLevel consistencyLevel) |
SelfT |
setDefaultTimestamp(long timestamp)
Deprecated.
this method only exists to ease the transition from driver 3, it is an alias for
setQueryTimestamp(long) . |
SelfT |
setExecutionProfile(DriverExecutionProfile executionProfile) |
SelfT |
setExecutionProfileName(String executionProfileName) |
SelfT |
setFetchSize(int pageSize)
Deprecated.
this method only exists to ease the transition from driver 3, it is an alias for
setPageSize(int) . |
SelfT |
setIdempotence(Boolean idempotent) |
SelfT |
setNode(Node node) |
SelfT |
setNowInSeconds(int nowInSeconds) |
SelfT |
setPageSize(int pageSize) |
SelfT |
setPagingState(ByteBuffer pagingState) |
SelfT |
setQueryTimestamp(long timestamp) |
SelfT |
setRoutingKey(ByteBuffer... newRoutingKeyComponents) |
SelfT |
setRoutingKey(ByteBuffer routingKey) |
SelfT |
setRoutingKeyspace(CqlIdentifier routingKeyspace) |
SelfT |
setRoutingKeyspace(String routingKeyspaceName)
|
SelfT |
setRoutingToken(Token routingToken) |
SelfT |
setSerialConsistencyLevel(ConsistencyLevel serialConsistencyLevel) |
SelfT |
setTimeout(Duration timeout) |
SelfT |
setTracing()
This method is a shortcut to
setTracing(boolean) with an argument of true. |
SelfT |
setTracing(boolean tracing) |
@Nullable protected String executionProfileName
@Nullable protected DriverExecutionProfile executionProfile
@Nullable protected CqlIdentifier routingKeyspace
@Nullable protected ByteBuffer routingKey
@Nullable protected Token routingToken
@Nullable protected Boolean idempotent
protected boolean tracing
protected long timestamp
@Nullable protected ByteBuffer pagingState
protected int pageSize
@Nullable protected ConsistencyLevel consistencyLevel
@Nullable protected ConsistencyLevel serialConsistencyLevel
@Nullable protected Duration timeout
@Nullable protected Node node
protected int nowInSeconds
protected StatementBuilder()
protected StatementBuilder(StatementT template)
@NonNull public SelfT setExecutionProfileName(@Nullable String executionProfileName)
@NonNull public SelfT setExecutionProfile(@Nullable DriverExecutionProfile executionProfile)
@NonNull public SelfT setRoutingKeyspace(@Nullable CqlIdentifier routingKeyspace)
@NonNull public SelfT setRoutingKey(@Nullable ByteBuffer routingKey)
Statement.setRoutingKey(ByteBuffer)
@NonNull public SelfT setRoutingKey(@NonNull ByteBuffer... newRoutingKeyComponents)
Statement.setRoutingKey(ByteBuffer...)
@NonNull public SelfT setRoutingToken(@Nullable Token routingToken)
Statement.setRoutingToken(Token)
@NonNull public SelfT addCustomPayload(@NonNull String key, @Nullable ByteBuffer value)
Statement.setCustomPayload(Map)
@NonNull public SelfT clearCustomPayload()
Statement.setCustomPayload(Map)
@NonNull public SelfT setIdempotence(@Nullable Boolean idempotent)
Statement.setIdempotent(Boolean)
@NonNull public SelfT setTracing()
setTracing(boolean)
with an argument of true. It is
preserved to maintain API compatibility.Statement.setTracing(boolean)
@NonNull public SelfT setTracing(boolean tracing)
Statement.setTracing(boolean)
@Deprecated @NonNull public SelfT enableTracing()
setTracing(true)
.@Deprecated @NonNull public SelfT disableTracing()
setTracing(false)
.@NonNull public SelfT setQueryTimestamp(long timestamp)
Statement.setQueryTimestamp(long)
@Deprecated @NonNull public SelfT setDefaultTimestamp(long timestamp)
setQueryTimestamp(long)
.@NonNull public SelfT setPagingState(@Nullable ByteBuffer pagingState)
Statement.setPagingState(ByteBuffer)
@NonNull public SelfT setPageSize(int pageSize)
Statement.setPageSize(int)
@Deprecated @NonNull public SelfT setFetchSize(int pageSize)
setPageSize(int)
.@NonNull public SelfT setConsistencyLevel(@Nullable ConsistencyLevel consistencyLevel)
@NonNull public SelfT setSerialConsistencyLevel(@Nullable ConsistencyLevel serialConsistencyLevel)
@NonNull public SelfT setTimeout(@Nullable Duration timeout)
Statement.setTimeout(Duration)
public SelfT setNode(@Nullable Node node)
Statement.setNode(Node)
public SelfT setNowInSeconds(int nowInSeconds)
Statement.setNowInSeconds(int)
@NonNull protected Map<String,ByteBuffer> buildCustomPayload()
@NonNull public abstract StatementT build()
Copyright © 2017–2024. All rights reserved.