Interface HttpRetryPolicy.Builder

    • Method Detail

      • httpRetryEvents

        HttpRetryPolicy.Builder httpRetryEvents​(Collection<String> httpRetryEvents)

        Specify at least one of the following values.

        • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

        • gateway-error – HTTP status codes 502, 503, and 504

        • client-error – HTTP status code 409

        • stream-error – Retry on refused stream

        Parameters:
        httpRetryEvents - Specify at least one of the following values.

        • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

        • gateway-error – HTTP status codes 502, 503, and 504

        • client-error – HTTP status code 409

        • stream-error – Retry on refused stream

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • httpRetryEvents

        HttpRetryPolicy.Builder httpRetryEvents​(String... httpRetryEvents)

        Specify at least one of the following values.

        • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

        • gateway-error – HTTP status codes 502, 503, and 504

        • client-error – HTTP status code 409

        • stream-error – Retry on refused stream

        Parameters:
        httpRetryEvents - Specify at least one of the following values.

        • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

        • gateway-error – HTTP status codes 502, 503, and 504

        • client-error – HTTP status code 409

        • stream-error – Retry on refused stream

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • maxRetries

        HttpRetryPolicy.Builder maxRetries​(Long maxRetries)

        The maximum number of retry attempts.

        Parameters:
        maxRetries - The maximum number of retry attempts.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • perRetryTimeout

        HttpRetryPolicy.Builder perRetryTimeout​(Duration perRetryTimeout)

        The timeout for each retry attempt.

        Parameters:
        perRetryTimeout - The timeout for each retry attempt.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tcpRetryEventsWithStrings

        HttpRetryPolicy.Builder tcpRetryEventsWithStrings​(Collection<String> tcpRetryEvents)

        Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.

        Parameters:
        tcpRetryEvents - Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tcpRetryEventsWithStrings

        HttpRetryPolicy.Builder tcpRetryEventsWithStrings​(String... tcpRetryEvents)

        Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.

        Parameters:
        tcpRetryEvents - Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tcpRetryEvents

        HttpRetryPolicy.Builder tcpRetryEvents​(Collection<TcpRetryPolicyEvent> tcpRetryEvents)

        Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.

        Parameters:
        tcpRetryEvents - Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tcpRetryEvents

        HttpRetryPolicy.Builder tcpRetryEvents​(TcpRetryPolicyEvent... tcpRetryEvents)

        Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.

        Parameters:
        tcpRetryEvents - Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
        Returns:
        Returns a reference to this object so that method calls can be chained together.