Interface StreamProcessorListener
-
public interface StreamProcessorListener
A listener for theStreamProcessor
. Allows retrieving insides of the processing and replay of records. It can be especially useful for testing purposes. Note that the listener is invoked inside the context of the stream processor and should not block its execution.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
onProcessed(TypedRecord<?> processedCommand)
Is called when a command is processed.default void
onReplayed(long lastReplayedEventPosition, long lastReadRecordPosition)
Is called when one or more events are replayed.default void
onSkipped(LoggedEvent skippedRecord)
Is called when a record is skipped and not processed.
-
-
-
Method Detail
-
onProcessed
void onProcessed(TypedRecord<?> processedCommand)
Is called when a command is processed.- Parameters:
processedCommand
- the command that is processed
-
onSkipped
default void onSkipped(LoggedEvent skippedRecord)
Is called when a record is skipped and not processed.- Parameters:
skippedRecord
- the record that is skipped
-
onReplayed
default void onReplayed(long lastReplayedEventPosition, long lastReadRecordPosition)
Is called when one or more events are replayed. Even if the state changes are not applied.- Parameters:
lastReplayedEventPosition
- the position of the event that is replayed lastlastReadRecordPosition
- the position of the record that is read last
-
-