Class AggregateStateCorruptedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.common.AxonException
org.axonframework.common.AxonTransientException
org.axonframework.disruptor.commandhandling.AggregateStateCorruptedException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AggregateBlacklistedException
Exception indicating that the changes in an aggregate (generated events) are ignored by the DisruptorCommandBus,
because it cannot guarantee that these changes have been applied to an aggregate instance with the correct state. The
DisruptorCommandBus will automatically recover by clearing cached information of blacklisted aggregates. Because of
the asynchronous nature of the DisruptorCommandBus, several commands may fail due to the same corrupt aggregate.
When a corrupt aggregate has been detected, a
AggregateBlacklistedException is thrown. Each subsequent time
state changes are applied to a blacklisted aggregate, an AggregateStateCorruptedException is thrown.
It is generally safe to retry any commands that resulted in this exception, unless the cause is clearly
non-transient.- Since:
- 2.0
- Author:
- Allard Buijze
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAggregateStateCorruptedException(String aggregateIdentifier, String message) Initializes the exception with givenaggregateIdentifierand given explanatorymessage.AggregateStateCorruptedException(String aggregateIdentifier, String message, Throwable cause) Initializes the exception with givenaggregateIdentifier, given explanatorymessageandcause. -
Method Summary
Modifier and TypeMethodDescriptionReturns the identifier of the blacklisted aggregate.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AggregateStateCorruptedException
Initializes the exception with givenaggregateIdentifierand given explanatorymessage.- Parameters:
aggregateIdentifier- The identifier of the blacklisted aggregatemessage- The message explaining why the blacklisting occurred
-
AggregateStateCorruptedException
public AggregateStateCorruptedException(String aggregateIdentifier, String message, Throwable cause) Initializes the exception with givenaggregateIdentifier, given explanatorymessageandcause.- Parameters:
aggregateIdentifier- The identifier of the blacklisted aggregatemessage- The message explaining why the blacklisting occurredcause- The cause of the blacklist
-
-
Method Details
-
getAggregateIdentifier
Returns the identifier of the blacklisted aggregate.- Returns:
- the identifier of the blacklisted aggregate
-