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(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel, ExecutionProfileResolver executionProfileResolver, Boolean idempotent, com.datastax.oss.driver.api.core.CqlIdentifier keyspace, Integer pageSize, com.datastax.oss.driver.api.core.CqlIdentifier routingKeyspace, ByteBuffer routingKey, com.datastax.oss.driver.api.core.ConsistencyLevel serialConsistencyLevel, Duration timeout, Boolean tracing) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a newQueryOptions.QueryOptionsBuilder.static QueryOptionsempty()Create defaultQueryOptions.booleanprotected com.datastax.oss.driver.api.core.ConsistencyLevelprotected ExecutionProfileResolvercom.datastax.oss.driver.api.core.CqlIdentifierprotected Integerprotected DurationDeprecated, for removal: This API element is subject to removal in a future version.protected ByteBufferprotected com.datastax.oss.driver.api.core.CqlIdentifierprotected com.datastax.oss.driver.api.core.ConsistencyLevelprotected Durationprotected BooleaninthashCode()protected 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
- 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:
-
Statement.setIdempotent(Boolean)
-
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
-
getReadTimeout
Deprecated, for removal: This API element is subject to removal in a future version.since 3.0, usegetTimeout()instead.- Returns:
- the command timeout. May be
negativeif not set. - Since:
- 1.5
- See Also:
-
Statement.setTimeout(Duration)
-
getRoutingKeyspace
- Returns:
- the keyspace used for token-aware routing. May be null if token-aware routing is disabled.
- Since:
- 3.4
- See Also:
-
Statement.setRoutingKeyspace(CqlIdentifier)
-
getRoutingKey
- Returns:
- the key used for token-aware routing. May be null if token-aware routing is disabled.
- Since:
- 3.4
- See Also:
-
Statement.setRoutingKey(ByteBuffer)
-
getTimeout
- Returns:
- the command timeout. May be
negativeif not set. - Since:
- 3.0
- See Also:
-
Statement.setTimeout(Duration)
-
getSerialConsistencyLevel
- Returns:
- the serial
ConsistencyLevel. - Since:
- 3.0
- See Also:
-
Statement.setSerialConsistencyLevel(ConsistencyLevel)
-
getTracing
- Returns:
- whether to enable tracing. May be null if not set.
-
equals
-
hashCode
public int hashCode()
-
getTimeout()instead.