public abstract class AbstractTokenTreeBuilder extends java.lang.Object implements TokenTreeBuilder
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractTokenTreeBuilder.InteriorNode |
protected class |
AbstractTokenTreeBuilder.Leaf |
static class |
AbstractTokenTreeBuilder.LevelIterator |
protected class |
AbstractTokenTreeBuilder.Node |
TokenTreeBuilder.EntryType
Modifier and Type | Field and 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 |
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 and Description |
---|
AbstractTokenTreeBuilder() |
Modifier and Type | Method and 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, add, add, isEmpty
protected int numBlocks
protected AbstractTokenTreeBuilder.Node root
protected AbstractTokenTreeBuilder.InteriorNode rightmostParent
protected AbstractTokenTreeBuilder.Leaf leftmostLeaf
protected AbstractTokenTreeBuilder.Leaf rightmostLeaf
protected long tokenCount
protected long treeMinToken
protected long treeMaxToken
public void add(TokenTreeBuilder other)
add
in interface TokenTreeBuilder
public TokenTreeBuilder finish()
finish
in interface TokenTreeBuilder
public long getTokenCount()
getTokenCount
in interface TokenTreeBuilder
public int serializedSize()
serializedSize
in interface TokenTreeBuilder
public void write(DataOutputPlus out) throws java.io.IOException
write
in interface TokenTreeBuilder
java.io.IOException
protected abstract void constructTree()
protected void flushBuffer(java.nio.ByteBuffer buffer, DataOutputPlus o, boolean align) throws java.io.IOException
java.io.IOException
protected static void alignBuffer(java.nio.ByteBuffer buffer, int blockSize)
Copyright © 2009-2021 The Apache Software Foundation