public final class HeapPointWriter extends java.lang.Object implements PointWriter
Modifier and Type | Field and Description |
---|---|
java.util.List<byte[]> |
blocks |
private boolean |
closed |
int[] |
docIDs |
(package private) int |
maxSize |
private int |
nextWrite |
int[] |
ords |
long[] |
ordsLong |
(package private) int |
packedBytesLength |
(package private) boolean |
singleValuePerDoc |
int |
valuesPerBlock |
Constructor and Description |
---|
HeapPointWriter(int initSize,
int maxSize,
int packedBytesLength,
boolean longOrds,
boolean singleValuePerDoc) |
Modifier and Type | Method and Description |
---|---|
void |
append(byte[] packedValue,
long ord,
int docID)
Add a new point
|
void |
close() |
void |
copyFrom(HeapPointWriter other) |
void |
destroy()
Removes any temp files behind this writer
|
void |
getPackedValueSlice(int index,
BytesRef result)
Returns a reference, in
result , to the byte[] slice holding this value |
PointReader |
getReader(long start,
long length)
Returns a
PointReader iterator to step through all previously added points |
PointReader |
getSharedReader(long start,
long length,
java.util.List<java.io.Closeable> toCloseHeroically)
Returns the single shared reader, used at multiple times during the recursion, to read previously added points
|
void |
readPackedValue(int index,
byte[] bytes) |
java.lang.String |
toString() |
(package private) void |
writePackedValue(int index,
byte[] bytes) |
public int[] docIDs
public long[] ordsLong
public int[] ords
private int nextWrite
private boolean closed
final int maxSize
public final int valuesPerBlock
final int packedBytesLength
final boolean singleValuePerDoc
public final java.util.List<byte[]> blocks
public HeapPointWriter(int initSize, int maxSize, int packedBytesLength, boolean longOrds, boolean singleValuePerDoc)
public void copyFrom(HeapPointWriter other)
public void readPackedValue(int index, byte[] bytes)
public void getPackedValueSlice(int index, BytesRef result)
result
, to the byte[] slice holding this valuevoid writePackedValue(int index, byte[] bytes)
public void append(byte[] packedValue, long ord, int docID)
PointWriter
append
in interface PointWriter
public PointReader getReader(long start, long length)
PointWriter
PointReader
iterator to step through all previously added pointsgetReader
in interface PointWriter
public PointReader getSharedReader(long start, long length, java.util.List<java.io.Closeable> toCloseHeroically)
PointWriter
getSharedReader
in interface PointWriter
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public void destroy()
PointWriter
destroy
in interface PointWriter
public java.lang.String toString()
toString
in class java.lang.Object