public class IndexImpl extends AbstractIndex
Index.OperationSourcecopyBehavior, extractors, indexStore, NULL, ss| Constructor and Description |
|---|
IndexImpl(IndexDefinition definition,
InternalSerializationService ss,
Extractors extractors,
IndexCopyBehavior copyBehavior,
PerIndexStats stats) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allPartitionsIndexed(int ownedPartitionCount)
Returns
true if all queryPartitions are indexed,
false otherwise. |
void |
clear()
Clears out all entries from this index.
|
protected IndexStore |
createIndexStore(IndexDefinition definition,
PerIndexStats stats) |
boolean |
hasPartitionIndexed(int partitionId)
Returns
true if the given partition is indexed by this index,
false otherwise. |
void |
markPartitionAsIndexed(int partitionId)
Marks the given partition as indexed by this index.
|
void |
markPartitionAsUnindexed(int partitionId)
Marks the given partition as unindexed by this index.
|
canEvaluate, canonicalizeQueryArgumentScalar, destroy, evaluate, getComponents, getConverter, getName, getPerIndexStats, getRecords, getRecords, getRecords, getRecords, getUniqueKey, isEvaluateOnly, isOrdered, putEntry, removeEntrypublic IndexImpl(IndexDefinition definition, InternalSerializationService ss, Extractors extractors, IndexCopyBehavior copyBehavior, PerIndexStats stats)
protected IndexStore createIndexStore(IndexDefinition definition, PerIndexStats stats)
createIndexStore in class AbstractIndexpublic void clear()
Indexclear in interface Indexclear in class AbstractIndexpublic boolean hasPartitionIndexed(int partitionId)
InternalIndextrue if the given partition is indexed by this index,
false otherwise.public boolean allPartitionsIndexed(int ownedPartitionCount)
InternalIndextrue if all queryPartitions are indexed,
false otherwise.
The method is used to check whether a global index is still being constructed concurrently so that some partitions are not indexed and query may suffer from entry misses. If the index construction is still in progress, a query optimizer ignores the index.
The aforementioned race condition is not relevant to local off-heap indexes, since index construction is performed in partition-threads.
ownedPartitionCount - a count of owned partitions a query runs on.
Negative value indicates that the value is not defined.public void markPartitionAsIndexed(int partitionId)
InternalIndexpartitionId - the ID of the partition to mark as indexed.public void markPartitionAsUnindexed(int partitionId)
InternalIndexpartitionId - the ID of the partition to mark as unindexed.Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.