|
PeanutButter
|
Provides a wrapping context around retried code. More...
Public Member Functions | |
| TimeBasedRetryContext (TimeSpan maxRunTime, Func< IBackoffStrategy > defaultBackoffStrategyFactory) | |
| Constructs the context with the timeout and a mechanism for backing off on failure. | |
| void | Do (Action action) |
| Attempt to run the action until it either succeeds or times out. | |
| void | Do (Action action, IBackoffStrategy backoffStrategy) |
| Attempt to run the action until it either succeeds or times out. | |
| T | Do< T > (Func< T > func) |
| Attempt to run the func until it either succeeds or times out, returning the first successful value. | |
| T | Do< T > (Func< T > func, IBackoffStrategy backoffStrategy) |
| Attempt to run the func until it either succeeds or times out, returning the first successful value. | |
Provides a wrapping context around retried code.
| PeanutButter.Utils.TimeBasedRetryContext.TimeBasedRetryContext | ( | TimeSpan | maxRunTime, |
| Func< IBackoffStrategy > | defaultBackoffStrategyFactory ) |
Constructs the context with the timeout and a mechanism for backing off on failure.
| maxRunTime | |
| defaultBackoffStrategyFactory |
| void PeanutButter.Utils.TimeBasedRetryContext.Do | ( | Action | action | ) |
Attempt to run the action until it either succeeds or times out.
| action |
| void PeanutButter.Utils.TimeBasedRetryContext.Do | ( | Action | action, |
| IBackoffStrategy | backoffStrategy ) |
Attempt to run the action until it either succeeds or times out.
| action | |
| backoffStrategy |
| T PeanutButter.Utils.TimeBasedRetryContext.Do< T > | ( | Func< T > | func | ) |
Attempt to run the func until it either succeeds or times out, returning the first successful value.
| func |
| T PeanutButter.Utils.TimeBasedRetryContext.Do< T > | ( | Func< T > | func, |
| IBackoffStrategy | backoffStrategy ) |
Attempt to run the func until it either succeeds or times out, returning the first successful value.
| func | |
| backoffStrategy |