public interface IndexStore
Index
implementation.Modifier and Type | Method and Description |
---|---|
boolean |
canEvaluate(Class<? extends Predicate> predicateClass) |
Comparable |
canonicalizeQueryArgumentScalar(Comparable value)
Canonicalizes the given value for the purpose of a hash-based lookup.
|
void |
clear()
Clears the contents of this index by purging all its entries.
|
void |
destroy()
Destroys this index by releasing all its resources.
|
Set<QueryableEntry> |
evaluate(Predicate predicate,
TypeConverter converter)
Evaluates the given predicate using this index store.
|
Set<QueryableEntry> |
getRecords(Comparable value)
Obtains entries that have indexed attribute value equal to the given
value.
|
Set<QueryableEntry> |
getRecords(Comparable from,
boolean fromInclusive,
Comparable to,
boolean toInclusive)
Obtains entries that have indexed attribute value belonging to the given
range.
|
Set<QueryableEntry> |
getRecords(Comparison comparison,
Comparable value)
Obtains entries that have indexed attribute value satisfying the given
comparison with the given value.
|
Set<QueryableEntry> |
getRecords(Set<Comparable> values)
Obtains entries that have indexed attribute value equal to one of the
given set of values.
|
void |
insert(Object value,
QueryableEntry entry,
IndexOperationStats operationStats)
Inserts the given entry into this index store under the given value
acting as an index key.
|
boolean |
isEvaluateOnly() |
void |
remove(Object value,
Data entryKey,
Object entryValue,
IndexOperationStats operationStats)
Removes the existing entry mapping in this index.
|
void |
update(Object oldValue,
Object newValue,
QueryableEntry entry,
IndexOperationStats operationStats)
Updates the existing entry mapping in this index by remapping it from the
given old value to the new given value.
|
Comparable canonicalizeQueryArgumentScalar(Comparable value)
The method is used while performing InPredicate queries to canonicalize the set of values in question, so additional duplicate-eliminating post-processing step can be avoided.
The main difference comparing to BaseIndexStore.canonicalizeScalarForStorage(java.lang.Comparable)
is that this method is specifically designed to support the
canonicalization of transient non-persistent values (think of query
arguments), so a more efficient representation may chosen.
value
- the value to canonicalize.void insert(Object value, QueryableEntry entry, IndexOperationStats operationStats)
value
- the value to insert the entry under.entry
- the entry to insert.operationStats
- the operation stats to update while performing the
operation.Index.putEntry(com.hazelcast.query.impl.QueryableEntry, java.lang.Object, com.hazelcast.query.impl.Index.OperationSource)
,
IndexOperationStats.onEntryAdded(java.lang.Object, java.lang.Object)
void update(Object oldValue, Object newValue, QueryableEntry entry, IndexOperationStats operationStats)
The update operation is logically equivalent to removing the old mapping and inserting the new one.
oldValue
- the value to remap the entry from.newValue
- the new value to remap the entry to.entry
- the entry to remap.operationStats
- the operation stats to update while performing the
operation.remove(java.lang.Object, com.hazelcast.nio.serialization.Data, java.lang.Object, com.hazelcast.monitor.impl.IndexOperationStats)
,
insert(java.lang.Object, com.hazelcast.query.impl.QueryableEntry, com.hazelcast.monitor.impl.IndexOperationStats)
,
Index.putEntry(com.hazelcast.query.impl.QueryableEntry, java.lang.Object, com.hazelcast.query.impl.Index.OperationSource)
,
IndexOperationStats.onEntryRemoved(java.lang.Object)
,
IndexOperationStats.onEntryAdded(java.lang.Object, java.lang.Object)
void remove(Object value, Data entryKey, Object entryValue, IndexOperationStats operationStats)
value
- the value to remove the mapping from.entryKey
- the entry key to remove the mapping to.entryValue
- the entry value to remove the mapping to.operationStats
- the operation stats to update while performing the
operation.Index.removeEntry(com.hazelcast.nio.serialization.Data, java.lang.Object, com.hazelcast.query.impl.Index.OperationSource)
,
IndexOperationStats.onEntryRemoved(java.lang.Object)
void clear()
void destroy()
boolean isEvaluateOnly()
true
if this index store supports querying only with
evaluate(com.hazelcast.query.Predicate, com.hazelcast.core.TypeConverter)
method, false
otherwise.boolean canEvaluate(Class<? extends Predicate> predicateClass)
true
if this index store can evaluate a predicate of the
given predicate class, false
otherwise.Set<QueryableEntry> evaluate(Predicate predicate, TypeConverter converter)
predicate
- the predicate to evaluate. The predicate is guaranteed
to be evaluable by this index store (canEvaluate
returned true
for its class).Set<QueryableEntry> getRecords(Comparable value)
value
- the value to obtains the entries for.Index.getRecords(Comparable)
Set<QueryableEntry> getRecords(Set<Comparable> values)
values
- the values to obtains the entries for.Index.getRecords(Comparable[])
Set<QueryableEntry> getRecords(Comparison comparison, Comparable value)
comparison
- the comparison to perform.value
- the value to perform the comparison with.Index.getRecords(Comparison, Comparable)
Set<QueryableEntry> getRecords(Comparable from, boolean fromInclusive, Comparable to, boolean toInclusive)
from
- the beginning of the range.fromInclusive
- true
if the beginning of the range is
inclusive, false
otherwise.to
- the end of the range.toInclusive
- true
if the end of the range is inclusive,
false
otherwise.Index.getRecords(Comparable, boolean, Comparable, boolean)
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.