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 org.springframework.context.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
- See Also:
-
ApplicationEvent
Region
- Serialized Form
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionSnapshotApplicationEvent
(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.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. -
Method Summary
Modifier and TypeMethodDescriptionGets the absolute pathname of the Region in GemFire for which the snapshot will be taken.Gets the meta-data used to perform the GemFire Cache Region data snapshots.boolean
Determines whether this event indicates a Cache-wide snapshot.boolean
Determines whether this event indicates a Region-specific snapshot.boolean
Determines whether this event has been targeted for a Region with the given absolute pathname.boolean
matches
(org.apache.geode.cache.Region region) Determines whether this event has been targeted for the specified Region.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
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
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:
-
Region.getFullPath()
-
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(org.apache.geode.cache.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:
-
Region.getFullPath()
getRegionPath()
matches(String)
-
matches
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:
-