Interface RetryCondition

    • Method Detail

      • shouldRetry

        boolean shouldRetry​(RetryPolicyContext context)
        Determine whether a request should or should not be retried.
        Parameters:
        context - Context about the state of the last request and information about the number of requests made.
        Returns:
        True if the request should be retried, false if not.
      • requestWillNotBeRetried

        default void requestWillNotBeRetried​(RetryPolicyContext context)
        Called by the SDK to notify this condition that the provided request will not be retried, because some retry condition determined that it shouldn't be retried.
      • requestSucceeded

        default void requestSucceeded​(RetryPolicyContext context)
        Called by the SDK to notify this condition that the provided request succeeded. This method is invoked even if the execution never failed before (RetryPolicyContext.retriesAttempted() is zero).
      • defaultRetryCondition

        static RetryCondition defaultRetryCondition()
      • none

        static RetryCondition none()
        A retry condition that will NEVER allow retries.