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)
PointWriter
append
in interface PointWriter
public void append(PointValue pointValue)
PointWriter
PointValue
append
in interface PointWriter
public void swap(int i, int j)
public int computeCardinality(int from, int to, int[] commonPrefixLengths)
public long count()
PointWriter
count
in interface PointWriter
public PointReader getReader(long start, long length)
PointWriter
PointReader
iterator to step through all previously added pointsgetReader
in interface PointWriter
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void destroy()
PointWriter
destroy
in interface PointWriter
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.