public static class WriteOptions.WriteOptionsBuilder extends QueryOptions.QueryOptionsBuilder
WriteOptions.| Modifier and Type | Field and Description |
|---|---|
protected Long |
timestamp |
protected Duration |
ttl |
consistencyLevel, executionProfileResolver, keyspace, pageSize, serialConsistencyLevel, timeout, tracing| Modifier | Constructor and Description |
|---|---|
protected |
WriteOptionsBuilder() |
protected |
WriteOptionsBuilder(WriteOptions writeOptions) |
| Modifier and Type | Method and Description |
|---|---|
WriteOptions |
build()
Builds a new
WriteOptions with the configured values. |
WriteOptions.WriteOptionsBuilder |
consistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
Sets the
ConsistencyLevel to use. |
WriteOptions.WriteOptionsBuilder |
executionProfile(ExecutionProfileResolver executionProfileResolver)
Sets the
ExecutionProfileResolver to use. |
WriteOptions.WriteOptionsBuilder |
executionProfile(String profileName)
Sets the
execution profile to use. |
WriteOptions.WriteOptionsBuilder |
fetchSize(int pageSize)
Deprecated.
|
WriteOptions.WriteOptionsBuilder |
keyspace(com.datastax.oss.driver.api.core.CqlIdentifier keyspace)
Sets the
keyspace to use. |
WriteOptions.WriteOptionsBuilder |
pageSize(int pageSize)
Sets the query fetch size for
ResultSet chunks. |
WriteOptions.WriteOptionsBuilder |
readTimeout(long readTimeout)
Deprecated.
|
WriteOptions.WriteOptionsBuilder |
readTimeout(long readTimeout,
TimeUnit timeUnit)
Deprecated.
|
WriteOptions.WriteOptionsBuilder |
serialConsistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
Sets the serial
ConsistencyLevel to use. |
WriteOptions.WriteOptionsBuilder |
timeout(Duration timeout)
Sets the request timeout.
|
WriteOptions.WriteOptionsBuilder |
timestamp(Instant timestamp)
Sets the timestamp of write operations.
|
WriteOptions.WriteOptionsBuilder |
timestamp(long timestamp)
Sets the timestamp of write operations.
|
WriteOptions.WriteOptionsBuilder |
tracing(boolean tracing)
Enables statement tracing.
|
WriteOptions.WriteOptionsBuilder |
ttl(Duration ttl)
Sets the time to live in seconds for write operations.
|
WriteOptions.WriteOptionsBuilder |
ttl(int ttl)
Sets the time to live in seconds for write operations.
|
WriteOptions.WriteOptionsBuilder |
withTracing()
Enables statement tracing.
|
readTimeoutprotected WriteOptionsBuilder()
protected WriteOptionsBuilder(WriteOptions writeOptions)
public WriteOptions.WriteOptionsBuilder consistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
QueryOptions.QueryOptionsBuilderConsistencyLevel to use.consistencyLevel in class QueryOptions.QueryOptionsBuilderconsistencyLevel - must not be null.this QueryOptions.QueryOptionsBuilderpublic WriteOptions.WriteOptionsBuilder executionProfile(String profileName)
QueryOptions.QueryOptionsBuilderexecution profile to use.executionProfile in class QueryOptions.QueryOptionsBuilderprofileName - must not be null or empty.this QueryOptions.QueryOptionsBuilderStatement.setExecutionProfileName(String)public WriteOptions.WriteOptionsBuilder executionProfile(ExecutionProfileResolver executionProfileResolver)
QueryOptions.QueryOptionsBuilderExecutionProfileResolver to use.executionProfile in class QueryOptions.QueryOptionsBuilderexecutionProfileResolver - must not be null.this QueryOptions.QueryOptionsBuilderStatement.setExecutionProfile(DriverExecutionProfile)@Deprecated public WriteOptions.WriteOptionsBuilder fetchSize(int pageSize)
QueryOptions.QueryOptionsBuilderResultSet 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 QueryOptions.QueryOptionsBuilderpageSize - 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.QueryOptionsBuilderpublic WriteOptions.WriteOptionsBuilder keyspace(com.datastax.oss.driver.api.core.CqlIdentifier keyspace)
QueryOptions.QueryOptionsBuilderkeyspace to use. If left unconfigured, then the keyspace set on the statement or
CqlSession will be used.keyspace in class QueryOptions.QueryOptionsBuilderkeyspace - the specific keyspace to use to run a statement, must not be null.this QueryOptions.QueryOptionsBuilder.public WriteOptions.WriteOptionsBuilder pageSize(int pageSize)
QueryOptions.QueryOptionsBuilderResultSet 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 QueryOptions.QueryOptionsBuilderpageSize - 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 WriteOptions.WriteOptionsBuilder readTimeout(long readTimeout)
QueryOptions.QueryOptionsBuilderreadTimeout in class QueryOptions.QueryOptionsBuilderreadTimeout - 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.QueryOptionsBuilderStatement.setTimeout(Duration)@Deprecated public WriteOptions.WriteOptionsBuilder readTimeout(long readTimeout, TimeUnit timeUnit)
QueryOptions.QueryOptionsBuilderreadTimeout in class QueryOptions.QueryOptionsBuilderreadTimeout - 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.QueryOptionsBuilderStatement.setTimeout(Duration)public WriteOptions.WriteOptionsBuilder serialConsistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
QueryOptions.QueryOptionsBuilderConsistencyLevel to use.serialConsistencyLevel in class QueryOptions.QueryOptionsBuilderconsistencyLevel - must not be null.this QueryOptions.QueryOptionsBuilderpublic WriteOptions.WriteOptionsBuilder timeout(Duration timeout)
QueryOptions.QueryOptionsBuildertimeout in class QueryOptions.QueryOptionsBuildertimeout - the read timeout. Negative values are not allowed. If it is 0, the read timeout will be
disabled for this statement.this QueryOptions.QueryOptionsBuilderStatement.setTimeout(Duration)public WriteOptions.WriteOptionsBuilder tracing(boolean tracing)
QueryOptions.QueryOptionsBuildertracing in class QueryOptions.QueryOptionsBuildertracing - true to enable statement tracing to the executed statements.this QueryOptions.QueryOptionsBuilderpublic WriteOptions.WriteOptionsBuilder withTracing()
QueryOptions.QueryOptionsBuilderwithTracing in class QueryOptions.QueryOptionsBuilderthis QueryOptions.QueryOptionsBuilderpublic WriteOptions.WriteOptionsBuilder ttl(int ttl)
ttl - the time to live.this WriteOptions.WriteOptionsBuilderpublic WriteOptions.WriteOptionsBuilder ttl(Duration ttl)
ttl - the time to live.this WriteOptions.WriteOptionsBuilderpublic WriteOptions.WriteOptionsBuilder timestamp(long timestamp)
timestamp - mutation timestamp in microseconds.this WriteOptions.WriteOptionsBuilderTimeUnit.MICROSECONDSpublic WriteOptions.WriteOptionsBuilder timestamp(Instant timestamp)
timestamp - mutation date time.this WriteOptions.WriteOptionsBuilderpublic WriteOptions build()
WriteOptions with the configured values.build in class QueryOptions.QueryOptionsBuilderWriteOptions with the configured valuesCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.