public class ConflictingAggregateVersionException extends ConflictingModificationException
Constructor and Description |
---|
ConflictingAggregateVersionException(String aggregateIdentifier,
long expectedVersion,
long actualVersion)
Initializes the exception using the given
message . |
ConflictingAggregateVersionException(String aggregateIdentifier,
long expectedVersion,
long actualVersion,
Throwable cause)
Initializes the exception using the given
message and cause . |
Modifier and Type | Method and Description |
---|---|
long |
getActualVersion()
Returns the actual version of the aggregate, as loaded by the repository.
|
Object |
getAggregateIdentifier()
Returns the identifier of the aggregate which version is not as expected.
|
long |
getExpectedVersion()
Returns the version expected by the component loading the aggregate.
|
isCauseOf
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ConflictingAggregateVersionException(String aggregateIdentifier, long expectedVersion, long actualVersion)
message
.aggregateIdentifier
- The identifier of the aggregate which version was not as expectedexpectedVersion
- The version expected by the component loading the aggregateactualVersion
- The actual version of the aggregatepublic ConflictingAggregateVersionException(String aggregateIdentifier, long expectedVersion, long actualVersion, Throwable cause)
message
and cause
.aggregateIdentifier
- The identifier of the aggregate which version was not as expectedexpectedVersion
- The version expected by the component loading the aggregateactualVersion
- The actual version of the aggregatecause
- The underlying cause of the exceptionpublic Object getAggregateIdentifier()
public long getExpectedVersion()
public long getActualVersion()
Copyright © 2010–2020. All rights reserved.