public class CompositeEqualPredicate extends Object implements Predicate, IndexAwarePredicate
EqualPredicate
but for composite indexes and
values.Constructor and Description |
---|
CompositeEqualPredicate(InternalIndex index,
CompositeValue value)
Constructs a new composite equal predicate for the given index and
composite value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(Map.Entry entry)
Applies this predicate to the given map entry.
|
Set<QueryableEntry> |
filter(QueryContext queryContext)
Produces a filtered entry set by utilizing the indexes available while
executing the query in the given query context.
|
boolean |
isIndexed(QueryContext queryContext)
Signals to the query engine that this predicate is able to utilize the
indexes available while executing the query in the given query context.
|
String |
toString() |
public CompositeEqualPredicate(InternalIndex index, CompositeValue value)
index
- the index to construct the predicate on.value
- the value to construct the predicate for.public boolean apply(Map.Entry entry)
Predicate
Implementations must be thread-safe, since this method may be called by multiple threads concurrently.
public Set<QueryableEntry> filter(QueryContext queryContext)
IndexAwarePredicate
The query engine assumes this method produces the result set faster than a simple evaluation of the predicate on every entry.
filter
in interface IndexAwarePredicate
queryContext
- the query context to access the indexes. The passed
query context is valid only for a duration of a single
call to the method.public boolean isIndexed(QueryContext queryContext)
IndexAwarePredicate
isIndexed
in interface IndexAwarePredicate
queryContext
- the query context to consult for the available
indexes.true
if this predicate is able to use the indexes to
speed up the processing, false
otherwise.Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.