Class SnapshotApplicationEvent<K,V>

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.data.gemfire.snapshot.event.SnapshotApplicationEvent<K,V>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExportSnapshotApplicationEvent, ImportSnapshotApplicationEvent

public abstract class SnapshotApplicationEvent<K,V> extends ApplicationEvent
The SnapshotApplicationEvent class is a Spring ApplicationEvent signaling a GemFire Cache or Region snapshot event, used to trigger a snapshot to occur.
Since:
1.7.0
Author:
John Blum
See Also:
  • Constructor Details

    • SnapshotApplicationEvent

      public SnapshotApplicationEvent(Object source, SnapshotServiceFactoryBean.SnapshotMetadata<K,V>... snapshotMetadata)
      Constructs an instance of SnapshotApplicationEvent initialized with an event source and optional meta-data describing the data snapshots to be imported/exported.
      Parameters:
      source - the source of the ApplicationEvent.
      snapshotMetadata - an array of SnapshotMetadata containing details for each import/export.
      See Also:
    • SnapshotApplicationEvent

      public SnapshotApplicationEvent(Object source, String regionPath, SnapshotServiceFactoryBean.SnapshotMetadata<K,V>... snapshotMetadata)
      Constructs an instance of SnapshotApplicationEvent initialized with an event source, a pathname of the Region which data snapshots are imported/exported along with meta-data describing the details of the snapshot source.
      Parameters:
      source - the source of the ApplicationEvent.
      regionPath - absolute pathname of the Region.
      snapshotMetadata - an array of SnapshotMetadata containing details for each import/export.
      See Also:
  • Method Details

    • getRegionPath

      public String getRegionPath()
      Gets the absolute pathname of the Region in GemFire for which the snapshot will be taken.
      Returns:
      a String indicating the absolute pathname of the Region.
      See Also:
    • getSnapshotMetadata

      public SnapshotServiceFactoryBean.SnapshotMetadata<K,V>[] getSnapshotMetadata()
      Gets the meta-data used to perform the GemFire Cache Region data snapshots.
      Returns:
      an array of SnapshotMetadata containing information necessary to perform the data export.
      See Also:
    • isCacheSnapshotEvent

      public boolean isCacheSnapshotEvent()
      Determines whether this event indicates a Cache-wide snapshot.
      Returns:
      a boolean value indicating whether a Cache-wide snapshot has been triggered.
      See Also:
    • isRegionSnapshotEvent

      public boolean isRegionSnapshotEvent()
      Determines whether this event indicates a Region-specific snapshot.
      Returns:
      a boolean value indicating whether a Region-specific snapshot has been triggered.
      See Also:
    • matches

      public boolean matches(Region region)
      Determines whether this event has been targeted for the specified Region.
      Parameters:
      region - the Region being evaluated as the subject of this event.
      Returns:
      a boolean value indicating whether this event has been targeted for the specified Region
      See Also:
    • matches

      public boolean matches(String regionPath)
      Determines whether this event has been targeted for a Region with the given absolute pathname.
      Parameters:
      regionPath - the absolute Region pathname being evaluated as the subject of this event.
      Returns:
      a boolean value indicating whether this event has been targeted for the absolute Region pathname.
      See Also: