processRetryInfo(); return CallReturn.RETRY;
/** * It first processes the wait time, if there is any, * and then invokes {@link #processRetryInfo()}. * * If the wait time is positive, it either sleeps for synchronous calls * or immediately returns for asynchronous calls. * * @return {@link CallReturn#RETRY} if the retryInfo is processed; * otherwise, return {@link CallReturn#WAIT_RETRY}. */ CallReturn processWaitTimeAndRetryInfo() throws InterruptedIOException { final Long waitTime = getWaitTime(Time.monotonicNow()); LOG.trace("#{} processRetryInfo: retryInfo={}, waitTime={}", callId, retryInfo, waitTime); if (waitTime != null && waitTime > 0) { try { Thread.sleep(retryInfo.delay); } catch (InterruptedException e) { Thread.currentThread().interrupt(); LOG.warn("Interrupted while waiting to retry", e); InterruptedIOException intIOE = new InterruptedIOException( "Retry interrupted"); intIOE.initCause(e); throw intIOE; } } processRetryInfo(); return CallReturn.RETRY; }