org.axonframework.eventhandling
Interface EventSequencingPolicy
- All Known Implementing Classes:
- FullConcurrencyPolicy, SequentialPerAggregatePolicy, SequentialPolicy
public interface EventSequencingPolicy
Interface to a policy definition for concurrent event handling.
Some implementations are provided by default: SequentialPolicy: Default policy. Requires that all
events are handled in the order they arrive at the event handler. This also means that at most 1 thread is processing
events for this handler at any time. FullConcurrencyPolicy: Allows each event to be handled independently
of any other events. Event processing will typically start in the same order the events were dispatched in.
SequentialPerAggregatePolicy: Will force events generated by the same aggregate to be handled
sequentially. At most one thread will be processing events of a single aggregate at any time
- Since:
- 0.3
- Author:
- Allard Buijze
getSequenceIdentifierFor
Object getSequenceIdentifierFor(Event event)
- Returns the sequence identifier for the given
event. When two events have the same identifier (as
defined by their equals method), they will be executed sequentially. A null value indicates that
there are no sequencing requirements for the handling of this event.
- Parameters:
event - the event for which to get the sequencing identifier
- Returns:
- a sequence identifier for the given event
Copyright © 2011. All Rights Reserved.