/** * Sleep for a back off time as supplied by the backoff policy, and increases the attempts */ public void sleepUntilNextRetry() throws InterruptedException { int attempts = getAttemptTimes(); long sleepTime = getBackoffTime(); LOG.trace("Sleeping {} ms before retry #{}...", sleepTime, attempts); retryConfig.getTimeUnit().sleep(sleepTime); useRetry(); }
/** * Sleep for a back off time as supplied by the backoff policy, and increases the attempts * @throws InterruptedException */ public void sleepUntilNextRetry() throws InterruptedException { int attempts = getAttemptTimes(); long sleepTime = retryConfig.backoffPolicy.getBackoffTime(retryConfig, attempts); if (LOG.isTraceEnabled()) { LOG.trace("Sleeping " + sleepTime + "ms before retry #" + attempts + "..."); } retryConfig.getTimeUnit().sleep(sleepTime); useRetry(); }
/** * Sleep for a back off time as supplied by the backoff policy, and increases the attempts * @throws InterruptedException */ public void sleepUntilNextRetry() throws InterruptedException { int attempts = getAttemptTimes(); long sleepTime = getBackoffTime(); LOG.trace("Sleeping {} ms before retry #{}...", sleepTime, attempts); retryConfig.getTimeUnit().sleep(sleepTime); useRetry(); }
/** * Sleep for a back off time as supplied by the backoff policy, and increases the attempts * @throws InterruptedException */ public void sleepUntilNextRetry() throws InterruptedException { int attempts = getAttemptTimes(); long sleepTime = retryConfig.backoffPolicy.getBackoffTime(retryConfig, attempts); if (LOG.isTraceEnabled()) { LOG.trace("Sleeping " + sleepTime + "ms before retry #" + attempts + "..."); } retryConfig.getTimeUnit().sleep(sleepTime); useRetry(); }