Package com.newrelic.telemetry
Class Backoff
- java.lang.Object
-
- com.newrelic.telemetry.Backoff
-
public class Backoff extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Backoff.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Backoff.Builder
builder()
static Backoff
defaultBackoff()
long
nextWaitMs()
Computes the next wait time and does NOT actually sleep.
-
-
-
Method Detail
-
defaultBackoff
public static Backoff defaultBackoff()
-
builder
public static Backoff.Builder builder()
-
nextWaitMs
public long nextWaitMs()
Computes the next wait time and does NOT actually sleep. This increases the tracked number of retries;- Returns:
- the next amount of time to wait, or -1 if max retries exceeded.
-
-