Class BlockLine
java.lang.Object
org.apache.lucene.codecs.uniformsplit.BlockLine
- All Implemented Interfaces:
Accountable
- Direct Known Subclasses:
STBlockLine
One term block line.
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(org.apache.lucene.store.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()).
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classReads/writes block lines with terms encoded incrementally inside a block. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TermBytesprotected final BlockTermStateOnly used for writing.protected intFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
termBytes
-
termStateRelativeOffset
protected int termStateRelativeOffset -
termState
Only used for writing.
-
-
Constructor Details
-
Method Details
-
reset
Resets thisBlockLineto reuse it when reading. -
getTermBytes
-
getTermStateRelativeOffset
public int getTermStateRelativeOffset()- Returns:
- The offset of the
TermStatebytes in the block, relatively to the term states base offset.
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceAccountable
-