Skip navigation links

Package org.apache.geode.cache.snapshot

Provides API's for importing and exporting cached data into snapshot files.

See: Description

Package org.apache.geode.cache.snapshot Description

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);
Skip navigation links