Class RetryPolicy.RetryPolicyBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.common.export.RetryPolicy.RetryPolicyBuilder
-
- Direct Known Subclasses:
AutoValue_RetryPolicy.Builder
- Enclosing class:
- RetryPolicy
public abstract static class RetryPolicy.RetryPolicyBuilder extends java.lang.Object
Builder forRetryPolicy
.
-
-
Constructor Summary
Constructors Constructor Description RetryPolicyBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract RetryPolicy
autoBuild()
RetryPolicy
build()
Build and return aRetryPolicy
with the values of this builder.abstract RetryPolicy.RetryPolicyBuilder
setBackoffMultiplier(double backoffMultiplier)
Set the backoff multiplier.abstract RetryPolicy.RetryPolicyBuilder
setInitialBackoff(java.time.Duration initialBackoff)
Set the initial backoff.abstract RetryPolicy.RetryPolicyBuilder
setMaxAttempts(int maxAttempts)
Set the maximum number of attempts, including the original request.abstract RetryPolicy.RetryPolicyBuilder
setMaxBackoff(java.time.Duration maxBackoff)
Set the maximum backoff.
-
-
-
Method Detail
-
setMaxAttempts
public abstract RetryPolicy.RetryPolicyBuilder setMaxAttempts(int maxAttempts)
Set the maximum number of attempts, including the original request. Must be greater than 1 and less than 6. Defaults to 5.
-
setInitialBackoff
public abstract RetryPolicy.RetryPolicyBuilder setInitialBackoff(java.time.Duration initialBackoff)
Set the initial backoff. Must be greater than 0. Defaults to 1 seconds.
-
setMaxBackoff
public abstract RetryPolicy.RetryPolicyBuilder setMaxBackoff(java.time.Duration maxBackoff)
Set the maximum backoff. Must be greater than 0. Defaults to 5 seconds.
-
setBackoffMultiplier
public abstract RetryPolicy.RetryPolicyBuilder setBackoffMultiplier(double backoffMultiplier)
Set the backoff multiplier. Must be greater than 0.0. Defaults to 1.5.
-
autoBuild
abstract RetryPolicy autoBuild()
-
build
public RetryPolicy build()
Build and return aRetryPolicy
with the values of this builder.
-
-