Interface BlockIterator<T>

Type Parameters:
T -
All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
AbstractDatanodeStore.KeyValueBlockIterator, AbstractDatanodeStore.KeyValueBlockLocalIdIterator

public interface BlockIterator<T> extends Closeable
Block Iterator for container. Each container type need to implement this interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This checks if iterator has next element.
    Get next block in the container.
    void
    Seek to first entry.
    void
    Seek to last entry.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • hasNext

      boolean hasNext() throws IOException
      This checks if iterator has next element. If it has returns true, otherwise false.
      Returns:
      boolean
      Throws:
      IOException
    • seekToFirst

      void seekToFirst()
      Seek to first entry.
    • seekToLast

      void seekToLast()
      Seek to last entry.
    • nextBlock

      T nextBlock() throws IOException, NoSuchElementException
      Get next block in the container.
      Returns:
      next block or null if there are no blocks
      Throws:
      IOException
      NoSuchElementException