public class DefaultConflictDescription extends Object implements ConflictDescription
ConflictDescription
implementation that takes the necessary information in the Constructor.Constructor and Description |
---|
DefaultConflictDescription(String aggregateIdentifier,
long expectedVersion,
long actualVersion,
List<DomainEventMessage<?>> unexpectedEvents)
Initialize the instance using given values.
|
Modifier and Type | Method and Description |
---|---|
long |
actualVersion()
The actual version of the loaded aggregate
|
String |
aggregateIdentifier()
The identifier of the conflicting aggregate, as a String.
|
long |
expectedVersion()
The expected version, as indicated when loading the aggregate
|
List<DomainEventMessage<?>> |
unexpectedEvents()
The list of events that have been registered with this aggregate since the expected version.
|
public DefaultConflictDescription(String aggregateIdentifier, long expectedVersion, long actualVersion, List<DomainEventMessage<?>> unexpectedEvents)
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 versionpublic String aggregateIdentifier()
ConflictDescription
aggregateIdentifier
in interface ConflictDescription
public long expectedVersion()
ConflictDescription
expectedVersion
in interface ConflictDescription
public long actualVersion()
ConflictDescription
actualVersion
in interface ConflictDescription
public List<DomainEventMessage<?>> unexpectedEvents()
ConflictDescription
unexpectedEvents
in interface ConflictDescription
Copyright © 2010–2018. All rights reserved.