public class ConflictResolution extends Object implements ParameterResolverFactory, ParameterResolver<ConflictResolver>
Conflict resolution can be initialized by passing a
ConflictResolver to the static
initialize(ConflictResolver) method. Note that a
to be active before conflict resolution can be initialized.
|Constructor and Description|
|Modifier and Type||Method and Description|
If available, creates a ParameterResolver instance that can provide a parameter of type
Returns the ConflictResolver instance that can be used to resolve conflicts of an Aggregate that has been previously loaded in this Unit of Work.
Initialize conflict resolution in the context of the current Unit of Work dealing with a command on an event sourced aggregate.
Indicates whether this resolver is capable of providing a value for the given
Resolves the parameter value to use for the given
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static void initialize(ConflictResolver conflictResolver)
conflictResolver- conflict resolver able to detect conflicts
public static ConflictResolver getConflictResolver()
ConflictResolverthat 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
public ParameterResolver createInstance(Executable executable, Parameter parameters, int parameterIndex)
parameterTypefor a given message.
If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns
executable- The executable (constructor or method) to inspect
parameters- The parameters on the executable to inspect
parameterIndex- The index of the parameter to return a ParameterResolver for
nullif none is found
public ConflictResolver resolveParameterValue(Message<?> message)
nullif no suitable parameter value can be resolved.
public boolean matches(Message<?> message)
Copyright © 2010–2023. All rights reserved.