Class WriteOptions
java.lang.Object
org.springframework.data.cassandra.core.cql.QueryOptions
org.springframework.data.cassandra.core.cql.WriteOptions
- Direct Known Subclasses:
DeleteOptions
,InsertOptions
,UpdateOptions
Cassandra Write Options are an extension to
QueryOptions
for write operations. WriteOptions
allow
tuning of various query options on a per-request level. Only options that are set are applied to queries.- Author:
- David Webb, Mark Paluch, Lukasz Antoniak, Tomasz Lelek, Sam Lightfoot, Thomas Strauß
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.cassandra.core.cql.QueryOptions
QueryOptions.QueryOptionsBuilder
-
Constructor Summary
ModifierConstructorDescriptionprotected
WriteOptions
(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel, ExecutionProfileResolver executionProfileResolver, Boolean idempotent, com.datastax.oss.driver.api.core.CqlIdentifier keyspace, Integer pageSize, com.datastax.oss.driver.api.core.CqlIdentifier routingKeyspace, ByteBuffer routingKey, com.datastax.oss.driver.api.core.ConsistencyLevel serialConsistencyLevel, Duration timeout, Duration ttl, Long timestamp, Boolean tracing) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a newWriteOptions.WriteOptionsBuilder
.static WriteOptions
empty()
Create defaultWriteOptions
.boolean
getTtl()
int
hashCode()
mutate()
Create a newWriteOptions.WriteOptionsBuilder
to mutate properties of thisWriteOptions
.Methods inherited from class org.springframework.data.cassandra.core.cql.QueryOptions
getConsistencyLevel, getExecutionProfileResolver, getKeyspace, getPageSize, getReadTimeout, getRoutingKey, getRoutingKeyspace, getSerialConsistencyLevel, getTimeout, getTracing, isIdempotent
-
Constructor Details
-
WriteOptions
protected WriteOptions(@Nullable com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel, ExecutionProfileResolver executionProfileResolver, @Nullable Boolean idempotent, @Nullable com.datastax.oss.driver.api.core.CqlIdentifier keyspace, @Nullable Integer pageSize, @Nullable com.datastax.oss.driver.api.core.CqlIdentifier routingKeyspace, @Nullable ByteBuffer routingKey, @Nullable com.datastax.oss.driver.api.core.ConsistencyLevel serialConsistencyLevel, Duration timeout, Duration ttl, @Nullable Long timestamp, @Nullable Boolean tracing)
-
-
Method Details
-
empty
Create defaultWriteOptions
.- Returns:
- default
WriteOptions
. - Since:
- 2.0
-
builder
Create a newWriteOptions.WriteOptionsBuilder
.- Returns:
- a new
WriteOptions.WriteOptionsBuilder
. - Since:
- 1.5
-
mutate
Create a newWriteOptions.WriteOptionsBuilder
to mutate properties of thisWriteOptions
.- Overrides:
mutate
in classQueryOptions
- Returns:
- a new
WriteOptions.WriteOptionsBuilder
initialized with thisWriteOptions
. - Since:
- 2.0
-
getTtl
- Returns:
- the time to live, if set.
-
getTimestamp
- Returns:
- mutation timestamp in microseconds.
- Since:
- 2.1
-
equals
- Overrides:
equals
in classQueryOptions
-
hashCode
public int hashCode()- Overrides:
hashCode
in classQueryOptions
-