Interface RetryStrategy

    • Method Detail

      • getMaxRetries

        int getMaxRetries()
        Get the maximum number of times to retry.
        Returns:
        The maximum number of times to retry.
      • shouldRetry

        default boolean shouldRetry​(HttpResponse response,
                                    java.lang.Throwable error,
                                    int retryAttempts)
        Determines any retry should be performed.
        Parameters:
        response - The HTTP response.
        error - The pipeline exception, if any.
        retryAttempts - The number of retry attempts so far made.
        Returns:
        True to retry, false to exit retry loop.
      • calculateRetryDelay

        org.threeten.bp.Duration calculateRetryDelay​(HttpResponse response,
                                                     java.lang.Throwable error,
                                                     int retryAttempts)
        Determines the delay duration that should be waited before retrying.
        Parameters:
        response - The HTTP response.
        error - The pipeline exception, if any.
        retryAttempts - The number of retry attempts so far made.
        Returns:
        The delay duration.