/** * Delegate to the policy currently activated in the context. * * @see org.springframework.retry.RetryPolicy#registerThrowable(org.springframework.retry.RetryContext, * Throwable) */ public void registerThrowable(RetryContext context, Throwable throwable) { RetryPolicy policy = (RetryPolicy) context; policy.registerThrowable(context, throwable); ((RetryContextSupport) context).registerThrowable(throwable); }
@Override public void registerThrowable(RetryContext context, Throwable throwable) { CircuitBreakerRetryContext circuit = (CircuitBreakerRetryContext) context; circuit.registerThrowable(throwable); this.delegate.registerThrowable(circuit.context, throwable); }
protected void registerThrowable(RetryPolicy retryPolicy, RetryState state, RetryContext context, Throwable e) { retryPolicy.registerThrowable(context, e); registerContext(context, state); }
/** * Delegate to the policies that were in operation when the context was * created. * * @see org.springframework.retry.RetryPolicy#close(org.springframework.retry.RetryContext) */ @Override public void registerThrowable(RetryContext context, Throwable throwable) { RetryContext[] contexts = ((CompositeRetryContext) context).contexts; RetryPolicy[] policies = ((CompositeRetryContext) context).policies; for (int i = 0; i < contexts.length; i++) { policies[i].registerThrowable(contexts[i], throwable); } ((RetryContextSupport) context).registerThrowable(throwable); }
public void registerThrowable(RetryContext context, Throwable throwable) { policy = exceptionClassifier.classify(throwable); Assert.notNull(policy, "Could not locate policy for exception=[" + throwable + "]."); this.context = getContext(policy, context.getParent()); policy.registerThrowable(this.context, throwable); }
/** * @param retryPolicy * @param ex * @return */ private SimpleRetryExceptionHandler getHandlerAfterRetry(RetryPolicy retryPolicy, RuntimeException ex, Collection<Class<? extends Throwable>> fatalExceptions) { // Always rethrow if the retry is exhausted SimpleRetryExceptionHandler handler = new SimpleRetryExceptionHandler(retryPolicy, new SimpleLimitExceptionHandler(0), fatalExceptions); // Simulate a failed retry... RetryContext retryContext = retryPolicy.open(null); retryPolicy.registerThrowable(retryContext, ex); handler.close(retryContext, null, ex); return handler; }
@Override public void registerThrowable(RetryContext context, Throwable throwable) { delegate.registerThrowable(context, throwable); } }
@Override public void registerThrowable(RetryContext context, Throwable throwable) { delegate.registerThrowable(context, throwable); } }
/** * {@inheritDoc} */ @Override public void registerThrowable(RetryContext context, Throwable throwable) { if (throwable instanceof ListenerExecutionFailedException) { delegate.registerThrowable(context, throwable.getCause()); } else { delegate.registerThrowable(context, throwable); } } }
/** * {@inheritDoc} */ @Override public void registerThrowable(RetryContext context, Throwable throwable) { if (throwable instanceof ListenerExecutionFailedException) { delegate.registerThrowable(context, throwable.getCause()); } else { delegate.registerThrowable(context, throwable); } } }
/** * Delegate to the policy currently activated in the context. * * @see org.springframework.retry.RetryPolicy#registerThrowable(org.springframework.retry.RetryContext, * Throwable) */ public void registerThrowable(RetryContext context, Throwable throwable) { RetryPolicy policy = (RetryPolicy) context; policy.registerThrowable(context, throwable); ((RetryContextSupport) context).registerThrowable(throwable); }
protected void registerThrowable(RetryPolicy retryPolicy, RetryState state, RetryContext context, Throwable e) { retryPolicy.registerThrowable(context, e); registerContext(context, state); }
@Override public void registerThrowable(RetryContext context, Throwable throwable) { CircuitBreakerRetryContext circuit = (CircuitBreakerRetryContext) context; circuit.registerThrowable(throwable); this.delegate.registerThrowable(circuit.context, throwable); }
/** * Delegate to the policies that were in operation when the context was * created. * * @see org.springframework.retry.RetryPolicy#close(org.springframework.retry.RetryContext) */ @Override public void registerThrowable(RetryContext context, Throwable throwable) { RetryContext[] contexts = ((CompositeRetryContext) context).contexts; RetryPolicy[] policies = ((CompositeRetryContext) context).policies; for (int i = 0; i < contexts.length; i++) { policies[i].registerThrowable(contexts[i], throwable); } ((RetryContextSupport) context).registerThrowable(throwable); }
public void registerThrowable(RetryContext context, Throwable throwable) { policy = exceptionClassifier.classify(throwable); Assert.notNull(policy, "Could not locate policy for exception=[" + throwable + "]."); this.context = getContext(policy, context.getParent()); policy.registerThrowable(this.context, throwable); }