Class BackOffUtils (1.44.2)

public final class BackOffUtils

Beta
Utilities for BackOff.

Inheritance

java.lang.Object > 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().

Parameters
Name Description
sleeper Sleeper

sleeper

backOff BackOff

back-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