Set the upper limit of retry interval. No limit by default.
Stop retrying after the specified interval.
Coefficient used to calculate the next retry interval. The following
formula is used:
initialRetryIntervalSeconds * Math.pow(backoffCoefficient, numberOfTries - 2)
Maximum number of attempts. The first retry is second attempt.
The exception types that cause operation being retried. Subclasses of the
specified types are also included. Default is Throwable.class which means
retry any exceptions.
The exception types that should not be retried. Subclasses of the
specified types are also not retried. Default is empty list.
int secondsSinceFirstAttempt = (int) ((recordedFailure.getTime() - firstAttempt.getTime()) / 1000);
Performs the following three validation checks for ExponentialRetry
Policy: 1) initialRetryIntervalSeconds is not greater than
maximumRetryIntervalSeconds 2) initialRetryIntervalSeconds is not greater
"ExponentialRetryPolicy requires maximumRetryIntervalSeconds to have a value larger than initialRetryIntervalSeconds.");
"ExponentialRetryPolicy requires retryExpirationIntervalSeconds to have a value larger than initialRetryIntervalSeconds.");