public static class UpdateOptions.UpdateOptionsBuilder extends WriteOptions.WriteOptionsBuilder
UpdateOptions
.timestamp, ttl
consistencyLevel, executionProfileResolver, keyspace, pageSize, serialConsistencyLevel, timeout, tracing
Modifier and Type | Method and Description |
---|---|
UpdateOptions |
build()
Builds a new
UpdateOptions with the configured values. |
UpdateOptions.UpdateOptionsBuilder |
consistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
Sets the
ConsistencyLevel to use. |
UpdateOptions.UpdateOptionsBuilder |
executionProfile(ExecutionProfileResolver executionProfileResolver)
Sets the
ExecutionProfileResolver to use. |
UpdateOptions.UpdateOptionsBuilder |
executionProfile(String profileName)
Sets the
execution profile to use. |
UpdateOptions.UpdateOptionsBuilder |
fetchSize(int fetchSize)
Deprecated.
|
UpdateOptions.UpdateOptionsBuilder |
ifCondition(CriteriaDefinition criteria)
Use light-weight transactions by applying
IF condition . |
UpdateOptions.UpdateOptionsBuilder |
ifCondition(Filter condition)
Use light-weight transactions by applying
IF condition . |
UpdateOptions.UpdateOptionsBuilder |
ifExists(boolean ifNotExists)
Use light-weight transactions by applying
IF EXISTS . |
UpdateOptions.UpdateOptionsBuilder |
keyspace(com.datastax.oss.driver.api.core.CqlIdentifier keyspace)
Sets the
keyspace to use. |
UpdateOptions.UpdateOptionsBuilder |
pageSize(int pageSize)
Sets the query fetch size for
ResultSet chunks. |
UpdateOptions.UpdateOptionsBuilder |
readTimeout(long readTimeout)
Deprecated.
|
UpdateOptions.UpdateOptionsBuilder |
readTimeout(long readTimeout,
TimeUnit timeUnit)
Deprecated.
|
UpdateOptions.UpdateOptionsBuilder |
serialConsistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
Sets the serial
ConsistencyLevel to use. |
UpdateOptions.UpdateOptionsBuilder |
timeout(Duration timeout)
Sets the request timeout.
|
UpdateOptions.UpdateOptionsBuilder |
timestamp(Instant timestamp)
Sets the timestamp of write operations.
|
UpdateOptions.UpdateOptionsBuilder |
timestamp(long timestamp)
Sets the timestamp of write operations.
|
UpdateOptions.UpdateOptionsBuilder |
tracing(boolean tracing)
Enables statement tracing.
|
UpdateOptions.UpdateOptionsBuilder |
ttl(Duration ttl)
Sets the time to live in seconds for write operations.
|
UpdateOptions.UpdateOptionsBuilder |
ttl(int ttl)
Sets the time to live in seconds for write operations.
|
UpdateOptions.UpdateOptionsBuilder |
withIfExists()
Use light-weight transactions by applying
IF EXISTS . |
UpdateOptions.UpdateOptionsBuilder |
withTracing()
Enables statement tracing.
|
readTimeout
public UpdateOptions.UpdateOptionsBuilder consistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
QueryOptions.QueryOptionsBuilder
ConsistencyLevel
to use.consistencyLevel
in class WriteOptions.WriteOptionsBuilder
consistencyLevel
- must not be null.this
QueryOptions.QueryOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder executionProfile(String profileName)
QueryOptions.QueryOptionsBuilder
execution profile
to use.executionProfile
in class WriteOptions.WriteOptionsBuilder
profileName
- must not be null or empty.this
QueryOptions.QueryOptionsBuilder
Statement.setExecutionProfileName(String)
public UpdateOptions.UpdateOptionsBuilder executionProfile(ExecutionProfileResolver executionProfileResolver)
QueryOptions.QueryOptionsBuilder
ExecutionProfileResolver
to use.executionProfile
in class WriteOptions.WriteOptionsBuilder
executionProfileResolver
- must not be null.this
QueryOptions.QueryOptionsBuilder
Statement.setExecutionProfile(DriverExecutionProfile)
@Deprecated public UpdateOptions.UpdateOptionsBuilder fetchSize(int fetchSize)
QueryOptions.QueryOptionsBuilder
ResultSet
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.
fetchSize
in class WriteOptions.WriteOptionsBuilder
fetchSize
- the number of rows to fetch per chunking request. To disable chunking of the result set, use
fetchSize == Integer.MAX_VALUE
. Negative values are not allowed.this
QueryOptions.QueryOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder keyspace(com.datastax.oss.driver.api.core.CqlIdentifier keyspace)
QueryOptions.QueryOptionsBuilder
keyspace
to use. If left unconfigured, then the keyspace set on the statement or
CqlSession
will be used.keyspace
in class WriteOptions.WriteOptionsBuilder
keyspace
- the specific keyspace to use to run a statement, must not be null.this
QueryOptions.QueryOptionsBuilder
.public UpdateOptions.UpdateOptionsBuilder pageSize(int pageSize)
QueryOptions.QueryOptionsBuilder
ResultSet
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.
pageSize
in class WriteOptions.WriteOptionsBuilder
pageSize
- the number of rows to fetch per chunking request. To disable chunking of the result set, use
pageSize == Integer.MAX_VALUE
. Negative values are not allowed.this
QueryOptions.QueryOptionsBuilder
@Deprecated public UpdateOptions.UpdateOptionsBuilder readTimeout(long readTimeout)
QueryOptions.QueryOptionsBuilder
readTimeout
in class WriteOptions.WriteOptionsBuilder
readTimeout
- the read timeout in milliseconds. Negative values are not allowed. If it is 0
, the
read timeout will be disabled for this statement.this
QueryOptions.QueryOptionsBuilder
Statement.setTimeout(Duration)
@Deprecated public UpdateOptions.UpdateOptionsBuilder readTimeout(long readTimeout, TimeUnit timeUnit)
QueryOptions.QueryOptionsBuilder
readTimeout
in class WriteOptions.WriteOptionsBuilder
readTimeout
- the read timeout value. Negative values are not allowed. If it is 0
, the read timeout
will be disabled for this statement.timeUnit
- the TimeUnit
for the supplied timeout; must not be null.this
QueryOptions.QueryOptionsBuilder
Statement.setTimeout(Duration)
public UpdateOptions.UpdateOptionsBuilder serialConsistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
QueryOptions.QueryOptionsBuilder
ConsistencyLevel
to use.serialConsistencyLevel
in class WriteOptions.WriteOptionsBuilder
consistencyLevel
- must not be null.this
QueryOptions.QueryOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder timeout(Duration timeout)
QueryOptions.QueryOptionsBuilder
timeout
in class WriteOptions.WriteOptionsBuilder
timeout
- the read timeout. Negative values are not allowed. If it is 0
, the read timeout will be
disabled for this statement.this
QueryOptions.QueryOptionsBuilder
Statement.setTimeout(Duration)
public UpdateOptions.UpdateOptionsBuilder ttl(Duration ttl)
WriteOptions.WriteOptionsBuilder
ttl
in class WriteOptions.WriteOptionsBuilder
ttl
- the time to live.this
WriteOptions.WriteOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder tracing(boolean tracing)
QueryOptions.QueryOptionsBuilder
tracing
in class WriteOptions.WriteOptionsBuilder
tracing
- true to enable statement tracing to the executed statements.this
QueryOptions.QueryOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder withTracing()
QueryOptions.QueryOptionsBuilder
withTracing
in class WriteOptions.WriteOptionsBuilder
this
QueryOptions.QueryOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder ttl(int ttl)
WriteOptions.WriteOptionsBuilder
ttl
in class WriteOptions.WriteOptionsBuilder
ttl
- the time to live.this
WriteOptions.WriteOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder timestamp(long timestamp)
WriteOptions.WriteOptionsBuilder
timestamp
in class WriteOptions.WriteOptionsBuilder
timestamp
- mutation timestamp in microseconds.this
WriteOptions.WriteOptionsBuilder
TimeUnit.MICROSECONDS
public UpdateOptions.UpdateOptionsBuilder timestamp(Instant timestamp)
WriteOptions.WriteOptionsBuilder
timestamp
in class WriteOptions.WriteOptionsBuilder
timestamp
- mutation date time.this
WriteOptions.WriteOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder withIfExists()
IF EXISTS
. Replaces a previous ifCondition(Filter)
.this
UpdateOptions.UpdateOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder ifExists(boolean ifNotExists)
IF EXISTS
. Replaces a previous ifCondition(Filter)
.ifNotExists
- true to enable IF EXISTS
.this
UpdateOptions.UpdateOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder ifCondition(CriteriaDefinition criteria)
IF
condition
. Replaces a previous
ifCondition(Filter)
and ifExists(boolean)
.criteria
- the criteria
to apply for conditional updates, must not be null.this
UpdateOptions.UpdateOptionsBuilder
public UpdateOptions.UpdateOptionsBuilder ifCondition(Filter condition)
IF
condition
. Replaces a previous
ifCondition(Filter)
and ifExists(boolean)
.condition
- the condition
to apply for conditional updates, must not be null.this
UpdateOptions.UpdateOptionsBuilder
public UpdateOptions build()
UpdateOptions
with the configured values.build
in class WriteOptions.WriteOptionsBuilder
UpdateOptions
with the configured valuesCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.