public static class BlockLine.Serializer extends java.lang.Object implements Accountable
| Modifier and Type | Field and Description |
|---|---|
private static long |
BASE_RAM_USAGE |
protected BytesRef |
currentTerm |
| Constructor and Description |
|---|
Serializer() |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
numBitsToEncode(int i)
Gets the number of bits required to encode the value of the provided int.
|
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
protected static void |
readBytes(DataInput input,
BytesRef bytes,
int offset,
int length)
|
protected TermBytes |
readIncrementallyEncodedTerm(DataInput blockInput,
boolean isIncrementalEncodingSeed,
TermBytes reuse) |
BlockLine |
readLine(DataInput blockInput,
boolean isIncrementalEncodingSeed,
BlockLine reuse)
Reads the current line.
|
protected static void |
writeIncrementallyEncodedTerm(TermBytes termBytes,
TermBytes previousTermBytes,
boolean isIncrementalEncodingSeed,
DataOutput blockOutput) |
static void |
writeLine(DataOutput blockOutput,
BlockLine line,
BlockLine previousLine,
int termStateRelativeOffset,
boolean isIncrementalEncodingSeed)
Writes a line and its offset to the corresponding term state details in
the details region.
|
protected static void |
writeLineTermState(DataOutput termStatesOutput,
BlockLine line,
FieldInfo fieldInfo,
DeltaBaseTermStateSerializer encoder)
Writes the term state details of a line in the details region.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildResourcesprivate static final long BASE_RAM_USAGE
protected final BytesRef currentTerm
public BlockLine readLine(DataInput blockInput, boolean isIncrementalEncodingSeed, BlockLine reuse) throws java.io.IOException
isIncrementalEncodingSeed - Whether the term is a seed of the
incremental encoding. true for the first and
middle term, false for other terms.reuse - A BlockLine instance to reuse; or null if none.java.io.IOExceptionpublic static void writeLine(DataOutput blockOutput, BlockLine line, BlockLine previousLine, int termStateRelativeOffset, boolean isIncrementalEncodingSeed) throws java.io.IOException
blockOutput - The output pointing to the block terms region.termStateRelativeOffset - The offset to the corresponding term
state details in the details region.isIncrementalEncodingSeed - Whether the term is a seed of
the incremental encoding. true for the first
and middle term, false for other terms.java.io.IOExceptionprotected static void writeLineTermState(DataOutput termStatesOutput, BlockLine line, FieldInfo fieldInfo, DeltaBaseTermStateSerializer encoder) throws java.io.IOException
termStatesOutput - The output pointing to the details region.java.io.IOExceptionprotected static void writeIncrementallyEncodedTerm(TermBytes termBytes, TermBytes previousTermBytes, boolean isIncrementalEncodingSeed, DataOutput blockOutput) throws java.io.IOException
java.io.IOExceptionprotected TermBytes readIncrementallyEncodedTerm(DataInput blockInput, boolean isIncrementalEncodingSeed, TermBytes reuse) throws java.io.IOException
java.io.IOExceptionprotected static void readBytes(DataInput input, BytesRef bytes, int offset, int length) throws java.io.IOException
java.io.IOExceptionpublic long ramBytesUsed()
AccountableramBytesUsed in interface Accountableprotected static int numBitsToEncode(int i)