Enum Class NoSnapshotTriggerDefinition

java.lang.Object
java.lang.Enum<NoSnapshotTriggerDefinition>
org.axonframework.eventsourcing.NoSnapshotTriggerDefinition
All Implemented Interfaces:
Serializable, Comparable<NoSnapshotTriggerDefinition>, Constable, SnapshotTriggerDefinition

public enum NoSnapshotTriggerDefinition extends Enum<NoSnapshotTriggerDefinition> implements SnapshotTriggerDefinition
Implementation of SnapshotTriggerDefinition that doesn't trigger snapshots at all.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static NoSnapshotTriggerDefinition[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NoSnapshotTriggerDefinition valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • prepareTrigger

      public SnapshotTrigger prepareTrigger(@Nonnull Class<?> aggregateType)
      Description copied from interface: SnapshotTriggerDefinition
      Prepares a new trigger for an aggregate with the given aggregateIdentifier and aggregateType. The trigger will be notified of each event applied on the aggregate, as well as the moment at which the aggregate state is fully initialized based on its historic events.

      It is highly recommended that the instances returned by this method are Serializable. Any resources that the trigger needs that are not serializable, can be reattached by implementing the SnapshotTriggerDefinition.reconfigure(Class, SnapshotTrigger) method. This method is invoked when a SnapshotTrigger has been deserialized.

      Specified by:
      prepareTrigger in interface SnapshotTriggerDefinition
      Parameters:
      aggregateType - The type of aggregate for which to create a trigger
      Returns:
      the trigger instance for an aggregate