Package org.apache.geode.cache.snapshot
Interface SnapshotOptions<K,V>
- Type Parameters:
K- the cache entry key typeV- the cache entry value type
- All Superinterfaces:
Serializable
Provides a way to configure the behavior of snapshot operations. The default options are:
- filter
- null
- Since:
- GemFire 7.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDefines the available snapshot file formats. -
Method Summary
Modifier and TypeMethodDescriptionReturns the filter to be applied to snapshot entries.invokeCallbacks(boolean invokeCallbacks) Sets whether to invoke callbacks when loading a snapshot.booleanReturns true if the snapshot operation will proceed in parallel.setFilter(SnapshotFilter<K, V> filter) Sets a filter to apply to snapshot entries.setParallelMode(boolean parallel) Enables parallel mode for snapshot export, which will cause each member of a partitioned region to save its local data set (ignoring redundant copies) to a separate snapshot file.booleanReturns whether loading a snapshot causes callbacks to be invoked
-
Method Details
-
setFilter
Sets a filter to apply to snapshot entries. Entries that are accepted by the filter will be included in import and export operations.- Parameters:
filter- the filter to apply, or null to remove the filter- Returns:
- the snapshot options
-
getFilter
SnapshotFilter<K,V> getFilter()Returns the filter to be applied to snapshot entries. Entries that are accepted by the filter will be included in import and export operations.- Returns:
- the filter, or null if the filter is not set
-
invokeCallbacks
Sets whether to invoke callbacks when loading a snapshot. The default is false.- Parameters:
invokeCallbacks- whether to invoke callbacks when loading a snapshot- Returns:
- the snapshot options
-
shouldInvokeCallbacks
boolean shouldInvokeCallbacks()Returns whether loading a snapshot causes callbacks to be invoked- Returns:
- whether loading a snapshot causes callbacks to be invoked
-
isParallelMode
boolean isParallelMode()Returns true if the snapshot operation will proceed in parallel.- Returns:
- true if the parallel mode has been enabled
- Since:
- Geode 1.3
-
setParallelMode
Enables parallel mode for snapshot export, which will cause each member of a partitioned region to save its local data set (ignoring redundant copies) to a separate snapshot file.Parallelizing snapshot operations may yield significant performance improvements for large data sets. This is particularly true when each member is writing to separate physical disks.
This flag is ignored for replicated regions.
- Parameters:
parallel- true if the snapshot operations will be performed in parallel- Returns:
- the snapshot options
- Since:
- Geode 1.3
- See Also:
-
SnapshotFileMapper
-