Class ProjectionGenerationCutover
- Namespace
- Excalibur.EventSourcing.Projections
- Assembly
- Excalibur.EventSourcing.dll
Atomically switches framework-routed readers to a caught-up generation.
public sealed class ProjectionGenerationCutover
- Inheritance
-
ProjectionGenerationCutover
- Inherited Members
Remarks
Cutover never retires a member or deletes a destination. Stop old processors and retire their binding explicitly after the rollback window.
Constructors
ProjectionGenerationCutover(ISubscriptionCheckpointStore, IGlobalStreamQuery)
Creates the shared cutover gate.
public ProjectionGenerationCutover(ISubscriptionCheckpointStore checkpoints, IGlobalStreamQuery globalStream)
Parameters
checkpointsISubscriptionCheckpointStoreThe authoritative roster and progress store.
globalStreamIGlobalStreamQueryThe stream whose head bounds the lag.
Methods
CutOverAsync(ProjectionGenerationCutoverRequest, CancellationToken)
Switches readers when the selected member's measured lag satisfies the threshold.
public Task<ProjectionGenerationCutoverResult> CutOverAsync(ProjectionGenerationCutoverRequest request, CancellationToken cancellationToken)
Parameters
requestProjectionGenerationCutoverRequestThe subscription, generation keys and accepted lag in positions.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<ProjectionGenerationCutoverResult>
The observed outcome and the lag measurement.
Remarks
The database validates the captured target binding and minimum cursor while comparing the reader revision. A successful transition protects its target from retirement. Native search aliases and direct SDK clients do not follow this pointer.