Interface IProjectionRebuilder
- Namespace
- Stratara.Abstractions.Projections
- Assembly
- Stratara.Abstractions.dll
Rebuilds one projection from the beginning of the store while every other projection keeps applying. Only a projection that declares how to empty its own read model can be rebuilt alone.
public interface IProjectionRebuilder
- Extension Methods
Methods
RebuildAsync(string, CancellationToken)
Pauses the projection's readers, returns their checkpoints to the beginning, empties the projection's read model and resumes the readers, which then read the store from the start in parallel, one per partition. Returns once the readers are resumed, not once they have caught up.
Task RebuildAsync(string projectionName, CancellationToken cancellationToken = default)
Parameters
projectionNamestringThe projection, by the name the framework gives it.
cancellationTokenCancellationTokenPropagated to the checkpoint store and the truncation.
Returns
- Task
A task that completes when the readers have been resumed.
Exceptions
- InvalidOperationException
No projection of that name is registered, or it cannot be rebuilt alone.