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
IOException
public void append(byte[] packedValue, int docID) throws IOException
PointWriter
append
in interface PointWriter
IOException
public void append(PointValue pointValue) throws IOException
PointWriter
PointValue
append
in interface PointWriter
IOException
public PointReader getReader(long start, long length) throws IOException
PointWriter
PointReader
iterator to step through all previously added pointsgetReader
in interface PointWriter
IOException
protected OfflinePointReader getReader(long start, long length, byte[] reusableBuffer) throws IOException
IOException
public long count()
PointWriter
count
in interface PointWriter
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void destroy() throws IOException
PointWriter
destroy
in interface PointWriter
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.