public static class Backoff.Jitter extends java.lang.Object implements Backoff.Policy
It is an implementation of http://www.awsarchitectureblog.com/2015/03/backoff.html
| Modifier and Type | Class and Description |
|---|---|
static class |
Backoff.Jitter.Type
Jitter type.
|
NONE| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
boolean |
equals(java.lang.Object o) |
long |
getLimit() |
long |
getMaxMs() |
long |
getStartMs() |
Backoff.Jitter.Type |
getType() |
int |
hashCode() |
static Backoff.Jitter |
of(Backoff.Jitter.Type type,
long startMs,
long maxMs)
Create infinite jittered backoff stream.
|
static Backoff.Jitter |
of(Backoff.Jitter.Type type,
long startMs,
long maxMs,
long limit) |
java.util.stream.Stream<java.lang.Long> |
toBackoffs()
Convert the policy into a series of backoff values.
|
java.lang.String |
toString() |
public static Backoff.Jitter of(Backoff.Jitter.Type type, long startMs, long maxMs)
It is the infinite version of of(Type, long, long, long).
type - jittered backoff typestartMs - the start backoff time in milliseconds.maxMs - the max backoff time in milliseconds.public java.util.stream.Stream<java.lang.Long> toBackoffs()
Backoff.PolicytoBackoffs in interface Backoff.Policypublic static Backoff.Jitter of(Backoff.Jitter.Type type, long startMs, long maxMs, long limit)
public Backoff.Jitter.Type getType()
public long getStartMs()
public long getMaxMs()
public long getLimit()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.