|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.axonframework.common.AxonException org.axonframework.common.AxonNonTransientException org.axonframework.repository.ConflictingModificationException org.axonframework.repository.ConflictingAggregateVersionException
public class ConflictingAggregateVersionException
Exception indicating that the (actual) version of a loaded aggregate did not match the given expected version number. This typically means that the aggregate has been modified by another thread between the moment data was queried, and the command modifying the aggregate was handled.
Constructor Summary | |
---|---|
ConflictingAggregateVersionException(Object aggregateIdentifier,
long expectedVersion,
long actualVersion)
Initializes the exception using the given message . |
|
ConflictingAggregateVersionException(Object aggregateIdentifier,
long expectedVersion,
long actualVersion,
Throwable cause)
Initializes the exception using the given message and cause . |
Method Summary | |
---|---|
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. |
Methods inherited from class org.axonframework.common.AxonNonTransientException |
---|
isCauseOf |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConflictingAggregateVersionException(Object 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(Object 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 exceptionMethod Detail |
---|
public Object getAggregateIdentifier()
public long getExpectedVersion()
public long getActualVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |