public final class OfflinePointWriter extends Object implements PointWriter
| Modifier and Type | Field and Description |
|---|---|
String |
name |
IndexOutput |
out |
| Constructor and Description |
|---|
OfflinePointWriter(Directory tempDir,
String tempFileNamePrefix,
int packedBytesLength,
String desc,
long expectedCount)
Create a new writer with an unknown number of incoming points
|
| 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
|
PointReader |
getReader(long start,
long length)
Returns a
PointReader iterator to step through all previously added points |
protected OfflinePointReader |
getReader(long start,
long length,
byte[] reusableBuffer) |
String |
toString() |
public final IndexOutput out
public final String name
public OfflinePointWriter(Directory tempDir, String tempFileNamePrefix, int packedBytesLength, String desc, long expectedCount) throws IOException
IOExceptionpublic void append(byte[] packedValue,
int docID)
throws IOException
PointWriterappend in interface PointWriterIOExceptionpublic void append(PointValue pointValue) throws IOException
PointWriterPointValueappend in interface PointWriterIOExceptionpublic PointReader getReader(long start, long length) throws IOException
PointWriterPointReader iterator to step through all previously added pointsgetReader in interface PointWriterIOExceptionprotected OfflinePointReader getReader(long start, long length, byte[] reusableBuffer) throws IOException
IOExceptionpublic long count()
PointWritercount in interface PointWriterpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void destroy()
throws IOException
PointWriterdestroy in interface PointWriterIOExceptionCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.