Class ExponentialBackoff
java.lang.Object
org.mineskin.request.backoff.ExponentialBackoff
- All Implemented Interfaces:
RequestInterval
-
Method Summary
Modifier and TypeMethodDescriptionintintgetInterval(int attempt) intintdoublewithFreeAttempts(int freeAttempts) withInitialDelay(int initialDelayMillis) withMaxDelay(int maxDelayMillis) withMultiplier(double multiplier)
-
Method Details
-
withInitialDelay
-
withMaxDelay
-
withMultiplier
-
withFreeAttempts
-
getInterval
public int getInterval(int attempt) - Specified by:
getIntervalin interfaceRequestInterval- Parameters:
attempt- attempt number, starting from 1- Returns:
- interval in milliseconds
-
initialDelayMillis
public int initialDelayMillis() -
maxDelayMillis
public int maxDelayMillis() -
multiplier
public double multiplier() -
freeAttempts
public int freeAttempts()
-