public class BlockLine
extends java.lang.Object
Contains a term and its details as a BlockTermState.
The line is written to the block file
in two parts. The first part is the term followed by an offset to the details
region. The second part is the term BlockTermState, written in
the details region, after all the terms of the block.
The separate details region allows fast scan of the terms without having
to decode the details for each term. At read time, the BlockLine.Serializer.readLine(DataInput, boolean, org.apache.lucene.codecs.uniformsplit.BlockLine)
only reads the term and its offset to the details. The corresponding BlockTermState
is decoded on demand in the BlockReader (see BlockReader.readTermStateIfNotRead()).
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockLine.Serializer
Reads block lines with terms encoded incrementally inside a block.
|
| Modifier and Type | Field and Description |
|---|---|
protected TermBytes |
termBytes |
protected BlockTermState |
termState
Only used for writing.
|
protected int |
termStateRelativeOffset |
| Modifier | Constructor and Description |
|---|---|
protected |
BlockLine(TermBytes termBytes,
BlockTermState termState)
Constructor used for writing a
BlockLine. |
| Modifier and Type | Method and Description |
|---|---|
TermBytes |
getTermBytes() |
int |
getTermStateRelativeOffset() |
long |
ramBytesUsed() |
protected BlockLine |
reset(TermBytes termBytes,
int termStateRelativeOffset)
Resets this
BlockLine to reuse it when reading. |
protected TermBytes termBytes
protected int termStateRelativeOffset
protected final BlockTermState termState
protected BlockLine reset(TermBytes termBytes, int termStateRelativeOffset)
BlockLine to reuse it when reading.public TermBytes getTermBytes()
public int getTermStateRelativeOffset()
org.apache.lucene.index.TermState
bytes in the block, relatively to the term states base offset.public long ramBytesUsed()
Data In Motion GmbH all rights reserved