public final class RetryUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
RetryUtils.RunnableThrowsIOException
Interface for methods which return nothing and may throw IOException.
|
Modifier and Type | Method and Description |
---|---|
static void |
retry(String action,
RetryUtils.RunnableThrowsIOException f,
RetryPolicy policy)
Retries the given method until it doesn't throw an IO exception or the retry policy expires.
|
public static void retry(String action, RetryUtils.RunnableThrowsIOException f, RetryPolicy policy) throws IOException
action
- a description of the action that fits the phrase "Failed to ${action}"f
- the function to retrypolicy
- the retry policy to useIOException
Copyright © 2023. All Rights Reserved.