Package org.apache.lucene.util.bkd
Interface PointWriter
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
HeapPointWriter,OfflinePointWriter
public interface PointWriter extends java.io.CloseableAppends many points, and then at the end provides aPointReaderto iterate those points. This abstracts away whether we write to disk, or use simple arrays in heap.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappend(byte[] packedValue, int docID)Add a new point from the packed value and docIdvoidappend(PointValue pointValue)Add a new point from aPointValuelongcount()Return the number of points in this writervoiddestroy()Removes any temp files behind this writerPointReadergetReader(long startPoint, long length)Returns aPointReaderiterator to step through all previously added points
-
-
-
Method Detail
-
append
void append(byte[] packedValue, int docID) throws java.io.IOExceptionAdd a new point from the packed value and docId- Throws:
java.io.IOException
-
append
void append(PointValue pointValue) throws java.io.IOException
Add a new point from aPointValue- Throws:
java.io.IOException
-
getReader
PointReader getReader(long startPoint, long length) throws java.io.IOException
Returns aPointReaderiterator to step through all previously added points- Throws:
java.io.IOException
-
count
long count()
Return the number of points in this writer
-
destroy
void destroy() throws java.io.IOExceptionRemoves any temp files behind this writer- Throws:
java.io.IOException
-
-