Interface IRetryableReadOperation<TResult>
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents a retryable read operation.
public interface IRetryableReadOperation<TResult> : IExecutableInRetryableReadContext<TResult>
Type Parameters
TResultThe type of the result.
- Inherited Members
Methods
ExecuteAttempt(RetryableReadContext, int, long?, CancellationToken)
Executes the first attempt.
TResult ExecuteAttempt(RetryableReadContext context, int attempt, long? transactionNumber, CancellationToken cancellationToken)
Parameters
contextRetryableReadContextThe context.
attemptintThe attempt.
transactionNumberlong?The transaction number.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- TResult
The result.
ExecuteAttemptAsync(RetryableReadContext, int, long?, CancellationToken)
Executes the first attempt.
Task<TResult> ExecuteAttemptAsync(RetryableReadContext context, int attempt, long? transactionNumber, CancellationToken cancellationToken)
Parameters
contextRetryableReadContextThe context.
attemptintThe attempt.
transactionNumberlong?The transaction number.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TResult>
The result.