Package com.newrelic.telemetry
Class Backoff.Builder
- java.lang.Object
-
- com.newrelic.telemetry.Backoff.Builder
-
- Enclosing class:
- Backoff
public static class Backoff.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Backoff.Builder
backoffFactor(int backoffFactor, java.util.concurrent.TimeUnit unit)
The base amount of time to start doubling from when backing off.Backoff
build()
Create a Backoff instanceBackoff.Builder
maxBackoff(int backoff, java.util.concurrent.TimeUnit unit)
The max time between retriesBackoff.Builder
maxRetries(int maxRetries)
Define max of retries
-
-
-
Method Detail
-
maxBackoff
public Backoff.Builder maxBackoff(int backoff, java.util.concurrent.TimeUnit unit)
The max time between retries- Parameters:
backoff
- backoff time valueunit
- time to be used, e.g. SECONDS- Returns:
- Builder instance
-
backoffFactor
public Backoff.Builder backoffFactor(int backoffFactor, java.util.concurrent.TimeUnit unit)
The base amount of time to start doubling from when backing off.- Parameters:
backoffFactor
- backoff time value, to be doubledunit
- time to be used, e.g. SECONDS- Returns:
- Builder instance
-
maxRetries
public Backoff.Builder maxRetries(int maxRetries)
Define max of retries- Parameters:
maxRetries
- max retries- Returns:
- Builder instance
-
build
public Backoff build()
Create a Backoff instance- Returns:
- a new instance
-
-