public class Conflicts extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends EventMessage<?>> |
eventMatching(Predicate<? super T> messageFilter)
Returns a
Predicate for a ConflictResolver that responds affirmative if any event in a list of
unseen events matches the given messageFilter . |
static <T> Predicate<List<DomainEventMessage<?>>> |
payloadMatching(Class<T> payloadType,
Predicate<? super T> payloadFilter)
Returns a
Predicate for a ConflictResolver that responds affirmative if the payload of any event
in a list of unseen events is of given payloadType and matches the given messageFilter . |
static Predicate<List<DomainEventMessage<?>>> |
payloadMatching(Predicate<Object> payloadFilter)
Returns a
Predicate for a ConflictResolver that responds affirmative if the payload of any event
in a list of unseen events matches the given messageFilter . |
static <T> Predicate<List<DomainEventMessage<?>>> |
payloadTypeOf(Class<T> payloadType)
Returns a
Predicate for a ConflictResolver that responds affirmative if the payload type of any
event in a list of unseen events is assignable to given payloadType . |
public static <T extends EventMessage<?>> Predicate<List<T>> eventMatching(Predicate<? super T> messageFilter)
Predicate
for a ConflictResolver
that responds affirmative if any event in a list of
unseen events matches the given messageFilter
. If the returned predicate matches an unseen event the
ConflictResolver will throw an exception.messageFilter
- predicate for a single eventpublic static Predicate<List<DomainEventMessage<?>>> payloadMatching(Predicate<Object> payloadFilter)
Predicate
for a ConflictResolver
that responds affirmative if the payload of any event
in a list of unseen events matches the given messageFilter
. If the returned predicate matches an unseen
event the ConflictResolver will throw an exception.payloadFilter
- predicate for the payload of a single eventpublic static <T> Predicate<List<DomainEventMessage<?>>> payloadMatching(Class<T> payloadType, Predicate<? super T> payloadFilter)
Predicate
for a ConflictResolver
that responds affirmative if the payload of any event
in a list of unseen events is of given payloadType
and matches the given messageFilter
. If the
returned predicate matches an unseen event the ConflictResolver will throw an exception.payloadType
- the type of event payload to filter forpayloadFilter
- predicate for the payload of a single eventpublic static <T> Predicate<List<DomainEventMessage<?>>> payloadTypeOf(Class<T> payloadType)
Predicate
for a ConflictResolver
that responds affirmative if the payload type of any
event in a list of unseen events is assignable to given payloadType
. If the returned predicate matches an
unseen event the ConflictResolver will throw an exception.payloadType
- the type of event payload to filter forCopyright © 2010–2022. All rights reserved.