VMware GemFire Java API Reference
Package org.apache.geode.cache.snapshot
Interface SnapshotIterator<K,V>
-
- Type Parameters:
K- the key type of the snapshot regionV- the value type the snapshot region
- All Superinterfaces:
AutoCloseable
public interface SnapshotIterator<K,V> extends AutoCloseable
Iterates over the entries in a region snapshot. Holds resources that must be freed viaclose().- Since:
- GemFire 7.0
- See Also:
SnapshotReader
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the iterator and its underlying resources.booleanhasNext()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, ClassNotFoundExceptionReturns true if there are more elements in the iteration.- Returns:
- true if the iterator has more elements.
- Throws:
IOException- error reading the snapshotClassNotFoundException- 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 elementsIOException- error reading the snapshotClassNotFoundException- error deserializing the snapshot element
-
close
void close() throws IOExceptionCloses the iterator and its underlying resources.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- error closing the iterator
-
-