Class AbstractTokenTreeBuilder
- java.lang.Object
-
- org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder
-
- All Implemented Interfaces:
java.lang.Iterable<Pair<java.lang.Long,com.carrotsearch.hppc.LongSet>>,TokenTreeBuilder
- Direct Known Subclasses:
DynamicTokenTreeBuilder,StaticTokenTreeBuilder
public abstract class AbstractTokenTreeBuilder extends java.lang.Object implements TokenTreeBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractTokenTreeBuilder.InteriorNodeprotected classAbstractTokenTreeBuilder.Leafstatic classAbstractTokenTreeBuilder.LevelIteratorprotected classAbstractTokenTreeBuilder.Node-
Nested classes/interfaces inherited from interface org.apache.cassandra.index.sasi.disk.TokenTreeBuilder
TokenTreeBuilder.EntryType
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractTokenTreeBuilder.LeafleftmostLeafprotected intnumBlocksprotected AbstractTokenTreeBuilder.LeafrightmostLeafprotected AbstractTokenTreeBuilder.InteriorNoderightmostParentprotected AbstractTokenTreeBuilder.Noderootprotected longtokenCountprotected longtreeMaxTokenprotected longtreeMinToken-
Fields 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 Constructor Description AbstractTokenTreeBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadd(TokenTreeBuilder other)protected static voidalignBuffer(java.nio.ByteBuffer buffer, int blockSize)protected abstract voidconstructTree()TokenTreeBuilderfinish()protected voidflushBuffer(java.nio.ByteBuffer buffer, DataOutputPlus o, boolean align)longgetTokenCount()intserializedSize()voidwrite(DataOutputPlus out)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.index.sasi.disk.TokenTreeBuilder
add, add, add, isEmpty
-
-
-
-
Field Detail
-
numBlocks
protected int numBlocks
-
root
protected AbstractTokenTreeBuilder.Node root
-
rightmostParent
protected AbstractTokenTreeBuilder.InteriorNode rightmostParent
-
leftmostLeaf
protected AbstractTokenTreeBuilder.Leaf leftmostLeaf
-
rightmostLeaf
protected AbstractTokenTreeBuilder.Leaf rightmostLeaf
-
tokenCount
protected long tokenCount
-
treeMinToken
protected long treeMinToken
-
treeMaxToken
protected long treeMaxToken
-
-
Method Detail
-
add
public void add(TokenTreeBuilder other)
- Specified by:
addin interfaceTokenTreeBuilder
-
finish
public TokenTreeBuilder finish()
- Specified by:
finishin interfaceTokenTreeBuilder
-
getTokenCount
public long getTokenCount()
- Specified by:
getTokenCountin interfaceTokenTreeBuilder
-
serializedSize
public int serializedSize()
- Specified by:
serializedSizein interfaceTokenTreeBuilder
-
write
public void write(DataOutputPlus out) throws java.io.IOException
- Specified by:
writein interfaceTokenTreeBuilder- Throws:
java.io.IOException
-
constructTree
protected abstract void constructTree()
-
flushBuffer
protected void flushBuffer(java.nio.ByteBuffer buffer, DataOutputPlus o, boolean align) throws java.io.IOException- Throws:
java.io.IOException
-
alignBuffer
protected static void alignBuffer(java.nio.ByteBuffer buffer, int blockSize)
-
-