Table of Contents

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

fromDate DateTime

The start date for retrieving error records.

toDate DateTime

The end date for retrieving error records.

projectionType string

Optional filter by projection type.

maxResults int

Maximum number of results to return.

cancellationToken CancellationToken

The 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

context BulkOperationErrorContext

The bulk operation error context containing both successful and failed items.

cancellationToken CancellationToken

The 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

context ProjectionErrorContext

The context of the failed projection operation.

cancellationToken CancellationToken

The 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

errorIds IEnumerable<string>

The identifiers of the resolved errors.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<int>

The number of errors marked as resolved.