public final class HeapPointWriter extends Object implements PointWriter
| Modifier and Type | Field and Description |
|---|---|
byte[] |
block |
| Constructor and Description |
|---|
HeapPointWriter(BKDConfig config,
int size) |
| 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() |
int |
computeCardinality(int from,
int to,
int[] commonPrefixLengths) |
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) |
String |
toString() |
public HeapPointWriter(BKDConfig config, int size)
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 int computeCardinality(int from,
int to,
int[] commonPrefixLengths)
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 Closeableclose in interface AutoCloseablepublic void destroy()
PointWriterdestroy in interface PointWriterCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.