Interface IProjectionRebuildManager
- Namespace
- Excalibur.Data.ElasticSearch.Projections
- Assembly
- Excalibur.Data.ElasticSearch.dll
Manages the rebuilding of projections from event stores or source data.
public interface IProjectionRebuildManager
Methods
CancelRebuildAsync(string, CancellationToken)
Cancels an ongoing rebuild operation.
Task<bool> CancelRebuildAsync(string operationId, CancellationToken cancellationToken)
Parameters
operationIdstringThe identifier of the rebuild operation to cancel.
cancellationTokenCancellationTokenThe cancellation token.
Returns
GetRebuildStatusAsync(string, CancellationToken)
Gets the current status of a rebuild operation.
Task<ProjectionRebuildStatus> GetRebuildStatusAsync(string operationId, CancellationToken cancellationToken)
Parameters
operationIdstringThe identifier of the rebuild operation.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<ProjectionRebuildStatus>
The current status of the rebuild operation.
ListRebuildOperationsAsync(DateTime, DateTime, string?, CancellationToken)
Lists all rebuild operations within a specified time range.
Task<IEnumerable<ProjectionRebuildSummary>> ListRebuildOperationsAsync(DateTime fromDate, DateTime toDate, string? projectionType, CancellationToken cancellationToken)
Parameters
fromDateDateTimeThe start date for the query.
toDateDateTimeThe end date for the query.
projectionTypestringOptional exact filter by fully qualified projection type name (for example, typeof(OrderProjection).FullName).
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<IEnumerable<ProjectionRebuildSummary>>
A collection of rebuild operation summaries.
StartRebuildAsync(ProjectionRebuildRequest, CancellationToken)
Initiates a full rebuild of a projection from the event store.
Task<ProjectionRebuildResult> StartRebuildAsync(ProjectionRebuildRequest request, CancellationToken cancellationToken)
Parameters
requestProjectionRebuildRequestThe rebuild request containing projection details and options.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<ProjectionRebuildResult>
A rebuild operation result containing the operation identifier and status.
ValidateRebuildAsync(Type, CancellationToken)
Validates that a projection can be rebuilt, and reports what a rebuild would find.
Task<ProjectionRebuildValidation> ValidateRebuildAsync(Type projectionType, CancellationToken cancellationToken)
Parameters
projectionTypeTypeThe projection type to validate.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<ProjectionRebuildValidation>
A validation result indicating whether the rebuild is possible.
Remarks
Takes the TYPE rather than its name because a projection's declared generation lives on the type. A caller holding only a name cannot resolve one, so validation would report on the first generation's index while the store writes to the generation the type declares -- a confident answer about an index the rebuild is not targeting.