| Modifier and Type | Class and Description |
|---|---|
| public static interface | Retry.AdvancedRunnable
Runnable, which provides some additional info (iteration for now) |
| public static interface | Retry.Supplier<T>
Needed here because: - java.util.function.Supplier defined from Java 8 - Adds some additional info (current iteration) |
| public static interface | Retry.ThrowableCallback
Needed here because: - java.util.function.BiConsumer defined from Java 8 - Adds some additional info (current iteration and called throwable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static <T> T | |
| private static int | |
| private static int | |
| public static int | Returns: Index of the first successful invocation, starting from 0.Total number of attempts to execute the attemptsCount, long intervalMillis)runnableRuns the given |
| public static int | Returns: Index of the first successful invocation, starting from 0.Total number of attempts to execute the attemptsCount, int runnablebase for the exponential backoff + jitter intervalBaseMillis)Runs the given |
| public static int | executeWithBackoff(Retry.
|
| public static int | |
| public static int | executeWithBackoff(Retry.
|
| Retry | back to summary |
|---|---|
| public Retry() | |
| call | back to summary |
|---|---|
| public static <T> T call(Retry. Runs the given
| |
| computeBackoffInterval | back to summary |
|---|---|
| private static int computeBackoffInterval(int base, int iteration) | |
| computeIterationBase | back to summary |
|---|---|
| private static int computeIterationBase(int base, int iteration) | |
| execute | back to summary |
|---|---|
| public static int execute(Runnable runnable, int attemptsCount, long intervalMillis) Runs the given
| |
| executeWithBackoff | back to summary |
|---|---|
| public static int executeWithBackoff(Retry. Runs the given
| |
| executeWithBackoff | back to summary |
|---|---|
| public static int executeWithBackoff(Retry. | |
| executeWithBackoff | back to summary |
|---|---|
| public static int executeWithBackoff(Retry. | |
| executeWithBackoff | back to summary |
|---|---|
| public static int executeWithBackoff(Retry. | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| run | back to summary |
|---|---|
| public void run(int iteration) | |
| Modifier and Type | Method and Description |
|---|---|
| public T |
| get | back to summary |
|---|---|
| public T get(int iteration) Gets a result.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| handleThrowable | back to summary |
|---|---|
| public void handleThrowable(int iteration, Throwable t) | |