Interface IProjectionReplayState
- Namespace
- Stratara.Abstractions.Projections
- Assembly
- Stratara.Abstractions.dll
In-memory coordination handle for the projection-replay state-machine. Workers query this to decide whether they are currently running a replay; admin endpoints flip it via Activate() / Deactivate().
public interface IProjectionReplayState
- Extension Methods
Remarks
Implementations should be process-singleton and thread-safe; the replay handshake crosses worker boundaries via the SubscribeToReplayRequestAsync(Func<Task>, CancellationToken) + RequestReplay() channel.
Properties
IsReplayActive
true while a replay is in progress; false in steady-state.
bool IsReplayActive { get; }
Property Value
Methods
Activate()
Mark the replay as started.
void Activate()
Deactivate()
Mark the replay as completed (success or graceful stop).
void Deactivate()
GetProgress()
Snapshot the current replay progress.
ReplayProgress GetProgress()
Returns
RequestReplay()
Signal that a replay should start — fires every subscribed callback.
void RequestReplay()
SetFailed(string)
Mark the current replay as failed and record errorMessage.
void SetFailed(string errorMessage)
Parameters
errorMessagestring
SetProgress(long, long)
Update the replay progress counters.
void SetProgress(long processedEvents, long totalEvents)
Parameters
SubscribeToReplayRequestAsync(Func<Task>, CancellationToken)
Register a callback fired whenever RequestReplay() is invoked.
Task SubscribeToReplayRequestAsync(Func<Task> onReplayRequested, CancellationToken cancellationToken = default)
Parameters
onReplayRequestedFunc<Task>cancellationTokenCancellationToken