Interface IProjectionErrorHandler
- Namespace
- Excalibur.Data.ElasticSearch.Projections
- Assembly
- Excalibur.Data.ElasticSearch.dll
Defines the contract for handling projection-related errors in ElasticSearch operations.
public interface IProjectionErrorHandler
Methods
GetProjectionErrorsAsync(DateTime, DateTime, string?, int, CancellationToken)
Retrieves projection errors for analysis and potential reprocessing.
Task<IEnumerable<ProjectionErrorRecord>> GetProjectionErrorsAsync(DateTime fromDate, DateTime toDate, string? projectionType, int maxResults, CancellationToken cancellationToken)
Parameters
fromDateDateTimeThe start date for retrieving error records.
toDateDateTimeThe end date for retrieving error records.
projectionTypestringOptional filter by projection type.
maxResultsintMaximum number of results to return.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<IEnumerable<ProjectionErrorRecord>>
A collection of projection error records matching the criteria.
HandleBulkOperationErrorsAsync(BulkOperationErrorContext, CancellationToken)
Handles errors from bulk operations where some documents may have succeeded.
Task HandleBulkOperationErrorsAsync(BulkOperationErrorContext context, CancellationToken cancellationToken)
Parameters
contextBulkOperationErrorContextThe bulk operation error context containing both successful and failed items.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
A task representing the asynchronous bulk error handling operation.
HandleProjectionErrorAsync(ProjectionErrorContext, CancellationToken)
Handles an error that occurred during a projection operation.
Task HandleProjectionErrorAsync(ProjectionErrorContext context, CancellationToken cancellationToken)
Parameters
contextProjectionErrorContextThe context of the failed projection operation.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
A task representing the asynchronous error handling operation.
MarkErrorsAsResolvedAsync(IEnumerable<string>, CancellationToken)
Marks projection errors as resolved after successful reprocessing.
Task<int> MarkErrorsAsResolvedAsync(IEnumerable<string> errorIds, CancellationToken cancellationToken)
Parameters
errorIdsIEnumerable<string>The identifiers of the resolved errors.
cancellationTokenCancellationTokenThe cancellation token.