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.
Interface describing a factory for exceptions that indicate an unresolved conflict in an aggregate instance.
-
Method Summary
Modifier and TypeMethodDescriptionsupplyException(String aggregateIdentifier, long expectedVersion, long actualVersion) Creates an instance of an exception indicating a conflict in an aggregate with givenaggregateIdentifier, the givenexpectedVersionandactualVersion.
-
Method Details
-
supplyException
Creates an instance of an exception indicating a conflict in an aggregate with givenaggregateIdentifier, the givenexpectedVersionandactualVersion.- Parameters:
aggregateIdentifier- The identifier of the conflicting aggregateexpectedVersion- The expected version of the aggregateactualVersion- The actual version of the aggregate- Returns:
- the exception describing the conflict
-