Interface AdaptiveRetryStrategy

All Superinterfaces:
RetryStrategy
All Known Implementing Classes:
DefaultAdaptiveRetryStrategy

@ThreadSafe public interface AdaptiveRetryStrategy extends RetryStrategy
The adaptive retry strategy is a RetryStrategy when executing against a very resource-constrained set of resources.

Unlike StandardRetryStrategy, care should be taken when using this strategy. Specifically, it should be used:

  1. When the availability of downstream resources are mostly affected by callers that are also using the AdaptiveRetryStrategy.
  2. The scope (either the whole strategy or the AcquireInitialTokenRequest.scope()) of the strategy is constrained to target "resource", so that availability issues in one resource cannot delay other, unrelated resource's availability.

The adaptive retry strategy by default:

  1. Retries on the conditions configured in the AdaptiveRetryStrategy.Builder.
  2. Retries 2 times (3 total attempts). Adjust with RetryStrategy.Builder.maxAttempts(int)
  3. Uses a dynamic backoff delay based on load currently perceived against the downstream resource
  4. Circuit breaking (disabling retries) in the event of high downstream failures within an individual scope. Circuit breaking may prevent a first attempt in outage scenarios to protect the downstream service.
See Also: