Interface ConflictExceptionSupplier<T extends Exception>

Type Parameters:
T - The type of exception created
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ConflictExceptionSupplier<T extends Exception>
Interface describing a factory for exceptions that indicate an unresolved conflict in an aggregate instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    supplyException(String aggregateIdentifier, long expectedVersion, long actualVersion)
    Creates an instance of an exception indicating a conflict in an aggregate with given aggregateIdentifier, the given expectedVersion and actualVersion.
  • Method Details

    • supplyException

      T supplyException(String aggregateIdentifier, long expectedVersion, long actualVersion)
      Creates an instance of an exception indicating a conflict in an aggregate with given aggregateIdentifier, the given expectedVersion and actualVersion.
      Parameters:
      aggregateIdentifier - The identifier of the conflicting aggregate
      expectedVersion - The expected version of the aggregate
      actualVersion - The actual version of the aggregate
      Returns:
      the exception describing the conflict