Interface SnapshotIterator<K,​V>

  • Type Parameters:
    K - the key type of the snapshot region
    V - the value type the snapshot region
    All Superinterfaces:
    java.lang.AutoCloseable

    public interface SnapshotIterator<K,​V>
    extends java.lang.AutoCloseable
    Iterates over the entries in a region snapshot. Holds resources that must be freed via close().
    Since:
    GemFire 7.0
    See Also:
    SnapshotReader
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Closes the iterator and its underlying resources.
      boolean hasNext()
      Returns true if there are more elements in the iteration.
      java.util.Map.Entry<K,​V> next()
      Returns the next element in the iteration.
    • Method Detail

      • hasNext

        boolean hasNext()
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
        Returns true if there are more elements in the iteration.
        Returns:
        true if the iterator has more elements.
        Throws:
        java.io.IOException - error reading the snapshot
        java.lang.ClassNotFoundException - error deserializing the snapshot element
      • next

        java.util.Map.Entry<K,​V> next()
                                     throws java.io.IOException,
                                            java.lang.ClassNotFoundException
        Returns the next element in the iteration.
        Returns:
        the next element
        Throws:
        java.util.NoSuchElementException - there are no further elements
        java.io.IOException - error reading the snapshot
        java.lang.ClassNotFoundException - error deserializing the snapshot element
      • close

        void close()
            throws java.io.IOException
        Closes the iterator and its underlying resources.
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException - error closing the iterator