Class Backoff.Jitter
java.lang.Object
org.apache.bookkeeper.common.util.Backoff.Jitter
- All Implemented Interfaces:
Backoff.Policy
- Enclosing class:
- Backoff
A Jittered backoff policy.
It is an implementation of {@link http://www.awsarchitectureblog.com/2015/03/backoff.html}
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.apache.bookkeeper.common.util.Backoff.Policy
NONE -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanlonggetLimit()longgetMaxMs()longgetType()inthashCode()static Backoff.Jitterof(Backoff.Jitter.Type type, long startMs, long maxMs) Create infinite jittered backoff stream.static Backoff.Jitterof(Backoff.Jitter.Type type, long startMs, long maxMs, long limit) Convert the policy into a series of backoff values.toString()
-
Method Details
-
of
Create infinite jittered backoff stream.It is the infinite version of
of(Type, long, long, long).- Parameters:
type- jittered backoff typestartMs- the start backoff time in milliseconds.maxMs- the max backoff time in milliseconds.- Returns:
- jittered 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
-
getType
-
getStartMs
public long getStartMs() -
getMaxMs
public long getMaxMs() -
getLimit
public long getLimit() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-