Package org.apache.geode.cache.snapshot

Provides API's for importing and exporting cached data into snapshot files. Each snapshot file contains the cache entries (key/value pairs) for a given region.

The RegionSnapshotService can be obtained for an individual region using Region.getSnapshotService(). To obtain a CacheSnapshotService (across all regions), invoke Cache.getSnapshotService().

The SnapshotOptions can be used to configure the behavior of import and export operations.

The SnapshotReader can be used to programmatically read a snapshot created using the GEMFIRE SnapshotOptions.SnapshotFormat format.

Example usage:
 // obtain the snapshot service
 RegionSnapshotService snapshot = region.getSnapshotService();
 // export the region
 snapshot.save(new File("myregion.snapshot"), SnapshotFormat.GEMFIRE);
 // import the data
 snapshot.load(new File("myregion.snapshot"), SnapshotFormat.GEMFIRE);
 
  • Interface Summary 
    Interface Description
    CacheSnapshotService
    Allows a snapshot of cache data to be imported and exported.
    RegionSnapshotService<K,​V>
    Allows a snapshot of region data to be imported and exported.
    SnapshotFilter<K,​V>
    Filters region entries for inclusion into a snapshot.
    SnapshotIterator<K,​V>
    Iterates over the entries in a region snapshot.
    SnapshotOptions<K,​V>
    Provides a way to configure the behavior of snapshot operations.
  • Class Summary 
    Class Description
    SnapshotReader
    Provides utilities for reading cache data.
  • Enum Summary 
    Enum Description
    SnapshotOptions.SnapshotFormat
    Defines the available snapshot file formats.