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
retryCallback
Action<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
retryCallback
Action<IRetryContext>the callback
recoveryCallback
IRecoveryCallbackthe 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
retryCallback
Action<IRetryContext>the callback
recoveryCallback
Action<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
retryCallback
Func<IRetryContext, T>the callback
Returns
- T
result of operation
Type Parameters
T
the 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
retryCallback
Func<IRetryContext, T>the callback
recoveryCallback
IRecoveryCallback<T>the callback after retries are exhausted
Returns
- T
result of the operation
Type Parameters
T
the 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
retryCallback
Func<IRetryContext, T>the callback
recoveryCallback
Func<IRetryContext, T>the callback after retries are exhausted
Returns
- T
result of the operation
Type Parameters
T
the type of return value