public class ExponentialBackoffStrategy extends Object implements BackoffStrategy
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_BACKOFF_FACTOR |
static int |
DEFAULT_INITIAL_DELAY |
static long |
DEFAULT_MAX_DELAY |
| Modifier | Constructor and Description |
|---|---|
|
ExponentialBackoffStrategy() |
protected |
ExponentialBackoffStrategy(ExponentialBackoffStrategy other) |
|
ExponentialBackoffStrategy(int initialDelay,
double backoffFactor,
long maxDelay,
int maxRetries) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
calculateDelay(double count) |
<T> T |
call(int initialExceptionCount,
IOException initialException,
IOCallable<T> callable) |
ExponentialBackoffStrategy |
withMaxRetries(int maxRetries) |
public static final int DEFAULT_INITIAL_DELAY
public static final double DEFAULT_BACKOFF_FACTOR
public static final long DEFAULT_MAX_DELAY
public ExponentialBackoffStrategy()
public ExponentialBackoffStrategy(int initialDelay,
double backoffFactor,
long maxDelay,
int maxRetries)
protected ExponentialBackoffStrategy(ExponentialBackoffStrategy other)
public ExponentialBackoffStrategy withMaxRetries(int maxRetries)
protected long calculateDelay(double count)
public <T> T call(int initialExceptionCount,
IOException initialException,
IOCallable<T> callable)
throws BackoffException,
InterruptedException
call in interface BackoffStrategyBackoffExceptionInterruptedExceptionCopyright © 2016–2019 Zalando SE. All rights reserved.