public class BoundedRandomExponentialBackoff extends Object implements RetryIntervalPolicy
interval' = interval * (2.0 + rnd(-1.0, 1.0) * randomFactor)
| Modifier and Type | Class and Description |
|---|---|
static class |
BoundedRandomExponentialBackoff.Builder |
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_MAX_INTERVAL_MILLIS |
static long |
DEFAULT_MIN_INTERVAL_MILLIS |
static float |
DEFAULT_RANDOMIZATION_FACTOR |
| Constructor and Description |
|---|
BoundedRandomExponentialBackoff(long minIntervalMillis,
long maxIntervalMillis,
float randomizationFactor)
Create a
BoundedRandomExponentialBackoff with custom values. |
| Modifier and Type | Method and Description |
|---|---|
static BoundedRandomExponentialBackoff.Builder |
newBuilder() |
RetryScheduler |
newScheduler() |
public static final long DEFAULT_MIN_INTERVAL_MILLIS
public static final long DEFAULT_MAX_INTERVAL_MILLIS
public static final float DEFAULT_RANDOMIZATION_FACTOR
public BoundedRandomExponentialBackoff(long minIntervalMillis,
long maxIntervalMillis,
float randomizationFactor)
BoundedRandomExponentialBackoff with custom values.minIntervalMillis - The minimum and initial retry interval.maxIntervalMillis - The maximum retry interval.randomizationFactor - The randomization factor.public static BoundedRandomExponentialBackoff.Builder newBuilder()
public RetryScheduler newScheduler()
newScheduler in interface RetryIntervalPolicyCopyright © 2017. All rights reserved.