public class FutureUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FutureUtils.RetryException |
Constructor and Description |
---|
FutureUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> Future<T> |
retry(Callable<Future<T>> operation,
int retries,
Executor executor)
Retry the given operation the given number of times in case of a failure.
|
public static <T> Future<T> retry(Callable<Future<T>> operation, int retries, Executor executor)
T
- type of the resultoperation
- to executedretries
- if the operation failedexecutor
- to use to run the futuresFutureUtils.RetryException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.