Class PartitionIndex.Reader
java.lang.Object
org.apache.cassandra.io.tries.Walker<PartitionIndex.Reader>
org.apache.cassandra.io.sstable.format.bti.PartitionIndex.Reader
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- PartitionIndex
Provides methods to read the partition index trie.
Thread-unsafe, uses class members to store lookup state.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.io.tries.Walker
Walker.Extractor<RESULT,VALUE>, Walker.PayloadToString, Walker.TransitionBytesCollector -
Field Summary
Fields inherited from class org.apache.cassandra.io.tries.Walker
buf, BYTE_COMPARABLE_VERSION, greaterBranch, lesserBranch, nodeType, NONE, position, root -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<ResultType>
ResultTypeceiling(PartitionPosition key, PartitionIndex.Acceptor<PartitionPosition, ResultType> acceptor) longFinds a candidate for an exact key search.<ResultType>
ResultTypefloor(PartitionPosition key, PartitionIndex.Acceptor<PartitionPosition, ResultType> acceptor) longlonggetSpecificIndexPos(int pos, int bits) protected intTo be used only in analysis.Methods inherited from class org.apache.cassandra.io.tries.Walker
close, dumpTrie, follow, followWithGreater, followWithLesser, getMaxTerm, getMinTerm, go, goMax, goMin, greaterTransition, hasChildren, hasPayload, lastTransition, lesserTransition, nodeSize, nodeTypeOrdinal, payloadFlags, payloadPosition, prefix, prefixAndNeighbours, search, toString, transition, transitionByte, transitionRange
-
Constructor Details
-
Reader
-
-
Method Details
-
exactCandidate
Finds a candidate for an exact key search. Returns an ifile (if positive) or dfile (if negative, using ~) position. The position returned has a low chance of being a different entry, but only if the sought key is not present in the file. -
ceiling
public <ResultType> ResultType ceiling(PartitionPosition key, PartitionIndex.Acceptor<PartitionPosition, ResultType> acceptor) throws IOException- Throws:
IOException
-
floor
public <ResultType> ResultType floor(PartitionPosition key, PartitionIndex.Acceptor<PartitionPosition, ResultType> acceptor) throws IOException- Throws:
IOException
-
getSpecificIndexPos
-
getCurrentIndexPos
public long getCurrentIndexPos() -
getLastIndexPosition
public long getLastIndexPosition() -
payloadSize
protected int payloadSize()To be used only in analysis.
-