Class DefaultServiceUnavailableRetryStrategy

    • Constructor Detail

      • DefaultServiceUnavailableRetryStrategy

        public DefaultServiceUnavailableRetryStrategy​(int maxRetries,
                                                      int retryInterval)
      • DefaultServiceUnavailableRetryStrategy

        public DefaultServiceUnavailableRetryStrategy()
    • Method Detail

      • retryRequest

        public boolean retryRequest​(HttpResponse response,
                                    int executionCount,
                                    HttpContext context)
        Description copied from interface: ServiceUnavailableRetryStrategy
        Determines if a method should be retried given the response from the target server.
        Specified by:
        retryRequest in interface ServiceUnavailableRetryStrategy
        Parameters:
        response - the response from the target server
        executionCount - the number of times this method has been unsuccessfully executed
        context - the context for the request execution
        Returns:
        true if the method should be retried, false otherwise