Package org.apache.geode.cache.snapshot
Class SnapshotReader
java.lang.Object
org.apache.geode.cache.snapshot.SnapshotReader
Provides utilities for reading cache data.
- Since:
- GemFire 7.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> SnapshotIterator<K, V> Reads a snapshot file and passes the entries to the application.
-
Method Details
-
read
public static <K,V> SnapshotIterator<K,V> read(File snapshot) throws IOException, ClassNotFoundException Reads a snapshot file and passes the entries to the application.Prior to invoking
readall necessary serializers (eitherDataSerializerorPdxSerializer) and anyInstantiatorshould have been registered.- Type Parameters:
K- the key typeV- the value type- Parameters:
snapshot- the snapshot file- Returns:
- the snapshot iterator
- Throws:
IOException- error reading the snapshot fileClassNotFoundException- unable deserialize entry
-