Class SequentialPolicy
java.lang.Object
org.axonframework.eventhandling.async.SequentialPolicy
- All Implemented Interfaces:
SequencingPolicy<Object>
SequencingPolicy that requires sequential handling of all events delivered to an event handler.
- Since:
- 0.3
- Author:
- Allard Buijze
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ObjectObject used to represent the full sequential policy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the sequence identifier for the givenevent.
-
Field Details
-
FULL_SEQUENTIAL_POLICY
Object used to represent the full sequential policy.Note: This uses a String constant to provide a consistent
Object.hashCode()andObject.equals(Object)behaviour across JVM restarts.
-
-
Constructor Details
-
SequentialPolicy
public SequentialPolicy()
-
-
Method Details
-
getSequenceIdentifierFor
Description copied from interface:SequencingPolicyReturns the sequence identifier for the givenevent. When two events have the same identifier (as defined by their equals method), they will be executed sequentially. Anullvalue indicates that there are no sequencing requirements for the handling of this event.- Specified by:
getSequenceIdentifierForin interfaceSequencingPolicy<Object>- Parameters:
task- the event for which to get the sequencing identifier- Returns:
- a sequence identifier for the given event
-