Module org.apache.lucene.memory
Package org.apache.lucene.index.memory
Class MemoryIndex.SlicedIntBlockPool.SliceReader
java.lang.Object
org.apache.lucene.index.memory.MemoryIndex.SlicedIntBlockPool.SliceReader
- Enclosing class:
MemoryIndex.SlicedIntBlockPool
A
MemoryIndex.SlicedIntBlockPool.SliceReader that can read int slices written by a MemoryIndex.SlicedIntBlockPool.SliceWriter-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private intprivate intprivate intprivate intprivate intprivate final MemoryIndex.SlicedIntBlockPoolprivate int -
Constructor Summary
ConstructorsConstructorDescriptionSliceReader(MemoryIndex.SlicedIntBlockPool slicedIntBlockPool) Creates a newMemoryIndex.SlicedIntBlockPool.SliceReaderon the given pool -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueiff the current slice is fully read.private voidintreadInt()Reads the next int from the current slice and returns it.voidreset(int startOffset, int endOffset) Resets the reader to a slice give the slices absolute start and end offset in the pool
-
Field Details
-
slicedIntBlockPool
-
upto
private int upto -
bufferUpto
private int bufferUpto -
bufferOffset
private int bufferOffset -
buffer
private int[] buffer -
limit
private int limit -
level
private int level -
end
private int end
-
-
Constructor Details
-
SliceReader
Creates a newMemoryIndex.SlicedIntBlockPool.SliceReaderon the given pool
-
-
Method Details
-
reset
public void reset(int startOffset, int endOffset) Resets the reader to a slice give the slices absolute start and end offset in the pool -
endOfSlice
public boolean endOfSlice()Returnstrueiff the current slice is fully read. If this method returnstruereadInt()should not be called again on this slice. -
readInt
public int readInt()Reads the next int from the current slice and returns it.- See Also:
-
nextSlice
private void nextSlice()
-