public class IndexImpl extends AbstractIndex
Index.OperationSource
copyBehavior, 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, removeEntry
public IndexImpl(IndexDefinition definition, InternalSerializationService ss, Extractors extractors, IndexCopyBehavior copyBehavior, PerIndexStats stats)
protected IndexStore createIndexStore(IndexDefinition definition, PerIndexStats stats)
createIndexStore
in class AbstractIndex
public void clear()
Index
clear
in interface Index
clear
in class AbstractIndex
public boolean hasPartitionIndexed(int partitionId)
InternalIndex
true
if the given partition is indexed by this index,
false
otherwise.public boolean allPartitionsIndexed(int ownedPartitionCount)
InternalIndex
true
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)
InternalIndex
partitionId
- the ID of the partition to mark as indexed.public void markPartitionAsUnindexed(int partitionId)
InternalIndex
partitionId
- the ID of the partition to mark as unindexed.Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.