public class QueryEvaluationHint
extends java.lang.Object
This class is immutable. Overriding options will create a new instance.
Here be dragons: for advanced users only.
Modifier and Type | Class and Description |
---|---|
static class |
QueryEvaluationHint.BackendRequirement |
Constructor and Description |
---|
QueryEvaluationHint(java.util.Map<QueryHintOption<?>,java.lang.Object> backendHintSettings,
IQueryBackendFactory queryBackendFactory)
Specifies the suggested query backend, and value settings for additional backend-specific options.
|
QueryEvaluationHint(java.util.Map<QueryHintOption<?>,java.lang.Object> backendHintSettings,
QueryEvaluationHint.BackendRequirement backendRequirementType)
Specifies the suggested query backend requirements, and value settings for additional backend-specific options.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Map<QueryHintOption<?>,java.lang.Object> |
getBackendHintSettings()
Each entry in the immutable map overrides backend-specific options regarding query evaluation.
|
IQueryBackendFactory |
getQueryBackendFactory()
A suggestion for choosing the query evaluator algorithm.
|
QueryEvaluationHint.BackendRequirement |
getQueryBackendRequirementType()
Returns the backend requirement described by this hint.
|
<HintValue> |
getValueOrDefault(QueryHintOption<HintValue> option)
Returns the value of the given hint option from the given hint collection, or the default value if not defined.
|
<HintValue> |
getValueOrNull(QueryHintOption<HintValue> option)
Returns the value of the given hint option from the given hint collection, or null if not defined.
|
int |
hashCode() |
boolean |
isOptionOverridden(QueryHintOption<?> option)
Returns whether the given hint option is overridden.
|
QueryEvaluationHint |
overrideBy(QueryEvaluationHint overridingHint)
Override values in this hint and return a consolidated instance.
|
java.lang.String |
toString() |
public QueryEvaluationHint(java.util.Map<QueryHintOption<?>,java.lang.Object> backendHintSettings, QueryEvaluationHint.BackendRequirement backendRequirementType)
The backend requirement type must not be QueryEvaluationHint.BackendRequirement.SPECIFIC
- for that case, use the constructor
QueryEvaluationHint(Map, IQueryBackendFactory)
.
backendHintSettings
- if non-null, each entry in the map overrides backend-specific options regarding query evaluation
(null-valued map entries permitted to erase hints); passing null means default options associated with
the querybackendRequirementType
- defines the kind of backend requirementpublic QueryEvaluationHint(java.util.Map<QueryHintOption<?>,java.lang.Object> backendHintSettings, IQueryBackendFactory queryBackendFactory)
QueryEvaluationHint.BackendRequirement.UNSPECIFIED
parameter.backendHintSettings
- if non-null, each entry in the map overrides backend-specific options regarding query evaluation
(null-valued map entries permitted to erase hints); passing null means default options associated with
the queryqueryBackendFactory
- overrides the query evaluator algorithm; passing null retains the default algorithm associated with
the querypublic QueryEvaluationHint.BackendRequirement getQueryBackendRequirementType()
getQueryBackendFactory()
.public IQueryBackendFactory getQueryBackendFactory()
Returns null iff getQueryBackendRequirementType()
does not return QueryEvaluationHint.BackendRequirement.SPECIFIC
;
in such cases a corresponding default backend is selected inside the engine
public java.util.Map<QueryHintOption<?>,java.lang.Object> getBackendHintSettings()
The map is non-null, even if empty.
Null-valued map entries are also permitted to erase hints via overrideBy(QueryEvaluationHint)
.
public QueryEvaluationHint overrideBy(QueryEvaluationHint overridingHint)
public boolean isOptionOverridden(QueryHintOption<?> option)
public <HintValue> HintValue getValueOrNull(QueryHintOption<HintValue> option)
public <HintValue> HintValue getValueOrDefault(QueryHintOption<HintValue> option)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object