Class QueryOptions
java.lang.Object
org.springframework.data.cassandra.core.cql.QueryOptions
- Direct Known Subclasses:
WriteOptions
Cassandra Query Options for queries.
QueryOptions allow tuning of various query options on a per-request
level. Only options that are set are applied to queries.- Author:
- David Webb, Mark Paluch, Tomasz Lelek, Sam Lightfoot
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQueryOptions(@Nullable com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel, ExecutionProfileResolver executionProfileResolver, @Nullable Boolean idempotent, @Nullable com.datastax.oss.driver.api.core.CqlIdentifier keyspace, @Nullable Integer pageSize, @Nullable com.datastax.oss.driver.api.core.CqlIdentifier routingKeyspace, @Nullable ByteBuffer routingKey, @Nullable com.datastax.oss.driver.api.core.ConsistencyLevel serialConsistencyLevel, Duration timeout, @Nullable Boolean tracing) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a newQueryOptions.QueryOptionsBuilder.static QueryOptionsempty()Create defaultQueryOptions.booleanprotected @Nullable com.datastax.oss.driver.api.core.ConsistencyLevelprotected ExecutionProfileResolver@Nullable com.datastax.oss.driver.api.core.CqlIdentifierprotected @Nullable Integerprotected @Nullable ByteBufferprotected @Nullable com.datastax.oss.driver.api.core.CqlIdentifierprotected @Nullable com.datastax.oss.driver.api.core.ConsistencyLevelprotected Durationprotected @Nullable BooleaninthashCode()protected @Nullable Booleanmutate()Create a newQueryOptions.QueryOptionsBuilderto mutate properties of thisQueryOptions.
-
Constructor Details
-
QueryOptions
protected QueryOptions(@Nullable com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel, ExecutionProfileResolver executionProfileResolver, @Nullable Boolean idempotent, @Nullable com.datastax.oss.driver.api.core.CqlIdentifier keyspace, @Nullable Integer pageSize, @Nullable com.datastax.oss.driver.api.core.CqlIdentifier routingKeyspace, @Nullable ByteBuffer routingKey, @Nullable com.datastax.oss.driver.api.core.ConsistencyLevel serialConsistencyLevel, Duration timeout, @Nullable Boolean tracing)
-
-
Method Details
-
builder
Create a newQueryOptions.QueryOptionsBuilder.- Returns:
- a new
QueryOptions.QueryOptionsBuilder. - Since:
- 1.5
-
empty
Create defaultQueryOptions.- Returns:
- default
QueryOptions. - Since:
- 2.0
-
mutate
Create a newQueryOptions.QueryOptionsBuilderto mutate properties of thisQueryOptions.- Returns:
- a new
QueryOptions.QueryOptionsBuilderinitialized with thisQueryOptions. - Since:
- 2.0
-
getConsistencyLevel
protected @Nullable com.datastax.oss.driver.api.core.ConsistencyLevel getConsistencyLevel()- Returns:
- the driver
ConsistencyLevel. - Since:
- 1.5
-
getExecutionProfileResolver
- Returns:
- the
ExecutionProfileResolver. - Since:
- 3.0
-
isIdempotent
- Returns:
- whether query is idempotent. May be null if not set.
- Since:
- 3.4
- See Also:
-
getKeyspace
public @Nullable com.datastax.oss.driver.api.core.CqlIdentifier getKeyspace()- Returns:
- the keyspace associated with the query. If it is null, it means that either keyspace configured
on the statement or from the
CqlSessionwill be used. - Since:
- 3.1
-
getPageSize
- Returns:
- the number of rows to fetch per chunking request. May be null if not set.
- Since:
- 1.5
-
getRoutingKeyspace
protected @Nullable com.datastax.oss.driver.api.core.CqlIdentifier getRoutingKeyspace()- Returns:
- the keyspace used for token-aware routing. May be null if token-aware routing is disabled.
- Since:
- 3.4
- See Also:
-
getRoutingKey
- Returns:
- the key used for token-aware routing. May be null if token-aware routing is disabled.
- Since:
- 3.4
- See Also:
-
getTimeout
-
getSerialConsistencyLevel
protected @Nullable com.datastax.oss.driver.api.core.ConsistencyLevel getSerialConsistencyLevel()- Returns:
- the serial
ConsistencyLevel. - Since:
- 3.0
- See Also:
-
getTracing
- Returns:
- whether to enable tracing. May be null if not set.
-
equals
-
hashCode
-