Class MemtableIndex
- java.lang.Object
-
- org.apache.cassandra.index.sai.memory.MemtableIndex
-
- All Implemented Interfaces:
MemtableOrdering
public class MemtableIndex extends java.lang.Object implements MemtableOrdering
-
-
Constructor Summary
Constructors Constructor Description MemtableIndex(StorageAttachedIndex index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
estimatedMemoryUsed()
java.nio.ByteBuffer
getMaxTerm()
java.nio.ByteBuffer
getMinTerm()
long
index(DecoratedKey key, Clustering<?> clustering, java.nio.ByteBuffer value)
boolean
isEmpty()
java.util.Iterator<Pair<ByteComparable,PrimaryKeys>>
iterator()
KeyRangeIterator
limitToTopResults(java.util.List<PrimaryKey> primaryKeys, Expression expression, int limit)
Filter the given list ofPrimaryKey
results to the top `limit` results corresponding to the given expression, Returns an iterator over the results that is put back in token order.KeyRangeIterator
search(QueryContext queryContext, Expression expression, AbstractBounds<PartitionPosition> keyRange)
long
update(DecoratedKey key, Clustering<?> clustering, java.nio.ByteBuffer oldValue, java.nio.ByteBuffer newValue)
long
writeCount()
SegmentMetadata.ComponentMetadataMap
writeDirect(IndexDescriptor indexDescriptor, IndexIdentifier indexIdentifier, java.util.function.Function<PrimaryKey,java.lang.Integer> postingTransformer)
-
-
-
Constructor Detail
-
MemtableIndex
public MemtableIndex(StorageAttachedIndex index)
-
-
Method Detail
-
writeCount
public long writeCount()
-
estimatedMemoryUsed
public long estimatedMemoryUsed()
-
isEmpty
public boolean isEmpty()
-
getMinTerm
public java.nio.ByteBuffer getMinTerm()
-
getMaxTerm
public java.nio.ByteBuffer getMaxTerm()
-
index
public long index(DecoratedKey key, Clustering<?> clustering, java.nio.ByteBuffer value)
-
update
public long update(DecoratedKey key, Clustering<?> clustering, java.nio.ByteBuffer oldValue, java.nio.ByteBuffer newValue)
-
search
public KeyRangeIterator search(QueryContext queryContext, Expression expression, AbstractBounds<PartitionPosition> keyRange)
-
iterator
public java.util.Iterator<Pair<ByteComparable,PrimaryKeys>> iterator()
-
writeDirect
public SegmentMetadata.ComponentMetadataMap writeDirect(IndexDescriptor indexDescriptor, IndexIdentifier indexIdentifier, java.util.function.Function<PrimaryKey,java.lang.Integer> postingTransformer) throws java.io.IOException
- Throws:
java.io.IOException
-
limitToTopResults
public KeyRangeIterator limitToTopResults(java.util.List<PrimaryKey> primaryKeys, Expression expression, int limit)
Description copied from interface:MemtableOrdering
Filter the given list ofPrimaryKey
results to the top `limit` results corresponding to the given expression, Returns an iterator over the results that is put back in token order.Assumes that the given list spans the same rows as the implementing index's segment.
- Specified by:
limitToTopResults
in interfaceMemtableOrdering
-
-