GemFire 7.0

com.gemstone.gemfire.cache.snapshot
Interface SnapshotIterator<K,V>

Type Parameters:
K - the key type of the snapshot region
V - the value type the snapshot region

public interface SnapshotIterator<K,V>

Iterates over the entries in a region snapshot. Holds resources that must be freed via close().

Since:
7.0
See Also:
SnapshotReader

Method Summary
 void close()
          Closes the iterator and its underlying resources.
 boolean hasNext()
          Returns true if there are more elements in the iteration.
 Map.Entry<K,V> next()
          Returns the next element in the iteration.
 

Method Detail

hasNext

boolean hasNext()
                throws IOException,
                       ClassNotFoundException
Returns true if there are more elements in the iteration.

Returns:
true if the iterator has more elements.
Throws:
IOException - error reading the snapshot
ClassNotFoundException - error deserializing the snapshot element

next

Map.Entry<K,V> next()
                    throws IOException,
                           ClassNotFoundException
Returns the next element in the iteration.

Returns:
the next element
Throws:
NoSuchElementException - there are no further elements
IOException - error reading the snapshot
ClassNotFoundException - error deserializing the snapshot element

close

void close()
           throws IOException
Closes the iterator and its underlying resources.

Throws:
IOException - error closing the iterator

GemFire 7.0

Copyright © 1997-2012 VMware, Inc. All rights reserved.