Class AbstractBlockPackedWriter

  • Direct Known Subclasses:
    BlockPackedWriter, MonotonicBlockPackedWriter

    public abstract class AbstractBlockPackedWriter
    extends java.lang.Object
    Modified copy of org.apache.lucene.util.packed.AbstractBlockPackedWriter to use DirectWriter for optimised reads that doesn't require seeking through the whole file to open a thread-exclusive reader.
    • Field Detail

      • indexOutput

        protected final org.apache.lucene.store.IndexOutput indexOutput
      • blockValues

        protected final long[] blockValues
      • blockIndex

        protected int blockIndex
      • finished

        protected boolean finished
    • Method Detail

      • add

        public void add​(long l)
                 throws java.io.IOException
        Append a new long.
        Throws:
        java.io.IOException
      • finish

        public long finish()
                    throws java.io.IOException
        Flush all buffered data to disk. This instance is not usable anymore after this method has been called.
        Returns:
        a file offset to the block metadata
        Throws:
        java.io.IOException
      • flushBlock

        protected abstract void flushBlock()
                                    throws java.io.IOException
        Throws:
        java.io.IOException