/** * Return a context that can respond to early termination requests, but does * nothing else. * * @see org.springframework.retry.RetryPolicy#open(RetryContext) */ public RetryContext open(RetryContext parent) { return new NeverRetryContext(parent); }
/** * Returns false after the first exception. So there is always one try, and * then the retry is prevented. * * @see org.springframework.retry.RetryPolicy#canRetry(org.springframework.retry.RetryContext) */ public boolean canRetry(RetryContext context) { return !((NeverRetryContext) context).isFinished(); }
/** * Make the throwable available for downstream use through the context. * @see org.springframework.retry.RetryPolicy#registerThrowable(org.springframework.retry.RetryContext, * Throwable) */ public void registerThrowable(RetryContext context, Throwable throwable) { ((NeverRetryContext) context).setFinished(); ((RetryContextSupport) context).registerThrowable(throwable); }
/** * Return a context that can respond to early termination requests, but does * nothing else. * * @see org.springframework.retry.RetryPolicy#open(RetryContext) */ public RetryContext open(RetryContext parent) { return new NeverRetryContext(parent); }
/** * Make the throwable available for downstream use through the context. * @see org.springframework.retry.RetryPolicy#registerThrowable(org.springframework.retry.RetryContext, * Throwable) */ public void registerThrowable(RetryContext context, Throwable throwable) { ((NeverRetryContext) context).setFinished(); ((RetryContextSupport) context).registerThrowable(throwable); }
/** * Returns false after the first exception. So there is always one try, and * then the retry is prevented. * * @see org.springframework.retry.RetryPolicy#canRetry(org.springframework.retry.RetryContext) */ public boolean canRetry(RetryContext context) { return !((NeverRetryContext) context).isFinished(); }