Class MemoryIndex.SlicedIntBlockPool.SliceWriter

java.lang.Object
org.apache.lucene.index.memory.MemoryIndex.SlicedIntBlockPool.SliceWriter
Enclosing class:
MemoryIndex.SlicedIntBlockPool

static class MemoryIndex.SlicedIntBlockPool.SliceWriter extends Object
A MemoryIndex.SlicedIntBlockPool.SliceWriter that allows to write multiple integer slices into a given IntBlockPool.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • reset

      public void reset(int sliceOffset)
    • writeInt

      public void writeInt(int value)
      Writes the given value into the slice and resizes the slice if needed
    • startNewSlice

      public int startNewSlice()
      starts a new slice and returns the start offset. The returned value should be used as the start offset to initialize a MemoryIndex.SlicedIntBlockPool.SliceReader.
    • getCurrentOffset

      public int getCurrentOffset()
      Returns the offset of the currently written slice. The returned value should be used as the end offset to initialize a MemoryIndex.SlicedIntBlockPool.SliceReader once this slice is fully written or to reset the writer if another slice needs to be written.