Interface AppendCondition
- All Superinterfaces:
EventsCondition
Interface describing the consistency boundary condition for
EventMessages when
appending them to an Event Store.- Since:
- 5.0.0
- Author:
- Michal Negacz, Milan Savić, Marco Amann, Sara Pellegrini, Steven van Beelen, Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionReturns the position in the event store until which theEventsCondition.criteria()should be validated against.static AppendConditionnone()Returns anAppendConditionthat has no criteria nor consistency marker.default AppendConditionorCriteria(EventCriteria criteria) Returns an AppendCondition with a condition that represents this AppendCondition's criteria or the givencriteria.static AppendConditionwithCriteria(EventCriteria criteria) Creates an AppendCondition to append events only if no events matching givencriteriaare available.withMarker(ConsistencyMarker consistencyMarker) Creates an AppendCondition with the same criteria as this one, but with givenconsistencyMarker.Methods inherited from interface org.axonframework.messaging.eventstreaming.EventsCondition
criteria, matches
-
Method Details
-
none
Returns anAppendConditionthat has no criteria nor consistency marker.Only use this
AppendConditionwhen appending events that do not partake in the consistency boundary of any model(s).- Returns:
- An
AppendConditionthat has no criteria nor consistency marker.
-
withCriteria
Creates an AppendCondition to append events only if no events matching givencriteriaare available.- Parameters:
criteria- The criteria for the AppendCondition.- Returns:
- A condition that matches against given criteria.
-
orCriteria
Returns an AppendCondition with a condition that represents this AppendCondition's criteria or the givencriteria.- Parameters:
criteria- The additional criteria the condition may match against.- Returns:
- an AppendCondition that combined this condition's criteria and the given, using 'OR' semantics.
-
consistencyMarker
ConsistencyMarker consistencyMarker()Returns the position in the event store until which theEventsCondition.criteria()should be validated against.Appending will fail when there are events appended after this point that match the provided
EventCriteria.- Returns:
- The position in the event store until which the
EventsCondition.criteria()should be validated against.
-
withMarker
Creates an AppendCondition with the same criteria as this one, but with givenconsistencyMarker.- Parameters:
consistencyMarker- The consistency marker for the newthis AppendCondition.- Returns:
- An
AppendConditionwith the givenconsistencyMarker.
-