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). |
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 which is a call to the AWS Service.
If callable
throws an unchecked exception, it is wrapped into HazelcastException
.
Copyright © 2020 Hazelcast, Inc.. All rights reserved.