public class QueryOptions extends Object
QueryOptions allow tuning of various query options on a per-request
level. Only options that are set are applied to queries.| Modifier and Type | Class and Description |
|---|---|
static class |
QueryOptions.QueryOptionsBuilder
Builder for
QueryOptions. |
| Modifier | Constructor and Description |
|---|---|
protected |
QueryOptions(com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel,
ExecutionProfileResolver executionProfileResolver,
com.datastax.oss.driver.api.core.CqlIdentifier keyspace,
Integer pageSize,
com.datastax.oss.driver.api.core.ConsistencyLevel serialConsistencyLevel,
Duration timeout,
Boolean tracing) |
| Modifier and Type | Method and Description |
|---|---|
static QueryOptions.QueryOptionsBuilder |
builder()
Create a new
QueryOptions.QueryOptionsBuilder. |
static QueryOptions |
empty()
Create default
QueryOptions. |
boolean |
equals(Object o) |
protected com.datastax.oss.driver.api.core.ConsistencyLevel |
getConsistencyLevel() |
protected ExecutionProfileResolver |
getExecutionProfileResolver() |
com.datastax.oss.driver.api.core.CqlIdentifier |
getKeyspace() |
protected Integer |
getPageSize() |
protected Duration |
getReadTimeout()
Deprecated.
since 3.0, use
getTimeout() instead. |
protected com.datastax.oss.driver.api.core.ConsistencyLevel |
getSerialConsistencyLevel() |
protected Duration |
getTimeout() |
protected Boolean |
getTracing() |
int |
hashCode() |
QueryOptions.QueryOptionsBuilder |
mutate()
Create a new
QueryOptions.QueryOptionsBuilder to mutate properties of this QueryOptions. |
protected QueryOptions(@Nullable com.datastax.oss.driver.api.core.ConsistencyLevel consistencyLevel, ExecutionProfileResolver executionProfileResolver, @Nullable com.datastax.oss.driver.api.core.CqlIdentifier keyspace, @Nullable Integer pageSize, @Nullable com.datastax.oss.driver.api.core.ConsistencyLevel serialConsistencyLevel, Duration timeout, @Nullable Boolean tracing)
public static QueryOptions.QueryOptionsBuilder builder()
QueryOptions.QueryOptionsBuilder.QueryOptions.QueryOptionsBuilder.public static QueryOptions empty()
QueryOptions.QueryOptions.public QueryOptions.QueryOptionsBuilder mutate()
QueryOptions.QueryOptionsBuilder to mutate properties of this QueryOptions.QueryOptions.QueryOptionsBuilder initialized with this QueryOptions.@Nullable protected com.datastax.oss.driver.api.core.ConsistencyLevel getConsistencyLevel()
ConsistencyLevel.protected ExecutionProfileResolver getExecutionProfileResolver()
ExecutionProfileResolver.@Nullable protected Integer getPageSize()
@Deprecated protected Duration getReadTimeout()
getTimeout() instead.negative if not set.Statement.setTimeout(Duration)protected Duration getTimeout()
negative if not set.Statement.setTimeout(Duration)@Nullable protected com.datastax.oss.driver.api.core.ConsistencyLevel getSerialConsistencyLevel()
ConsistencyLevel.Statement.setSerialConsistencyLevel(ConsistencyLevel)@Nullable protected Boolean getTracing()
@Nullable public com.datastax.oss.driver.api.core.CqlIdentifier getKeyspace()
CqlSession will be used.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.