public static class InsertOptions.InsertOptionsBuilder extends WriteOptions.WriteOptionsBuilder
InsertOptions.timestamp, ttlconsistencyLevel, fetchSize, readTimeout, retryPolicy, tracing| Modifier and Type | Method and Description |
|---|---|
InsertOptions |
build()
Builds a new
InsertOptions with the configured values. |
InsertOptions.InsertOptionsBuilder |
consistencyLevel(com.datastax.driver.core.ConsistencyLevel consistencyLevel)
Sets the
ConsistencyLevel to use. |
InsertOptions.InsertOptionsBuilder |
fetchSize(int fetchSize)
Sets the query fetch size for
ResultSet chunks. |
InsertOptions.InsertOptionsBuilder |
ifNotExists(boolean ifNotExists)
Use light-weight transactions by applying
IF NOT EXISTS. |
InsertOptions.InsertOptionsBuilder |
readTimeout(Duration readTimeout)
Sets the read timeout.
|
InsertOptions.InsertOptionsBuilder |
readTimeout(long readTimeout)
Sets the read timeout in milliseconds.
|
InsertOptions.InsertOptionsBuilder |
readTimeout(long readTimeout,
TimeUnit timeUnit)
Deprecated.
|
InsertOptions.InsertOptionsBuilder |
retryPolicy(com.datastax.driver.core.policies.RetryPolicy driverRetryPolicy)
Sets the
driver RetryPolicy to use. |
InsertOptions.InsertOptionsBuilder |
timestamp(Instant timestamp)
Sets the timestamp of write operations.
|
InsertOptions.InsertOptionsBuilder |
timestamp(long timestamp)
Sets the timestamp of write operations.
|
InsertOptions.InsertOptionsBuilder |
tracing(boolean tracing)
Enables statement tracing.
|
InsertOptions.InsertOptionsBuilder |
ttl(Duration ttl)
Sets the time to live in seconds for write operations.
|
InsertOptions.InsertOptionsBuilder |
ttl(int ttl)
Sets the time to live in seconds for write operations.
|
InsertOptions.InsertOptionsBuilder |
withIfNotExists()
Use light-weight transactions by applying
IF NOT EXISTS. |
InsertOptions.InsertOptionsBuilder |
withInsertNulls()
Insert null values from an entity.
|
InsertOptions.InsertOptionsBuilder |
withInsertNulls(boolean insertNulls)
Insert null values from an entity.
|
InsertOptions.InsertOptionsBuilder |
withTracing()
Enables statement tracing.
|
public InsertOptions.InsertOptionsBuilder consistencyLevel(com.datastax.driver.core.ConsistencyLevel consistencyLevel)
QueryOptions.QueryOptionsBuilderConsistencyLevel to use.consistencyLevel in class WriteOptions.WriteOptionsBuilderconsistencyLevel - must not be null.this QueryOptions.QueryOptionsBuilderpublic InsertOptions.InsertOptionsBuilder retryPolicy(com.datastax.driver.core.policies.RetryPolicy driverRetryPolicy)
QueryOptions.QueryOptionsBuilderdriver RetryPolicy to use. Setting both ( RetryPolicy and driver RetryPolicy) retry policies is not supported.retryPolicy in class WriteOptions.WriteOptionsBuilderdriverRetryPolicy - must not be null.this QueryOptions.QueryOptionsBuilderpublic InsertOptions.InsertOptionsBuilder fetchSize(int fetchSize)
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 WriteOptions.WriteOptionsBuilderfetchSize - 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.QueryOptionsBuilderQueryOptions.getFetchSize(),
Cluster.Builder.withQueryOptions(com.datastax.driver.core.QueryOptions)public InsertOptions.InsertOptionsBuilder readTimeout(long readTimeout)
QueryOptions.QueryOptionsBuilderreadTimeout in class WriteOptions.WriteOptionsBuilderreadTimeout - 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.QueryOptionsBuilderSocketOptions.getReadTimeoutMillis(),
Cluster.Builder.withSocketOptions(SocketOptions)@Deprecated public InsertOptions.InsertOptionsBuilder readTimeout(long readTimeout, TimeUnit timeUnit)
QueryOptions.QueryOptionsBuilderreadTimeout in class WriteOptions.WriteOptionsBuilderreadTimeout - 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.QueryOptionsBuilderSocketOptions.getReadTimeoutMillis(),
Cluster.Builder.withSocketOptions(SocketOptions)public InsertOptions.InsertOptionsBuilder readTimeout(Duration readTimeout)
QueryOptions.QueryOptionsBuilderreadTimeout in class WriteOptions.WriteOptionsBuilderreadTimeout - the read timeout. Negative values are not allowed. If it is 0, the read timeout will
be disabled for this statement.this QueryOptions.QueryOptionsBuilderSocketOptions.getReadTimeoutMillis(),
Cluster.Builder.withSocketOptions(SocketOptions)public InsertOptions.InsertOptionsBuilder ttl(Duration ttl)
WriteOptions.WriteOptionsBuilderttl in class WriteOptions.WriteOptionsBuilderttl - the time to live.this WriteOptions.WriteOptionsBuilderpublic InsertOptions.InsertOptionsBuilder tracing(boolean tracing)
QueryOptions.QueryOptionsBuildertracing in class WriteOptions.WriteOptionsBuildertracing - true to enable statement tracing to the executed statements.this QueryOptions.QueryOptionsBuilderpublic InsertOptions.InsertOptionsBuilder withTracing()
QueryOptions.QueryOptionsBuilderwithTracing in class WriteOptions.WriteOptionsBuilderthis QueryOptions.QueryOptionsBuilderpublic InsertOptions.InsertOptionsBuilder ttl(int ttl)
WriteOptions.WriteOptionsBuilderttl in class WriteOptions.WriteOptionsBuilderttl - the time to live.this WriteOptions.WriteOptionsBuilderpublic InsertOptions.InsertOptionsBuilder timestamp(long timestamp)
WriteOptions.WriteOptionsBuildertimestamp in class WriteOptions.WriteOptionsBuildertimestamp - mutation timestamp in microseconds.this WriteOptions.WriteOptionsBuilderTimeUnit.MICROSECONDSpublic InsertOptions.InsertOptionsBuilder timestamp(Instant timestamp)
WriteOptions.WriteOptionsBuildertimestamp in class WriteOptions.WriteOptionsBuildertimestamp - mutation date time.this WriteOptions.WriteOptionsBuilderpublic InsertOptions.InsertOptionsBuilder withIfNotExists()
IF NOT EXISTS.this InsertOptions.InsertOptionsBuilderpublic InsertOptions.InsertOptionsBuilder ifNotExists(boolean ifNotExists)
IF NOT EXISTS.ifNotExists - true to enable IF NOT EXISTS.this InsertOptions.InsertOptionsBuilderpublic InsertOptions.InsertOptionsBuilder withInsertNulls()
INSERT statements as upsert by
ensuring * that the whole entity state is persisted. Inserting nulls in Cassandra creates tombstones
so this * option should be used with caution.this InsertOptions.InsertOptionsBuilderpublic InsertOptions.InsertOptionsBuilder withInsertNulls(boolean insertNulls)
INSERT statements as upsert by
ensuring that the whole entity state is persisted. Inserting nulls in Cassandra creates tombstones so
this option should be used with caution.insertNulls - true to enable insertion of null values.this InsertOptions.InsertOptionsBuilderpublic InsertOptions build()
InsertOptions with the configured values.build in class WriteOptions.WriteOptionsBuilderInsertOptions with the configured valuesCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.