public void intercept(FastFailInterceptorContext context) throws PreemptiveFastFailException { context.setFailureInfo(repeatedFailuresMap.get(context.getServer())); if (inFastFailMode(context.getServer()) && !currentThreadInFastFailMode()) { // In Fast-fail mode, all but one thread will fast fail. Check // if we are that one chosen thread. context.setRetryDespiteFastFailMode(shouldRetryInspiteOfFastFail(context .getFailureInfo())); if (!context.isRetryDespiteFastFailMode()) { // we don't have to retry LOG.debug("Throwing PFFE : " + context.getFailureInfo() + " tries : " + context.getTries()); throw new PreemptiveFastFailException( context.getFailureInfo().numConsecutiveFailures.get(), context.getFailureInfo().timeOfFirstFailureMilliSec, context.getFailureInfo().timeOfLatestAttemptMilliSec, context.getServer(), context.getGuaranteedClientSideOnly().isTrue()); } } context.setDidTry(true); }
public void intercept(FastFailInterceptorContext context) throws PreemptiveFastFailException { context.setFailureInfo(repeatedFailuresMap.get(context.getServer())); if (inFastFailMode(context.getServer()) && !currentThreadInFastFailMode()) { // In Fast-fail mode, all but one thread will fast fail. Check // if we are that one chosen thread. context.setRetryDespiteFastFailMode(shouldRetryInspiteOfFastFail(context .getFailureInfo())); if (!context.isRetryDespiteFastFailMode()) { // we don't have to retry LOG.debug("Throwing PFFE : " + context.getFailureInfo() + " tries : " + context.getTries()); throw new PreemptiveFastFailException( context.getFailureInfo().numConsecutiveFailures.get(), context.getFailureInfo().timeOfFirstFailureMilliSec, context.getFailureInfo().timeOfLatestAttemptMilliSec, context.getServer(), context.getGuaranteedClientSideOnly().isTrue()); } } context.setDidTry(true); }
public void intercept(FastFailInterceptorContext context) throws PreemptiveFastFailException { context.setFailureInfo(repeatedFailuresMap.get(context.getServer())); if (inFastFailMode(context.getServer()) && !currentThreadInFastFailMode()) { // In Fast-fail mode, all but one thread will fast fail. Check // if we are that one chosen thread. context.setRetryDespiteFastFailMode(shouldRetryInspiteOfFastFail(context .getFailureInfo())); if (!context.isRetryDespiteFastFailMode()) { // we don't have to retry LOG.debug("Throwing PFFE : " + context.getFailureInfo() + " tries : " + context.getTries()); throw new PreemptiveFastFailException( context.getFailureInfo().numConsecutiveFailures.get(), context.getFailureInfo().timeOfFirstFailureMilliSec, context.getFailureInfo().timeOfLatestAttemptMilliSec, context.getServer(), context.getGuaranteedClientSideOnly().isTrue()); } } context.setDidTry(true); }
public void intercept(FastFailInterceptorContext context) throws PreemptiveFastFailException { context.setFailureInfo(repeatedFailuresMap.get(context.getServer())); if (inFastFailMode(context.getServer()) && !currentThreadInFastFailMode()) { // In Fast-fail mode, all but one thread will fast fail. Check // if we are that one chosen thread. context.setRetryDespiteFastFailMode(shouldRetryInspiteOfFastFail(context .getFailureInfo())); if (!context.isRetryDespiteFastFailMode()) { // we don't have to retry LOG.debug("Throwing PFFE : " + context.getFailureInfo() + " tries : " + context.getTries()); throw new PreemptiveFastFailException( context.getFailureInfo().numConsecutiveFailures.get(), context.getFailureInfo().timeOfFirstFailureMilliSec, context.getFailureInfo().timeOfLatestAttemptMilliSec, context.getServer()); } } context.setDidTry(true); }