public final class BackOffUtils
Static 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().
Name | Description |
sleeper | Sleeper sleeper |
backOff | BackOff back-off policy |
Type | Description |
boolean | whether to continue to back off; in other words, whether BackOff#nextBackOffMillis() did not return BackOff#STOP |
Type | Description |
InterruptedException | if any thread has interrupted the current thread |
IOException | if any thread has interrupted the current thread |