Interface StreamingCondition
- All Superinterfaces:
EventsCondition
Interface describing the condition to
from a streamable
event source (like an Event Store).
invalid reference
stream
This condition has a mandatory position() that dictates from what point streaming should commence.
Additionally, an criteria() can be set to filter the stream of events.
- Since:
- 5.0.0
- Author:
- Michal Negacz, Milan Savić, Marco Amann, Sara Pellegrini, Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionstatic StreamingConditionconditionFor(TrackingToken position, EventCriteria criteria) Constructs a simpleStreamingConditionthat starts streaming from the givenposition, only returning events matching the givencriteria.default EventCriteriacriteria()The set of criteria against which events must match.or(EventCriteria criteria) position()The position as aTrackingTokento start streaming from.static StreamingConditionstartingFrom(TrackingToken position) Constructs a simpleStreamingConditionthat starts streaming from the givenposition.Methods inherited from interface org.axonframework.messaging.eventstreaming.EventsCondition
matches
-
Method Details
-
startingFrom
Constructs a simpleStreamingConditionthat starts streaming from the givenposition. When thepositionisnullstreaming will start from the beginning of the Event Store.- Parameters:
position- TheTrackingTokendescribing the position to start streaming from.- Returns:
- A simple
StreamingConditionthat starts streaming from the givenposition.
-
conditionFor
static StreamingCondition conditionFor(@Nonnull TrackingToken position, @Nonnull EventCriteria criteria) Constructs a simpleStreamingConditionthat starts streaming from the givenposition, only returning events matching the givencriteria.- Parameters:
position- TheTrackingTokendescribing the position to start streaming from.criteria- The criteria used to match events that are to be streamed.- Returns:
- A simple
StreamingConditionthat starts streaming from the givenposition, only returning events matching the givencriteria.
-
position
TrackingToken position()The position as aTrackingTokento start streaming from.- Returns:
- The position as a
TrackingTokento start streaming from.
-
criteria
Description copied from interface:EventsConditionThe set of criteria against which events must match.- Specified by:
criteriain interfaceEventsCondition- Returns:
- The
EventCriteriaused to match this condition against.
-
or
- Parameters:
criteria- TheEventCriteriatoEventCriteria.or()with thecriteria()ofthisStreamingCondition.- Returns:
- A
StreamingConditionthat"or-ed"the givencriteriawith thecriteria()ofthisStreamingCondition.
-