Class Backoff.Exponential
java.lang.Object
org.apache.bookkeeper.common.util.Backoff.Exponential
- All Implemented Interfaces:
Backoff.Policy
- Enclosing class:
- Backoff
A exponential backoff policy.
-
Field Summary
Fields inherited from interface org.apache.bookkeeper.common.util.Backoff.Policy
NONE -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanintgetLimit()longgetMaxMs()intlonginthashCode()static Backoff.Exponentialof(long startMs, long maxMs, int multiplier) Create an infinite exponential backoff policy.static Backoff.Exponentialof(long startMs, long maxMs, int multiplier, int limit) Convert the policy into a series of backoff values.toString()
-
Method Details
-
of
Create an infinite exponential backoff policy.It is the infinite version of
of(long, long, int, int).- Parameters:
startMs- start backoff time in milliseconds.maxMs- max backoff time in milliseconds.multiplier- the backoff multiplier- Returns:
- the exponential backoff policy.
-
toBackoffs
Description copied from interface:Backoff.PolicyConvert the policy into a series of backoff values.- Specified by:
toBackoffsin interfaceBackoff.Policy- Returns:
- a series of backoff values.
-
of
-
getStartMs
public long getStartMs() -
getMaxMs
public long getMaxMs() -
getMultiplier
public int getMultiplier() -
getLimit
public int getLimit() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-