Interface IRetryOperation
Defines the basic set of operations to execute operations with configurable retry behaviour.
public interface IRetryOperation
Methods
Execute(Action<IRetryContext>)
Execute the supplied RetryCallback with the configured retry semantics.
void Execute(Action<IRetryContext> retryCallback)
Parameters
retryCallbackAction<IRetryContext>the callback
Execute(Action<IRetryContext>, IRecoveryCallback)
Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback
void Execute(Action<IRetryContext> retryCallback, IRecoveryCallback recoveryCallback)
Parameters
retryCallbackAction<IRetryContext>the callback
recoveryCallbackIRecoveryCallbackthe callback after retries are exhausted
Execute(Action<IRetryContext>, Action<IRetryContext>)
Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback
void Execute(Action<IRetryContext> retryCallback, Action<IRetryContext> recoveryCallback)
Parameters
retryCallbackAction<IRetryContext>the callback
recoveryCallbackAction<IRetryContext>the callback after retries are exhausted
Execute<T>(Func<IRetryContext, T>)
Execute the supplied RetryCallback with the configured retry semantics.
T Execute<T>(Func<IRetryContext, T> retryCallback)
Parameters
retryCallbackFunc<IRetryContext, T>the callback
Returns
- T
result of operation
Type Parameters
Tthe type of return value
Execute<T>(Func<IRetryContext, T>, IRecoveryCallback<T>)
Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback
T Execute<T>(Func<IRetryContext, T> retryCallback, IRecoveryCallback<T> recoveryCallback)
Parameters
retryCallbackFunc<IRetryContext, T>the callback
recoveryCallbackIRecoveryCallback<T>the callback after retries are exhausted
Returns
- T
result of the operation
Type Parameters
Tthe type of return value
Execute<T>(Func<IRetryContext, T>, Func<IRetryContext, T>)
Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback
T Execute<T>(Func<IRetryContext, T> retryCallback, Func<IRetryContext, T> recoveryCallback)
Parameters
retryCallbackFunc<IRetryContext, T>the callback
recoveryCallbackFunc<IRetryContext, T>the callback after retries are exhausted
Returns
- T
result of the operation
Type Parameters
Tthe type of return value