public class CyclicExponentialBackoffRefillStrategy extends Object implements IRefillStrategy
| Modifier and Type | Field and Description |
|---|---|
protected int |
mBase |
protected int |
mMaxN |
protected long |
mNextRefillInterval |
protected TimeUnit |
mTimeUnit |
protected int |
n |
| Constructor and Description |
|---|
CyclicExponentialBackoffRefillStrategy(int pBase,
int pMaxN,
TimeUnit pBackoffTimeUnit) |
| Modifier and Type | Method and Description |
|---|---|
long |
getIntervalInMillis() |
long |
nextRefill(long pNowInMillis) |
protected void |
updateBackoff() |
protected final int mBase
protected final int mMaxN
protected final TimeUnit mTimeUnit
protected int n
protected long mNextRefillInterval
public CyclicExponentialBackoffRefillStrategy(int pBase,
int pMaxN,
TimeUnit pBackoffTimeUnit)
public long nextRefill(long pNowInMillis)
nextRefill in interface IRefillStrategypublic long getIntervalInMillis()
getIntervalInMillis in interface IRefillStrategyprotected void updateBackoff()
lpezet