Class MultiLevelSkipListReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    Lucene40SkipListReader

    public abstract class MultiLevelSkipListReader
    extends java.lang.Object
    implements java.io.Closeable
    This abstract class reads skip lists with multiple levels. See MultiLevelSkipListWriter for the information about the encoding of the multi level skip lists. Subclasses must implement the abstract method readSkipData(int, IndexInput) which defines the actual format of the skip data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      int getDoc()
      Returns the id of the doc to which the last call of skipTo(int) has skipped.
      void init​(long skipPointer, int df)
      Initializes the reader, for reuse on a new term.
      int skipTo​(int target)
      Skips entries to the first beyond the current whose document number is greater than or equal to target.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDoc

        public int getDoc()
        Returns the id of the doc to which the last call of skipTo(int) has skipped.
      • skipTo

        public int skipTo​(int target)
                   throws java.io.IOException
        Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns the current doc count.
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • init

        public void init​(long skipPointer,
                         int df)
        Initializes the reader, for reuse on a new term.