public final class HeapPointWriter extends Object implements PointWriter
Modifier and Type | Field and Description |
---|---|
List<byte[]> |
blocks |
int[] |
docIDs |
int[] |
ords |
long[] |
ordsLong |
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,
List<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) |
String |
toString() |
public int[] docIDs
public long[] ordsLong
public int[] ords
public final int valuesPerBlock
public final 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 valuepublic 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, List<Closeable> toCloseHeroically)
PointWriter
getSharedReader
in interface PointWriter
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void destroy()
PointWriter
destroy
in interface PointWriter
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.