Class BestEffortRetryStrategy

    • Method Detail

      • shouldRetry

        public Optional<Duration> shouldRetry​(Request<? extends Response> request)
        Description copied from interface: RetryStrategy
        Checks if the given request should be retried and how long the retry delay should be.
        Specified by:
        shouldRetry in interface RetryStrategy
        Parameters:
        request - the request to be checked.
        Returns:
        If empty, no retry should be done. If a duration is returned it determines the retry delay.