TxnLog.TxnIterator (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.persistence

## Interface TxnLog.TxnIterator

- All Superinterfaces:
    AutoCloseable, Closeable
  All Known Implementing Classes:
    FileTxnLog.FileTxnIterator
  Enclosing interface:
    TxnLog

      public static interface TxnLog.TxnIterator
      extends Closeable

  an iterating interface for reading transaction logs.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` close files and release the resources
    `TxnDigest` | `getDigest()`
    `TxnHeader` | `getHeader()` return the transaction header.
    `long` | `getStorageSize()` Get an estimated storage space used to store transaction records that will return by this iterator
    `Record` | `getTxn()` return the transaction record.
    `boolean` | `next()` go to the next transaction record.

- - ### Method Detail

    - #### getHeader

          TxnHeader getHeader()

      return the transaction header.
      Returns:
        return the transaction header.

    - #### getTxn

          Record getTxn()

      return the transaction record.
      Returns:
        return the transaction record.

    - #### getDigest

          TxnDigest getDigest()

      Returns:
        the digest associated with the transaction.

    - #### next

          boolean next()
                throws IOException

      go to the next transaction record.
      Throws:
        `IOException`

    - #### close

          void close()
              throws IOException

      close files and release the resources
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `Closeable`
      Throws:
        `IOException`

    - #### getStorageSize

          long getStorageSize()
                       throws IOException

      Get an estimated storage space used to store transaction records that will return by this iterator
      Throws:
        `IOException`

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.