public class ExponentialBackoff extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ExponentialBackoff.NoMoreRetriesException
Thrown if no more retries are available for
ExponentialBackoff. |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitNextRetry()
Block until next retry can be executed.
|
boolean |
awaitNextRetryIfAvailable()
Block until next retry can be executed unless max retries has been reached.
|
public void awaitNextRetry()
throws InterruptedException,
ExponentialBackoff.NoMoreRetriesException
awaitNextRetryIfAvailable().ExponentialBackoff.NoMoreRetriesException - If maximum number of retries has been reached.InterruptedExceptionpublic boolean awaitNextRetryIfAvailable()
throws InterruptedException
awaitNextRetry().InterruptedException