Enum Class NoConflictResolver

java.lang.Object
java.lang.Enum<NoConflictResolver>
org.axonframework.eventsourcing.conflictresolution.NoConflictResolver
All Implemented Interfaces:
Serializable, Comparable<NoConflictResolver>, Constable, ConflictResolver

public enum NoConflictResolver extends Enum<NoConflictResolver> implements ConflictResolver
Implementation of a ConflictResolver that does nothing. This implementation can be used in cases where no actual conflict is present.
Author:
Rene de Waele
  • Enum Constant Details

  • Method Details

    • values

      public static NoConflictResolver[] 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 NoConflictResolver 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
    • detectConflicts

      public <T extends Exception> void detectConflicts(Predicate<List<DomainEventMessage<?>>> predicate, ConflictExceptionSupplier<T> exceptionSupplier)
      Description copied from interface: ConflictResolver
      Resolve conflicts between unseen changes made to the aggregate and new changes that are about to be made.

      Conflicts are detected using the given predicate. If the Predicate.test(Object) method returns true a conflict is registered. If a conflict is registered an instance of ConflictingModificationException (or subtype) is thrown immediately. The cause of the exception is supplied by the given causeSupplier (supplying a null cause is allowed).

      Specified by:
      detectConflicts in interface ConflictResolver
      Parameters:
      predicate - test for conflicting unseen changes. Returns true if there is a conflict.
      exceptionSupplier - exception to throw when a conflict is detected
    • detectConflicts

      public void detectConflicts(Predicate<List<DomainEventMessage<?>>> predicate)
      Description copied from interface: ConflictResolver
      Resolve conflicts between changes to be applied to the aggregate and unseen changes made to the aggregate.

      Conflicts are detected using the given predicate. If the Predicate.test(Object) method returns true a conflict is registered. If a conflict is registered an instance of ConflictingModificationException (or subtype) without cause is thrown immediately.

      Specified by:
      detectConflicts in interface ConflictResolver
      Parameters:
      predicate - test for conflicting unseen changes. Returns true if there is a conflict.
    • detectConflicts

      public <T extends Exception> void detectConflicts(Predicate<List<DomainEventMessage<?>>> predicate, ContextAwareConflictExceptionSupplier<T> exceptionSupplier)
      Description copied from interface: ConflictResolver
      Resolve conflicts between unseen changes made to the aggregate and new changes that are about to be made.

      Conflicts are detected using the given predicate. If the Predicate.test(Object) method returns true a conflict is registered. If a conflict is registered an instance of ConflictingModificationException (or subtype) is thrown immediately. The cause of the exception is supplied by the given causeSupplier (supplying a null cause is allowed).

      Specified by:
      detectConflicts in interface ConflictResolver
      Parameters:
      predicate - test for conflicting unseen changes. Returns true if there is a conflict.
      exceptionSupplier - exception to throw when a conflict is detected