Interface TxnLog.TxnIterator

  • All Known Implementing Classes:
    FileTxnLog.FileTxnIterator
    Enclosing interface:
    TxnLog

    public static interface TxnLog.TxnIterator
    an iterating interface for reading transaction logs.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      close files and release the resources
      org.apache.zookeeper.txn.TxnHeader getHeader()
      return the transaction header.
      long getStorageSize()
      Get an estimated storage space used to store transaction records that will return by this iterator
      org.apache.jute.Record getTxn()
      return the transaction record.
      boolean next()
      go to the next transaction record.
    • Method Detail

      • getHeader

        org.apache.zookeeper.txn.TxnHeader getHeader()
        return the transaction header.
        Returns:
        return the transaction header.
      • getTxn

        org.apache.jute.Record getTxn()
        return the transaction record.
        Returns:
        return the transaction record.
      • next

        boolean next()
              throws java.io.IOException
        go to the next transaction record.
        Throws:
        java.io.IOException
      • close

        void close()
            throws java.io.IOException
        close files and release the resources
        Throws:
        java.io.IOException
      • getStorageSize

        long getStorageSize()
                     throws java.io.IOException
        Get an estimated storage space used to store transaction records that will return by this iterator
        Throws:
        java.io.IOException