public final class BackOffUtilsStatic Methods
next(Sleeper sleeper, BackOff backOff)
public static boolean next(Sleeper sleeper, BackOff backOff)Runs the next iteration of the back-off policy, and returns whether to continue to retry the operation.
If true, it will call Sleeper#sleep(long) with the specified number of
milliseconds from BackOff#nextBackOffMillis().
| Parameters | |
|---|---|
| Name | Description |
sleeper |
Sleepersleeper |
backOff |
BackOffback-off policy |
| Returns | |
|---|---|
| Type | Description |
boolean |
whether to continue to back off; in other words, whether BackOff#nextBackOffMillis() did not return BackOff#STOP |
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
if any thread has interrupted the current thread |
IOException |
if any thread has interrupted the current thread |