Class InMemoryProgressTracker
java.lang.Object
com.opencqrs.framework.eventhandler.progress.InMemoryProgressTracker
- All Implemented Interfaces:
ProgressTracker
ProgressTracker implementation using an in-memory Map. This implementation is discouraged for
EventHandlers that rely on persistent progress while processing events, since the
current(String, long) current progress} is reset upon restart of the JVM.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the currentProgressfor the specified event processing group and partition.void
-
Constructor Details
-
InMemoryProgressTracker
public InMemoryProgressTracker()
-
-
Method Details
-
current
Description copied from interface:ProgressTrackerRetrieves the currentProgressfor the specified event processing group and partition.- Specified by:
currentin interfaceProgressTracker- Parameters:
group- the processing group identifierpartition- the partition number- Returns:
- the current progress
-
proceed
Description copied from interface:ProgressTrackerProceeds the currentProgressby executing the givenSupplier, which in turn yields the new progress for the specified event processing group and partition.- Specified by:
proceedin interfaceProgressTracker- Parameters:
group- the processing group identifierpartition- the partition numberexecution- the supplier returning the new progress, if executed successfully
-