Class SnapshotEventMessage

All Implemented Interfaces:
Message, EventMessage

@Internal public class SnapshotEventMessage extends GenericEventMessage
Message containing a snapshot.

This message can be emitted when calling EventStoreTransaction.source(SourcingCondition) when using the snapshot sourcing strategy and a suitable snapshot was available.

Since:
5.1.0
Author:
John Hendrikx
  • Constructor Details

    • SnapshotEventMessage

      public SnapshotEventMessage(Snapshot snapshot)
      Constructs a new instance.
      Parameters:
      snapshot - the snapshot, cannot be null
      Throws:
      NullPointerException - when any argument is null
  • Method Details

    • payload

      public Snapshot payload()
      Description copied from interface: Message
      Returns the payload of this Message.

      The payload is the application-specific information.

      Specified by:
      payload in interface Message
      Overrides:
      payload in class MessageDecorator
      Returns:
      The payload of this Message.