Annotation Interface ReplayStatusChangedHandler


Annotation that can be placed on a method that is to be invoked when the ReplayStatus is about to change.

In doing so, this handler has two concrete moments when it is invoked:

  1. When the ReplayStatus changes from ReplayStatus.REGULAR to ReplayStatus.REPLAY, exactly before the first replayed event is processed
  2. When the ReplayStatus changes from ReplayStatus.REPLAY to ReplayStatus.REGULAR, exactly after processing the final event of the replay

Methods annotated with this annotation thus process replay status changes, typically to prepare for and finalize an event replay. Actions to consider during a ReplayStatus change are cleaning up the projection state, clearing caches, or switching storage solution aliases. To that end, the ReplayStatusChange message contains the ReplayStatus that will be changed to.

Since:
5.1.0
Author:
Simon Zambrovski, Stefan Dragisic, Steven van Beelen
See Also: