Package org.axonframework.eventhandling
Interface EventTrackerStatusChangeListener
public interface EventTrackerStatusChangeListener
Represent a listener that is notified whenever the
Map of EventTrackerStatus' in the TrackingEventProcessor this component is registered to has changed.- Since:
- 4.4
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionnoOp()Returns a no-op implementation of theEventTrackerStatusChangeListener.voidonEventTrackerStatusChange(Map<Integer, EventTrackerStatus> updatedTrackerStatus) Notification that anEventTrackerStatushas changed.default booleanFlag dictating whether anEventTrackerStatus's positions (e.g.
-
Method Details
-
onEventTrackerStatusChange
Notification that anEventTrackerStatushas changed. Implementations should take into account that this listener may be called concurrently, and that multiple invocations do not necessarily reflect the order in which changes have occurred. If this order is important to the implementation, it should verify theSegmentand the status' positions of the givenupdatedTrackerStatusthrough theEventTrackerStatus.getSegment()andEventTrackerStatus.getCurrentPosition()methods respectively.- Parameters:
updatedTrackerStatus- the updatedEventTrackerStatusto react on
-
validatePositions
default boolean validatePositions()Flag dictating whether anEventTrackerStatus's positions (e.g.EventTrackerStatus.getCurrentPosition()) should be taken into account as a change to listen for. Defaults tofalse, as positions typically change a lot in a running system.- Returns:
trueif positions should be validated,falseotherwise.
-
noOp
Returns a no-op implementation of theEventTrackerStatusChangeListener.- Returns:
- a no-op implementation of the
EventTrackerStatusChangeListener
-