Class MutationEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
com.google.cloud.spring.data.spanner.core.mapping.event.MutationEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DeleteEvent
,SaveEvent
public class MutationEvent
extends org.springframework.context.ApplicationEvent
An event holding mutations that are submitted to Cloud Spanner.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionMutationEvent
(List<com.google.cloud.spanner.Mutation> source, Iterable targetEntities) Constructor. -
Method Summary
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
MutationEvent
Constructor.- Parameters:
source
- the mutations for the event initially occurred. (nevernull
)targetEntities
- the target entities that need to be mutated. This may benull
depending on the type of delete request.
-
-
Method Details
-
getMutations
Get the mutations underlying this event.- Returns:
- the list of mutations.
-
getTargetEntities
Get the list of entities that needed to be deleted.- Returns:
- This may be
null
depending on the type of delete request.
-
equals
-
hashCode
public int hashCode()
-