Module spring.data.cassandra
Class DeleteOptions.DeleteOptionsBuilder
java.lang.Object
org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder
org.springframework.data.cassandra.core.cql.WriteOptions.WriteOptionsBuilder
org.springframework.data.cassandra.core.DeleteOptions.DeleteOptionsBuilder
- Enclosing class:
- DeleteOptions
Builder for
DeleteOptions
.- Author:
- Mark Paluch
-
Field Summary
Fields inherited from class org.springframework.data.cassandra.core.cql.WriteOptions.WriteOptionsBuilder
timestamp, ttl
Fields inherited from class org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder
consistencyLevel, executionProfileResolver, idempotent, keyspace, pageSize, routingKey, routingKeyspace, serialConsistencyLevel, timeout, tracing
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newDeleteOptions
with the configured values.consistencyLevel
(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel) Sets theConsistencyLevel
to use.executionProfile
(String profileName) Sets theexecution profile
to use.executionProfile
(ExecutionProfileResolver executionProfileResolver) Sets theExecutionProfileResolver
to use.fetchSize
(int fetchSize) Deprecated.idempotent
(boolean idempotent) Set query execution idempotency.ifCondition
(CriteriaDefinition criteria) Use light-weight transactions by applyingIF
condition
.ifCondition
(Filter condition) Use light-weight transactions by applyingIF
condition
.ifExists
(boolean ifNotExists) Use light-weight transactions by applyingIF EXISTS
.keyspace
(com.datastax.oss.driver.api.core.CqlIdentifier keyspace) Sets thekeyspace
to use.pageSize
(int pageSize) Sets the query fetch size forResultSet
chunks.readTimeout
(long readTimeout) Deprecated.readTimeout
(long readTimeout, TimeUnit timeUnit) Deprecated.routingKey
(ByteBuffer routingKey) Set query routing key.routingKeyspace
(com.datastax.oss.driver.api.core.CqlIdentifier routingKeyspace) Set query routing keyspace.serialConsistencyLevel
(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel) Sets the serialConsistencyLevel
to use.Sets the request timeout.timestamp
(long timestamp) Sets the timestamp of write operations.Sets the timestamp of write operations.tracing
(boolean tracing) Enables statement tracing.ttl
(int ttl) Sets the time to live in seconds for write operations.Sets the time to live in seconds for write operations.Use light-weight transactions by applyingIF EXISTS
.Enables statement tracing.Methods inherited from class org.springframework.data.cassandra.core.cql.QueryOptions.QueryOptionsBuilder
readTimeout
-
Method Details
-
consistencyLevel
public DeleteOptions.DeleteOptionsBuilder consistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel) Description copied from class:QueryOptions.QueryOptionsBuilder
Sets theConsistencyLevel
to use.- Overrides:
consistencyLevel
in classWriteOptions.WriteOptionsBuilder
- Parameters:
consistencyLevel
- must not be null.- Returns:
this
QueryOptions.QueryOptionsBuilder
-
executionProfile
Description copied from class:QueryOptions.QueryOptionsBuilder
Sets theexecution profile
to use.- Overrides:
executionProfile
in classWriteOptions.WriteOptionsBuilder
- Parameters:
profileName
- must not be null or empty.- Returns:
this
QueryOptions.QueryOptionsBuilder
- See Also:
-
Statement.setExecutionProfileName(String)
-
executionProfile
public DeleteOptions.DeleteOptionsBuilder executionProfile(ExecutionProfileResolver executionProfileResolver) Description copied from class:QueryOptions.QueryOptionsBuilder
Sets theExecutionProfileResolver
to use.- Overrides:
executionProfile
in classWriteOptions.WriteOptionsBuilder
- Parameters:
executionProfileResolver
- must not be null.- Returns:
this
QueryOptions.QueryOptionsBuilder
- See Also:
-
Statement.setExecutionProfile(DriverExecutionProfile)
-
fetchSize
Deprecated.Description copied from class:QueryOptions.QueryOptionsBuilder
Sets the query fetch size forResultSet
chunks.The fetch size controls how much resulting rows will be retrieved simultaneously (the goal being to avoid loading too much results in memory for queries yielding large results). Please note that while value as low as 1 can be used, it is *highly* discouraged to use such a low value in practice as it will yield very poor performance.
- Overrides:
fetchSize
in classWriteOptions.WriteOptionsBuilder
- Parameters:
fetchSize
- the number of rows to fetch per chunking request. To disable chunking of the result set, usefetchSize == Integer.MAX_VALUE
. Negative values are not allowed.- Returns:
this
QueryOptions.QueryOptionsBuilder
-
idempotent
Description copied from class:QueryOptions.QueryOptionsBuilder
Set query execution idempotency.- Overrides:
idempotent
in classWriteOptions.WriteOptionsBuilder
- Parameters:
idempotent
- true to mark the query as idempotent.- Returns:
this
QueryOptions.QueryOptionsBuilder
.
-
keyspace
public DeleteOptions.DeleteOptionsBuilder keyspace(com.datastax.oss.driver.api.core.CqlIdentifier keyspace) Description copied from class:QueryOptions.QueryOptionsBuilder
Sets thekeyspace
to use. If left unconfigured, then the keyspace set on the statement orCqlSession
will be used.- Overrides:
keyspace
in classWriteOptions.WriteOptionsBuilder
- Parameters:
keyspace
- the specific keyspace to use to run a statement, must not be null.- Returns:
this
QueryOptions.QueryOptionsBuilder
.
-
pageSize
Description copied from class:QueryOptions.QueryOptionsBuilder
Sets the query fetch size forResultSet
chunks.The fetch size controls how much resulting rows will be retrieved simultaneously (the goal being to avoid loading too many results in memory for queries yielding large results). Please note that while value as low as 1 can be used, it is highly discouraged to use such a low value in practice as it will yield very poor performance.
- Overrides:
pageSize
in classWriteOptions.WriteOptionsBuilder
- Parameters:
pageSize
- the number of rows to fetch per chunking request. To disable chunking of the result set, usepageSize == Integer.MAX_VALUE
. Negative values are not allowed.- Returns:
this
QueryOptions.QueryOptionsBuilder
-
readTimeout
Deprecated.Description copied from class:QueryOptions.QueryOptionsBuilder
Sets the read timeout in milliseconds. Overrides the default per-host read timeout.- Overrides:
readTimeout
in classWriteOptions.WriteOptionsBuilder
- Parameters:
readTimeout
- the read timeout in milliseconds. Negative values are not allowed. If it is0
, the read timeout will be disabled for this statement.- Returns:
this
QueryOptions.QueryOptionsBuilder
- See Also:
-
Statement.setTimeout(Duration)
-
readTimeout
@Deprecated public DeleteOptions.DeleteOptionsBuilder readTimeout(long readTimeout, TimeUnit timeUnit) Deprecated.Description copied from class:QueryOptions.QueryOptionsBuilder
Sets the read timeout. Overrides the default per-host read timeout.- Overrides:
readTimeout
in classWriteOptions.WriteOptionsBuilder
- Parameters:
readTimeout
- the read timeout value. Negative values are not allowed. If it is0
, the read timeout will be disabled for this statement.timeUnit
- theTimeUnit
for the supplied timeout; must not be null.- Returns:
this
QueryOptions.QueryOptionsBuilder
- See Also:
-
Statement.setTimeout(Duration)
-
routingKeyspace
public DeleteOptions.DeleteOptionsBuilder routingKeyspace(com.datastax.oss.driver.api.core.CqlIdentifier routingKeyspace) Description copied from class:QueryOptions.QueryOptionsBuilder
Set query routing keyspace.- Overrides:
routingKeyspace
in classWriteOptions.WriteOptionsBuilder
- Parameters:
routingKeyspace
- the routing keyspace to use for token-aware routing.- Returns:
this
QueryOptions.QueryOptionsBuilder
.
-
routingKey
Description copied from class:QueryOptions.QueryOptionsBuilder
Set query routing key.- Overrides:
routingKey
in classWriteOptions.WriteOptionsBuilder
- Parameters:
routingKey
- the routing key to use for token-aware routing.- Returns:
this
QueryOptions.QueryOptionsBuilder
-
serialConsistencyLevel
public DeleteOptions.DeleteOptionsBuilder serialConsistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel) Description copied from class:QueryOptions.QueryOptionsBuilder
Sets the serialConsistencyLevel
to use.- Overrides:
serialConsistencyLevel
in classWriteOptions.WriteOptionsBuilder
- Parameters:
consistencyLevel
- must not be null.- Returns:
this
QueryOptions.QueryOptionsBuilder
-
timeout
Description copied from class:QueryOptions.QueryOptionsBuilder
Sets the request timeout. Overrides the default timeout.- Overrides:
timeout
in classWriteOptions.WriteOptionsBuilder
- Parameters:
timeout
- the read timeout. Negative values are not allowed. If it is0
, the read timeout will be disabled for this statement.- Returns:
this
QueryOptions.QueryOptionsBuilder
- See Also:
-
Statement.setTimeout(Duration)
-
ttl
Description copied from class:WriteOptions.WriteOptionsBuilder
Sets the time to live in seconds for write operations.- Overrides:
ttl
in classWriteOptions.WriteOptionsBuilder
- Parameters:
ttl
- the time to live.- Returns:
this
WriteOptions.WriteOptionsBuilder
-
tracing
Description copied from class:QueryOptions.QueryOptionsBuilder
Enables statement tracing.- Overrides:
tracing
in classWriteOptions.WriteOptionsBuilder
- Parameters:
tracing
- true to enable statement tracing to the executed statements.- Returns:
this
QueryOptions.QueryOptionsBuilder
-
withTracing
Description copied from class:QueryOptions.QueryOptionsBuilder
Enables statement tracing.- Overrides:
withTracing
in classWriteOptions.WriteOptionsBuilder
- Returns:
this
QueryOptions.QueryOptionsBuilder
-
ttl
Description copied from class:WriteOptions.WriteOptionsBuilder
Sets the time to live in seconds for write operations.- Overrides:
ttl
in classWriteOptions.WriteOptionsBuilder
- Parameters:
ttl
- the time to live.- Returns:
this
WriteOptions.WriteOptionsBuilder
-
timestamp
Description copied from class:WriteOptions.WriteOptionsBuilder
Sets the timestamp of write operations.- Overrides:
timestamp
in classWriteOptions.WriteOptionsBuilder
- Parameters:
timestamp
- mutation timestamp in microseconds.- Returns:
this
WriteOptions.WriteOptionsBuilder
- See Also:
-
timestamp
Description copied from class:WriteOptions.WriteOptionsBuilder
Sets the timestamp of write operations.- Overrides:
timestamp
in classWriteOptions.WriteOptionsBuilder
- Parameters:
timestamp
- mutation date time.- Returns:
this
WriteOptions.WriteOptionsBuilder
-
withIfExists
Use light-weight transactions by applyingIF EXISTS
. Replaces a previousifCondition(Filter)
.- Returns:
this
DeleteOptions.DeleteOptionsBuilder
-
ifExists
Use light-weight transactions by applyingIF EXISTS
. Replaces a previousifCondition(Filter)
.- Parameters:
ifNotExists
- true to enableIF EXISTS
.- Returns:
this
DeleteOptions.DeleteOptionsBuilder
-
ifCondition
Use light-weight transactions by applyingIF
condition
. Replaces a previousifCondition(Filter)
andifExists(boolean)
.- Parameters:
criteria
- thecriteria
to apply for conditional updates, must not be null.- Returns:
this
DeleteOptions.DeleteOptionsBuilder
-
ifCondition
Use light-weight transactions by applyingIF
condition
. Replaces a previousifCondition(Filter)
andifExists(boolean)
.- Parameters:
condition
- thecondition
to apply for conditional deletes, must not be null.- Returns:
this
DeleteOptions.DeleteOptionsBuilder
-
build
Builds a newDeleteOptions
with the configured values.- Overrides:
build
in classWriteOptions.WriteOptionsBuilder
- Returns:
- a new
DeleteOptions
with the configured values
-