public interface Index
Modifier and Type | Interface and Description |
---|---|
static class |
Index.OperationSource
Identifies an original source of an index operation.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears out all entries from this index.
|
void |
destroy()
Releases all resources hold by this index, e.g.
|
String |
getAttributeName() |
TypeConverter |
getConverter() |
Set<QueryableEntry> |
getRecords(Comparable value)
Produces a result set containing entries whose attribute values are equal
to the given value.
|
Set<QueryableEntry> |
getRecords(Comparable[] values)
Produces a result set containing entries whose attribute values are equal
to at least one of the given values.
|
Set<QueryableEntry> |
getSubRecords(ComparisonType comparisonType,
Comparable searchedValue)
Produces a result set containing entries whose attribute values are
satisfy the comparison of the given type with the given value.
|
Set<QueryableEntry> |
getSubRecordsBetween(Comparable from,
Comparable to)
Produces a result set by performing a range query on this index.
|
boolean |
isOrdered()
Tells whether this index is ordered or not.
|
void |
removeEntryIndex(Data key,
Object value,
Index.OperationSource operationSource)
Removes the entry having the given key and the value from this index.
|
void |
saveEntryIndex(QueryableEntry entry,
Object oldValue,
Index.OperationSource operationSource)
Saves the given entry into this index.
|
String getAttributeName()
boolean isOrdered()
Ordered indexes support the fast evaluation of range queries. Unordered indexes are still capable to execute range queries, but the performance would be about the same as the full scan performance.
true
if this index is ordered, false
otherwise.getSubRecords(com.hazelcast.query.impl.ComparisonType, java.lang.Comparable)
,
getSubRecordsBetween(java.lang.Comparable, java.lang.Comparable)
void saveEntryIndex(QueryableEntry entry, Object oldValue, Index.OperationSource operationSource)
entry
- the entry to save.oldValue
- the previous old value associated with the entry or
null
if the entry is new.operationSource
- the operation source.QueryException
- if there were errors while extracting the
attribute value from the entry.void removeEntryIndex(Data key, Object value, Index.OperationSource operationSource)
key
- the key of the entry to remove.value
- the value of the entry to remove.operationSource
- the operation source.QueryException
- if there were errors while extracting the
attribute value from the entry.TypeConverter getConverter()
null
if the
converter is not known because there were no saves to this index and
the attribute type is not inferred yet.Set<QueryableEntry> getRecords(Comparable value)
value
- the value to compare against.Set<QueryableEntry> getRecords(Comparable[] values)
values
- the values to compare against.Set<QueryableEntry> getSubRecordsBetween(Comparable from, Comparable to)
More precisely, this method produces a result set containing entries
whose attribute values are greater than or equal to the given
from
value and less than or equal to the given to
value.
from
- the beginning of the range (inclusive).to
- the end of the range (inclusive).Set<QueryableEntry> getSubRecords(ComparisonType comparisonType, Comparable searchedValue)
comparisonType
- the type of the comparison to perform.searchedValue
- the value to compare against.void clear()
void destroy()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.