public final class HeapPointWriter extends java.lang.Object implements PointWriter
| Modifier and Type | Field and Description |
|---|---|
byte[] |
block |
private boolean |
closed |
int[] |
docIDs |
private int |
nextWrite |
(package private) int |
packedBytesLength |
private HeapPointReader.HeapPointValue |
pointValue |
private byte[] |
scratch |
(package private) int |
size |
| Constructor and Description |
|---|
HeapPointWriter(int size,
int packedBytesLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte[] packedValue,
int docID)
Add a new point from the packed value and docId
|
void |
append(PointValue pointValue)
Add a new point from a
PointValue |
void |
close() |
long |
count()
Return the number of points in this writer
|
void |
destroy()
Removes any temp files behind this writer
|
PointValue |
getPackedValueSlice(int index)
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 |
void |
swap(int i,
int j) |
java.lang.String |
toString() |
public final int[] docIDs
public final byte[] block
final int size
final int packedBytesLength
private final byte[] scratch
private int nextWrite
private boolean closed
private HeapPointReader.HeapPointValue pointValue
public PointValue getPackedValueSlice(int index)
result, to the byte[] slice holding this valuepublic void append(byte[] packedValue,
int docID)
PointWriterappend in interface PointWriterpublic void append(PointValue pointValue)
PointWriterPointValueappend in interface PointWriterpublic void swap(int i,
int j)
public long count()
PointWritercount in interface PointWriterpublic PointReader getReader(long start, long length)
PointWriterPointReader iterator to step through all previously added pointsgetReader 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