public static interface LegacyRetryStrategy.Builder extends RetryStrategy.Builder<LegacyRetryStrategy.Builder,LegacyRetryStrategy>
| Modifier and Type | Method and Description |
|---|---|
LegacyRetryStrategy |
build()
Build a new
RetryStrategy with the current configuration on this builder. |
LegacyRetryStrategy.Builder |
circuitBreakerEnabled(Boolean circuitBreakerEnabled)
Whether circuit breaking is enabled for this strategy.
|
LegacyRetryStrategy.Builder |
throttlingBackoffStrategy(BackoffStrategy throttlingBackoffStrategy)
Configure the backoff strategy used for throttling exceptions by this strategy.
|
LegacyRetryStrategy.Builder |
treatAsThrottling(Predicate<Throwable> treatAsThrottling)
Configure the predicate to allow the strategy categorize a Throwable as throttling exception.
|
backoffStrategy, maxAttempts, retryOnException, retryOnException, retryOnExceptionInstanceOf, retryOnExceptionOrCause, retryOnExceptionOrCauseInstanceOf, retryOnRootCause, retryOnRootCauseInstanceOf, useClientDefaultsapplyMutationLegacyRetryStrategy.Builder throttlingBackoffStrategy(BackoffStrategy throttlingBackoffStrategy)
By default, this uses jittered exponential backoff.
throttlingBackoffStrategy in interface RetryStrategy.Builder<LegacyRetryStrategy.Builder,LegacyRetryStrategy>LegacyRetryStrategy.Builder circuitBreakerEnabled(Boolean circuitBreakerEnabled)
The circuit breaker will prevent attempts (even below the RetryStrategy.Builder.maxAttempts(int)) if a large number of
failures are observed by this executor.
Note: The circuit breaker scope is local to the created RetryStrategy,
and will therefore not be effective unless the RetryStrategy is used for more than one call. It's recommended
that a RetryStrategy be reused for all calls to a single unreliable resource. It's also recommended that
separate RetryStrategys be used for calls to unrelated resources.
By default, this is true.
LegacyRetryStrategy.Builder treatAsThrottling(Predicate<Throwable> treatAsThrottling)
treatAsThrottling in interface RetryStrategy.Builder<LegacyRetryStrategy.Builder,LegacyRetryStrategy>LegacyRetryStrategy build()
RetryStrategy.BuilderRetryStrategy with the current configuration on this builder.build in interface Buildablebuild in interface RetryStrategy.Builder<LegacyRetryStrategy.Builder,LegacyRetryStrategy>build in interface SdkBuilder<LegacyRetryStrategy.Builder,LegacyRetryStrategy>Copyright © 2026. All rights reserved.