public class QueryContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QueryContext.IndexMatchHint
Defines possible index matching hints.
|
Modifier and Type | Field and Description |
---|---|
protected Indexes |
indexes |
protected int |
ownedPartitionCount |
Constructor and Description |
---|
QueryContext(Indexes indexes,
int ownedPartitionCount)
Creates a new query context with the given available indexes.
|
Modifier and Type | Method and Description |
---|---|
Index |
getIndex(String attribute)
Obtains the index available for the given attribute in this query
context.
|
int |
getOwnedPartitionCount() |
Index |
matchIndex(String pattern,
QueryContext.IndexMatchHint matchHint)
Matches an index for the given pattern and match hint.
|
void |
setOwnedPartitionCount(int ownedPartitionCount)
Sets owned partitions count a query runs on.
|
protected Indexes indexes
protected int ownedPartitionCount
public QueryContext(Indexes indexes, int ownedPartitionCount)
indexes
- the indexes available for the query context.public int getOwnedPartitionCount()
public void setOwnedPartitionCount(int ownedPartitionCount)
ownedPartitionCount
- a count of owned partitions.public Index getIndex(String attribute)
attribute
- the attribute to obtain the index for.null
if there is no index available
for the given attribute.public Index matchIndex(String pattern, QueryContext.IndexMatchHint matchHint)
pattern
- the pattern to match an index for. May be either an
attribute name or an exact index name. It's a caller's
responsibility to canonicalize the passed pattern as
specified by PredicateUtils.canonicalizeAttribute(java.lang.String)
and Index.getName()
.matchHint
- the match hint.null
if nothing matched.QueryContext.IndexMatchHint
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.