SnapshotOptions (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.cache.snapshot, interface: SnapshotOptions

Package org.apache.geode.cache.snapshot

# Interface SnapshotOptions<K,V>

Type Parameters:
  `K` - the cache entry key type
  `V` - the cache entry value type

All Superinterfaces:
  `Serializable`

public interface SnapshotOptions<K,V> extends 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 Classes
  Modifier and Type
  Interface
  Description
  `static enum`
  `SnapshotOptions.SnapshotFormat`
  Defines the available snapshot file formats.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SnapshotFilter<K,V>`
  `getFilter()`
  Returns the filter to be applied to snapshot entries.
  `SnapshotOptions<K,V>`
  `invokeCallbacks(boolean invokeCallbacks)`
  Sets whether to invoke callbacks when loading a snapshot.
  `boolean`
  `isParallelMode()`
  Returns true if the snapshot operation will proceed in parallel.
  `SnapshotOptions<K,V>`
  `setFilter(SnapshotFilter<K,V> filter)`
  Sets a filter to apply to snapshot entries.
  `SnapshotOptions<K,V>`
  `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.
  `boolean`
  `shouldInvokeCallbacks()`
  Returns whether loading a snapshot causes callbacks to be invoked

- ## Method Details

  - ### setFilter

    SnapshotOptions<K,V> setFilter(SnapshotFilter<K,V> filter)
    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

    SnapshotOptions<K,V> invokeCallbacks(boolean 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

    SnapshotOptions<K,V> 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.

    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`