public class RetryUtils extends Object
| Constructor and Description |
|---|
RetryUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
doWithRetry(Action0 action,
int maxRetries)
Retries a method with the SimpleRetryStrategy and a maximum amount of retries.
|
static void |
doWithRetry(Action0 action,
IRetryStrategy retryStrategy)
Retries a method with the given Retry Strategy.
|
static <TResult> TResult |
getWithRetry(Func1<TResult> function,
int maxRetries)
Retries a method with the SimpleRetryStrategy and a maximum amount of retries.
|
static <TResult> TResult |
getWithRetry(Func1<TResult> function,
IRetryStrategy retryStrategy)
Retries a method with the given Retry Strategy.
|
public static <TResult> TResult getWithRetry(Func1<TResult> function, int maxRetries)
TResult - The Result of the Method.function - Function to retry.maxRetries - The Maximum Number of Retries.public static <TResult> TResult getWithRetry(Func1<TResult> function, IRetryStrategy retryStrategy)
TResult - Result of the invocation.function - Function to retry.retryStrategy - RetryStrategy to apply.public static void doWithRetry(Action0 action, int maxRetries)
action - Action to retry.maxRetries - The Maximum Number of Retries.public static void doWithRetry(Action0 action, IRetryStrategy retryStrategy)
action - Action to retry.retryStrategy - RetryStrategy to apply.Copyright © 2017. All rights reserved.