Interface ILogReader

  • All Known Implementing Classes:
    BatchLogReader, MultiFileLogReader, SingleFileLogReader

    public interface ILogReader
    ILogReader is an iterator of PhysicalPlan but throws IOException and provide a close() method. This class can be used just like java iterators, but remember to close it after use.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      release resources occupied by this object, like file streams.
      boolean hasNext()
      return whether there exists next log to be read.
      PhysicalPlan next()
      return the next log read from media like a WAL file and covert it to a PhysicalPlan.
    • Method Detail

      • close

        void close()
        release resources occupied by this object, like file streams.
      • hasNext

        boolean hasNext()
                 throws java.io.FileNotFoundException
        return whether there exists next log to be read.
        Returns:
        whether there exists next log to be read.
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
      • next

        PhysicalPlan next()
                   throws java.io.FileNotFoundException
        return the next log read from media like a WAL file and covert it to a PhysicalPlan.
        Returns:
        the next log as a PhysicalPlan
        Throws:
        java.util.NoSuchElementException - when there are no more logs
        java.io.FileNotFoundException