public class ConflictResolution extends Object implements org.axonframework.messaging.annotation.ParameterResolverFactory, org.axonframework.messaging.annotation.ParameterResolver<ConflictResolver>
Conflict resolution can be initialized by passing a ConflictResolver to the static initialize(ConflictResolver) method. Note that a UnitOfWork needs
to be active before conflict resolution can be initialized.
| Constructor and Description |
|---|
ConflictResolution() |
| Modifier and Type | Method and Description |
|---|---|
org.axonframework.messaging.annotation.ParameterResolver |
createInstance(Executable executable,
Parameter[] parameters,
int parameterIndex) |
static ConflictResolver |
getConflictResolver()
Returns the ConflictResolver instance that can be used to resolve conflicts of an Aggregate that has been
previously loaded in this Unit of Work.
|
static void |
initialize(ConflictResolver conflictResolver)
Initialize conflict resolution in the context of the current Unit of Work dealing with a command on an event
sourced aggregate.
|
boolean |
matches(org.axonframework.messaging.Message<?> message) |
ConflictResolver |
resolveParameterValue(org.axonframework.messaging.Message<?> message) |
public static void initialize(ConflictResolver conflictResolver)
conflictResolver - conflict resolver able to detect conflictspublic static ConflictResolver getConflictResolver()
ConflictResolver that was registered last, is returned.
Any conflicts must be resolved (by invoking one of the methods on ConflictResolver) before the Unit of
Work is committed.
If no Aggregate was loaded, or no conflicts are present, this method will return a NoConflictResolver,
instance.
public org.axonframework.messaging.annotation.ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex)
createInstance in interface org.axonframework.messaging.annotation.ParameterResolverFactorypublic ConflictResolver resolveParameterValue(org.axonframework.messaging.Message<?> message)
resolveParameterValue in interface org.axonframework.messaging.annotation.ParameterResolver<ConflictResolver>public boolean matches(org.axonframework.messaging.Message<?> message)
matches in interface org.axonframework.messaging.annotation.ParameterResolver<ConflictResolver>Copyright © 2010–2024. All rights reserved.