public static class InsertOptions.InsertOptionsBuilder extends WriteOptions.WriteOptionsBuilder
InsertOptions.timestamp, ttlconsistencyLevel, executionProfileResolver, keyspace, pageSize, serialConsistencyLevel, timeout, tracing| Modifier and Type | Method and Description |
|---|---|
InsertOptions |
build()
Builds a new
InsertOptions with the configured values. |
InsertOptions.InsertOptionsBuilder |
consistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
Sets the
ConsistencyLevel to use. |
InsertOptions.InsertOptionsBuilder |
executionProfile(ExecutionProfileResolver executionProfileResolver)
Sets the
ExecutionProfileResolver to use. |
InsertOptions.InsertOptionsBuilder |
executionProfile(String profileName)
Sets the
execution profile to use. |
InsertOptions.InsertOptionsBuilder |
fetchSize(int fetchSize)
Deprecated.
|
InsertOptions.InsertOptionsBuilder |
ifNotExists(boolean ifNotExists)
Use light-weight transactions by applying
IF NOT EXISTS. |
InsertOptions.InsertOptionsBuilder |
keyspace(com.datastax.oss.driver.api.core.CqlIdentifier keyspace)
Sets the
keyspace to use. |
InsertOptions.InsertOptionsBuilder |
pageSize(int pageSize)
Sets the query fetch size for
ResultSet chunks. |
InsertOptions.InsertOptionsBuilder |
readTimeout(long readTimeout)
Deprecated.
|
InsertOptions.InsertOptionsBuilder |
readTimeout(long readTimeout,
TimeUnit timeUnit)
Deprecated.
|
InsertOptions.InsertOptionsBuilder |
serialConsistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
Sets the serial
ConsistencyLevel to use. |
InsertOptions.InsertOptionsBuilder |
timeout(Duration timeout)
Sets the request timeout.
|
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.
|
readTimeoutpublic InsertOptions.InsertOptionsBuilder consistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
QueryOptions.QueryOptionsBuilderConsistencyLevel to use.consistencyLevel in class WriteOptions.WriteOptionsBuilderconsistencyLevel - must not be null.this QueryOptions.QueryOptionsBuilderpublic InsertOptions.InsertOptionsBuilder executionProfile(String profileName)
QueryOptions.QueryOptionsBuilderexecution profile to use.executionProfile in class WriteOptions.WriteOptionsBuilderprofileName - must not be null or empty.this QueryOptions.QueryOptionsBuilderStatement.setExecutionProfileName(String)public InsertOptions.InsertOptionsBuilder executionProfile(ExecutionProfileResolver executionProfileResolver)
QueryOptions.QueryOptionsBuilderExecutionProfileResolver to use.executionProfile in class WriteOptions.WriteOptionsBuilderexecutionProfileResolver - must not be null.this QueryOptions.QueryOptionsBuilderStatement.setExecutionProfile(DriverExecutionProfile)@Deprecated public 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.QueryOptionsBuilderpublic InsertOptions.InsertOptionsBuilder 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 WriteOptions.WriteOptionsBuilderkeyspace - the specific keyspace to use to run a statement, must not be null.this QueryOptions.QueryOptionsBuilder.public InsertOptions.InsertOptionsBuilder 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 WriteOptions.WriteOptionsBuilderpageSize - 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 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.QueryOptionsBuilderStatement.setTimeout(Duration)@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.QueryOptionsBuilderStatement.setTimeout(Duration)public InsertOptions.InsertOptionsBuilder serialConsistencyLevel(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel)
QueryOptions.QueryOptionsBuilderConsistencyLevel to use.serialConsistencyLevel in class WriteOptions.WriteOptionsBuilderconsistencyLevel - must not be null.this QueryOptions.QueryOptionsBuilderpublic InsertOptions.InsertOptionsBuilder timeout(Duration timeout)
QueryOptions.QueryOptionsBuildertimeout in class WriteOptions.WriteOptionsBuildertimeout - 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 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–2021 Pivotal Software, Inc.. All rights reserved.