Package org.apache.lucene.util.bkd
Class OfflinePointReader
- java.lang.Object
-
- org.apache.lucene.util.bkd.OfflinePointReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,PointReader
public final class OfflinePointReader extends java.lang.Object implements PointReader
Reads points from disk in a fixed-with format, previously written withOfflinePointWriter
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
OfflinePointReader.OfflinePointValue
Reusable implementation for a point value offline
-
Field Summary
Fields Modifier and Type Field Description private boolean
checked
private BKDConfig
config
(package private) long
countLeft
(package private) IndexInput
in
private int
maxPointOnHeap
(package private) java.lang.String
name
(package private) int
offset
(package private) byte[]
onHeapBuffer
private int
pointsInBuffer
private OfflinePointReader.OfflinePointValue
pointValue
-
Constructor Summary
Constructors Constructor Description OfflinePointReader(BKDConfig config, Directory tempDir, java.lang.String tempFileName, long start, long length, byte[] reusableBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
next()
Returns false once iteration is done, else true.PointValue
pointValue()
Sets the packed value in the provided ByteRef
-
-
-
Field Detail
-
countLeft
long countLeft
-
in
final IndexInput in
-
onHeapBuffer
byte[] onHeapBuffer
-
offset
int offset
-
checked
private boolean checked
-
config
private final BKDConfig config
-
pointsInBuffer
private int pointsInBuffer
-
maxPointOnHeap
private final int maxPointOnHeap
-
name
final java.lang.String name
-
pointValue
private final OfflinePointReader.OfflinePointValue pointValue
-
-
Method Detail
-
next
public boolean next() throws java.io.IOException
Description copied from interface:PointReader
Returns false once iteration is done, else true.- Specified by:
next
in interfacePointReader
- Throws:
java.io.IOException
-
pointValue
public PointValue pointValue()
Description copied from interface:PointReader
Sets the packed value in the provided ByteRef- Specified by:
pointValue
in interfacePointReader
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-