Package org.apache.lucene.util.packed
Class BlockPackedReader
- java.lang.Object
-
- org.apache.lucene.util.LongValues
-
- org.apache.lucene.util.packed.BlockPackedReader
-
- All Implemented Interfaces:
Accountable
public final class BlockPackedReader extends LongValues implements Accountable
Provides random access to a stream written withBlockPackedWriter
.
-
-
Field Summary
Fields Modifier and Type Field Description private int
blockMask
private int
blockShift
private long[]
minValues
private PackedInts.Reader[]
subReaders
private long
sumBPV
private long
valueCount
-
Fields inherited from class org.apache.lucene.util.LongValues
IDENTITY, ZEROES
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description BlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct)
Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
get(long index)
Get value atindex
.long
ramBytesUsed()
Return the memory usage of this object in bytes.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
blockShift
private final int blockShift
-
blockMask
private final int blockMask
-
valueCount
private final long valueCount
-
minValues
private final long[] minValues
-
subReaders
private final PackedInts.Reader[] subReaders
-
sumBPV
private final long sumBPV
-
-
Constructor Detail
-
BlockPackedReader
public BlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws java.io.IOException
Sole constructor.- Throws:
java.io.IOException
-
-
Method Detail
-
get
public long get(long index)
Description copied from class:LongValues
Get value atindex
.- Specified by:
get
in classLongValues
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-