public class ExponentialBackOffStrategy extends AbstractBackOffStrategy
| Constructor and Description |
|---|
ExponentialBackOffStrategy(int baseBackOffTimeInSeconds)
Unlimited use ExponentialBackOffStrategy.
|
ExponentialBackOffStrategy(int baseBackOffTimeInSeconds,
int maxNumAttempts)
Limited use ExponentialBackOffStrategy.
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
calculateBackOffTime(int attemptCount,
long baseSleepTime)
Calculate the amount of time in milliseconds that the strategy should back off for
|
backOff, resetpublic ExponentialBackOffStrategy(int baseBackOffTimeInSeconds)
baseBackOffTimeInSeconds - baseBackOffTimeInSecondspublic ExponentialBackOffStrategy(int baseBackOffTimeInSeconds,
int maxNumAttempts)
baseBackOffTimeInSeconds - baseBackOffTimeInSecondsmaxNumAttempts - maxNumAttemptsprotected long calculateBackOffTime(int attemptCount,
long baseSleepTime)
AbstractBackOffStrategycalculateBackOffTime in class AbstractBackOffStrategyattemptCount - the number of attempts the strategy has backed off.
i.e. 1 -> this is the first attempt, 2 -> this is the second attempt, etc.baseSleepTime - the minimum amount of time it should back off for in millisecondsCopyright © 2020 The Apache Software Foundation. All rights reserved.