Package org.apache.lucene.util.bkd
Interface PointWriter
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
HeapPointWriter
,OfflinePointWriter
public interface PointWriter extends Closeable
Appends many points, and then at the end provides aPointReader
to iterate those points. This abstracts away whether we write to disk, or use simple arrays in heap.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
append(byte[] packedValue, int docID)
Add a new point from the packed value and docIdvoid
append(PointValue pointValue)
Add a new point from aPointValue
long
count()
Return the number of points in this writervoid
destroy()
Removes any temp files behind this writerPointReader
getReader(long startPoint, long length)
Returns aPointReader
iterator to step through all previously added points
-
-
-
Method Detail
-
append
void append(byte[] packedValue, int docID) throws IOException
Add a new point from the packed value and docId- Throws:
IOException
-
append
void append(PointValue pointValue) throws IOException
Add a new point from aPointValue
- Throws:
IOException
-
getReader
PointReader getReader(long startPoint, long length) throws IOException
Returns aPointReader
iterator to step through all previously added points- Throws:
IOException
-
count
long count()
Return the number of points in this writer
-
destroy
void destroy() throws IOException
Removes any temp files behind this writer- Throws:
IOException
-
-