Class DefaultConflictDescription
java.lang.Object
org.axonframework.eventsourcing.conflictresolution.DefaultConflictDescription
- All Implemented Interfaces:
ConflictDescription
ConflictDescription implementation that takes the necessary information in the Constructor.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultConflictDescription(String aggregateIdentifier, long expectedVersion, long actualVersion, List<DomainEventMessage<?>> unexpectedEvents) Initialize the instance using given values. -
Method Summary
Modifier and TypeMethodDescriptionlongThe actual version of the loaded aggregateThe identifier of the conflicting aggregate, as a String.longThe expected version, as indicated when loading the aggregateThe list of events that have been registered with this aggregate since the expected version.
-
Constructor Details
-
DefaultConflictDescription
public DefaultConflictDescription(String aggregateIdentifier, long expectedVersion, long actualVersion, List<DomainEventMessage<?>> unexpectedEvents) Initialize the instance using given values.- Parameters:
aggregateIdentifier- The identifier of the conflicting aggregateexpectedVersion- The expected version of the aggregateactualVersion- The actual version of the aggregateunexpectedEvents- The events registered since the expected version
-
-
Method Details
-
aggregateIdentifier
Description copied from interface:ConflictDescriptionThe identifier of the conflicting aggregate, as a String.- Specified by:
aggregateIdentifierin interfaceConflictDescription- Returns:
- the identifier of the conflicting aggregate
-
expectedVersion
public long expectedVersion()Description copied from interface:ConflictDescriptionThe expected version, as indicated when loading the aggregate- Specified by:
expectedVersionin interfaceConflictDescription- Returns:
- the expected version
-
actualVersion
public long actualVersion()Description copied from interface:ConflictDescriptionThe actual version of the loaded aggregate- Specified by:
actualVersionin interfaceConflictDescription- Returns:
- the actual version of the aggregate
-
unexpectedEvents
Description copied from interface:ConflictDescriptionThe list of events that have been registered with this aggregate since the expected version.- Specified by:
unexpectedEventsin interfaceConflictDescription- Returns:
- the events that were registered since the expected version of the aggregate
-