Interface IRetryOperation
Defines the basic set of operations to execute operations with configurable retry behaviour.
Namespace: Steeltoe.Common.Retry
Assembly: Steeltoe.Common.Abstractions.dll
Syntax
public interface IRetryOperation
Methods
| Edit this page View SourceExecute(Action<IRetryContext>)
Execute the supplied RetryCallback with the configured retry semantics.
Declaration
void Execute(Action<IRetryContext> retryCallback)
Parameters
Type | Name | Description |
---|---|---|
Action<IRetryContext> | retryCallback | the callback |
Execute(Action<IRetryContext>, Action<IRetryContext>)
Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback
Declaration
void Execute(Action<IRetryContext> retryCallback, Action<IRetryContext> recoveryCallback)
Parameters
Type | Name | Description |
---|---|---|
Action<IRetryContext> | retryCallback | the callback |
Action<IRetryContext> | recoveryCallback | the callback after retries are exhausted |
Execute(Action<IRetryContext>, IRecoveryCallback)
Execute the supplied RetryCallback with the configured retry semantics. When retry is exhausted, call the recoverycallback
Declaration
void Execute(Action<IRetryContext> retryCallback, IRecoveryCallback recoveryCallback)
Parameters
Type | Name | Description |
---|---|---|
Action<IRetryContext> | retryCallback | the callback |
IRecoveryCallback | recoveryCallback | the callback after retries are exhausted |
Execute<T>(Func<IRetryContext, T>)
Execute the supplied RetryCallback with the configured retry semantics.
Declaration
T Execute<T>(Func<IRetryContext, T> retryCallback)
Parameters
Type | Name | Description |
---|---|---|
Func<IRetryContext, T> | retryCallback | the callback |
Returns
Type | Description |
---|---|
T | result of operation |
Type Parameters
Name | Description |
---|---|
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
Declaration
T Execute<T>(Func<IRetryContext, T> retryCallback, Func<IRetryContext, T> recoveryCallback)
Parameters
Type | Name | Description |
---|---|---|
Func<IRetryContext, T> | retryCallback | the callback |
Func<IRetryContext, T> | recoveryCallback | the callback after retries are exhausted |
Returns
Type | Description |
---|---|
T | result of the operation |
Type Parameters
Name | Description |
---|---|
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
Declaration
T Execute<T>(Func<IRetryContext, T> retryCallback, IRecoveryCallback<T> recoveryCallback)
Parameters
Type | Name | Description |
---|---|---|
Func<IRetryContext, T> | retryCallback | the callback |
IRecoveryCallback<T> | recoveryCallback | the callback after retries are exhausted |
Returns
Type | Description |
---|---|
T | result of the operation |
Type Parameters
Name | Description |
---|---|
T | the type of return value |