public final class RetryUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
retry(Callable<T> callable,
int retries)
Calls
callable.call() until it does not throw an exception (but no more than retries times). |
static <T> T |
retry(Callable<T> callable,
int retries,
List<String> nonRetryableKeywords)
Calls
callable.call() until it does not throw an exception (but no more than retries times). |
public static <T> T retry(Callable<T> callable, int retries)
callable.call() until it does not throw an exception (but no more than retries times).
Note that callable should be an idempotent operation.
If callable throws an unchecked exception, it is wrapped into HazelcastException.
public static <T> T retry(Callable<T> callable, int retries, List<String> nonRetryableKeywords)
callable.call() until it does not throw an exception (but no more than retries times).
Note that callable should be an idempotent operation.
If callable throws an unchecked exception, it is wrapped into HazelcastException.
Copyright © 2023 Hazelcast, Inc.. All rights reserved.