Class AbstractTokenTreeBuilder
java.lang.Object
org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder
- All Implemented Interfaces:
Iterable<Pair<Long,,com.carrotsearch.hppc.LongSet>> TokenTreeBuilder
- Direct Known Subclasses:
DynamicTokenTreeBuilder,StaticTokenTreeBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classstatic classprotected classNested classes/interfaces inherited from interface org.apache.cassandra.index.sasi.disk.TokenTreeBuilder
TokenTreeBuilder.EntryType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractTokenTreeBuilder.Leafprotected intprotected AbstractTokenTreeBuilder.Leafprotected AbstractTokenTreeBuilder.InteriorNodeprotected AbstractTokenTreeBuilder.Nodeprotected longprotected longprotected longFields inherited from interface org.apache.cassandra.index.sasi.disk.TokenTreeBuilder
AB_MAGIC, BLOCK_BYTES, BLOCK_ENTRY_BYTES, BLOCK_HEADER_BYTES, ENTRY_TYPE_MASK, LAST_LEAF_SHIFT, MAX_OFFSET, OVERFLOW_ENTRY_BYTES, OVERFLOW_TRAILER_BYTES, OVERFLOW_TRAILER_CAPACITY, SHARED_HEADER_BYTES, TOKENS_PER_BLOCK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(TokenTreeBuilder other) protected static voidalignBuffer(ByteBuffer buffer, int blockSize) protected abstract voidfinish()protected voidflushBuffer(ByteBuffer buffer, DataOutputPlus o, boolean align) longintvoidwrite(DataOutputPlus out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.apache.cassandra.index.sasi.disk.TokenTreeBuilder
add, add, add, isEmpty
-
Field Details
-
numBlocks
protected int numBlocks -
root
-
rightmostParent
-
leftmostLeaf
-
rightmostLeaf
-
tokenCount
protected long tokenCount -
treeMinToken
protected long treeMinToken -
treeMaxToken
protected long treeMaxToken
-
-
Constructor Details
-
AbstractTokenTreeBuilder
public AbstractTokenTreeBuilder()
-
-
Method Details
-
add
- Specified by:
addin interfaceTokenTreeBuilder
-
finish
- Specified by:
finishin interfaceTokenTreeBuilder
-
getTokenCount
public long getTokenCount()- Specified by:
getTokenCountin interfaceTokenTreeBuilder
-
serializedSize
public int serializedSize()- Specified by:
serializedSizein interfaceTokenTreeBuilder
-
write
- Specified by:
writein interfaceTokenTreeBuilder- Throws:
IOException
-
constructTree
protected abstract void constructTree() -
flushBuffer
- Throws:
IOException
-
alignBuffer
-