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
EventHandler
s 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 currentProgress
for the specified event processing group and partition.void
-
Constructor Details
-
InMemoryProgressTracker
public InMemoryProgressTracker()
-
-
Method Details
-
current
Description copied from interface:ProgressTracker
Retrieves the currentProgress
for the specified event processing group and partition.- Specified by:
current
in interfaceProgressTracker
- Parameters:
group
- the processing group identifierpartition
- the partition number- Returns:
- the current progress
-
proceed
Description copied from interface:ProgressTracker
Proceeds the currentProgress
by executing the givenSupplier
, which in turn yields the new progress for the specified event processing group and partition.- Specified by:
proceed
in interfaceProgressTracker
- Parameters:
group
- the processing group identifierpartition
- the partition numberexecution
- the supplier returning the new progress, if executed successfully
-