public static class BlockLine.Serializer extends Object implements Accountable
Modifier and Type | Field and Description |
---|---|
protected BytesRef |
currentTerm |
NULL_ACCOUNTABLE
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() |
protected 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 void |
writeIncrementallyEncodedTerm(TermBytes termBytes,
TermBytes previousTermBytes,
boolean isIncrementalEncodingSeed,
DataOutput blockOutput) |
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 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, wait
getChildResources
protected final BytesRef currentTerm
public BlockLine readLine(DataInput blockInput, boolean isIncrementalEncodingSeed, BlockLine reuse) throws 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.IOException
public void writeLine(DataOutput blockOutput, BlockLine line, BlockLine previousLine, int termStateRelativeOffset, boolean isIncrementalEncodingSeed) throws 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.IOException
protected void writeLineTermState(DataOutput termStatesOutput, BlockLine line, FieldInfo fieldInfo, DeltaBaseTermStateSerializer encoder) throws IOException
termStatesOutput
- The output pointing to the details region.IOException
protected void writeIncrementallyEncodedTerm(TermBytes termBytes, TermBytes previousTermBytes, boolean isIncrementalEncodingSeed, DataOutput blockOutput) throws IOException
IOException
protected TermBytes readIncrementallyEncodedTerm(DataInput blockInput, boolean isIncrementalEncodingSeed, TermBytes reuse) throws IOException
IOException
protected void readBytes(DataInput input, BytesRef bytes, int offset, int length) throws IOException
IOException
public long ramBytesUsed()
ramBytesUsed
in interface Accountable
protected static int numBitsToEncode(int i)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.