final class HeapPointWriter extends java.lang.Object implements PointWriter
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.List<byte[]> |
blocks |
private boolean |
closed |
(package private) int[] |
docIDs |
(package private) int |
maxSize |
private int |
nextWrite |
(package private) int[] |
ords |
(package private) long[] |
ordsLong |
(package private) int |
packedBytesLength |
(package private) boolean |
singleValuePerDoc |
(package private) 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
|
(package private) 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
|
(package private) void |
readPackedValue(int index,
byte[] bytes) |
java.lang.String |
toString() |
(package private) void |
writePackedValue(int index,
byte[] bytes) |
int[] docIDs
long[] ordsLong
int[] ords
private int nextWrite
private boolean closed
final int maxSize
final int valuesPerBlock
final int packedBytesLength
final boolean singleValuePerDoc
final java.util.List<byte[]> blocks
public HeapPointWriter(int initSize,
int maxSize,
int packedBytesLength,
boolean longOrds,
boolean singleValuePerDoc)
public void copyFrom(HeapPointWriter other)
void readPackedValue(int index,
byte[] bytes)
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)
PointWriterappend in interface PointWriterpublic PointReader getReader(long start, long length)
PointWriterPointReader iterator to step through all previously added pointsgetReader in interface PointWriterpublic PointReader getSharedReader(long start, long length, java.util.List<java.io.Closeable> toCloseHeroically)
PointWritergetSharedReader in interface PointWriterpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void destroy()
PointWriterdestroy in interface PointWriterpublic java.lang.String toString()
toString in class java.lang.Object