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 class
AbstractTokenTreeBuilder.InteriorNode
protected class
AbstractTokenTreeBuilder.Leaf
static class
AbstractTokenTreeBuilder.LevelIterator
protected class
AbstractTokenTreeBuilder.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.Leaf
leftmostLeaf
protected int
numBlocks
protected AbstractTokenTreeBuilder.Leaf
rightmostLeaf
protected AbstractTokenTreeBuilder.InteriorNode
rightmostParent
protected AbstractTokenTreeBuilder.Node
root
protected long
tokenCount
protected long
treeMaxToken
protected long
treeMinToken
-
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 void
add(TokenTreeBuilder other)
protected static void
alignBuffer(java.nio.ByteBuffer buffer, int blockSize)
protected abstract void
constructTree()
TokenTreeBuilder
finish()
protected void
flushBuffer(java.nio.ByteBuffer buffer, DataOutputPlus o, boolean align)
long
getTokenCount()
int
serializedSize()
void
write(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:
add
in interfaceTokenTreeBuilder
-
finish
public TokenTreeBuilder finish()
- Specified by:
finish
in interfaceTokenTreeBuilder
-
getTokenCount
public long getTokenCount()
- Specified by:
getTokenCount
in interfaceTokenTreeBuilder
-
serializedSize
public int serializedSize()
- Specified by:
serializedSize
in interfaceTokenTreeBuilder
-
write
public void write(DataOutputPlus out) throws java.io.IOException
- Specified by:
write
in 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)
-
-