Class Retries.Builder

  • Enclosing class:
    Retries

    public static final class Retries.Builder
    extends java.lang.Object
    • Method Detail

      • action

        public Retries.Builder action​(java.util.concurrent.Callable<java.net.http.HttpResponse<java.io.InputStream>> action)
        Sets the HTTP callback to be retried.
        Parameters:
        action - The function called on retry.
        Returns:
        The builder instance.
      • retryConfig

        public Retries.Builder retryConfig​(RetryConfig retryConfig)
        Defines the retry configuration.
        Parameters:
        retryConfig - The retry configuration to use.
        Returns:
        The builder instance.
      • statusCodes

        public Retries.Builder statusCodes​(java.util.List<java.lang.String> statusCodes)
        Defines the status codes that should be considered as errors.
        Parameters:
        statusCodes - The list of status codes to treat as errors.
        Returns:
        The builder instance.