Interface SequencingPolicy

Type Parameters:
T - The type of object representing the processing instruction for the event.
All Known Implementing Classes:
ExtractionSequencingPolicy, FallbackSequencingPolicy, FullConcurrencyPolicy, HierarchicalSequencingPolicy, MetadataSequencingPolicy, PropertySequencingPolicy, SequentialPerAggregatePolicy, SequentialPolicy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SequencingPolicy
Interface to a policy definition for concurrent processing, for example event handling.

Some implementations are provided by default:

  • SequentialPolicy: Requires that all tasks are handled in the order they arrive at the processor. This also means that at most 1 thread is processing tasks for this processor at any time.
  • FullConcurrencyPolicy: Allows each tasks to be handled independently of any other tasks. Tasks processing will typically start in the same order the tasks were scheduled in, although no guarantees can be given about the actual processing order.
  • SequentialPerAggregatePolicy: Default policy. Will force events (only supports Event Handling tasks) 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