/** * Clear the current context at the end of a batch - should only be used by * {@link RetryOperations} implementations. * * @return the old value if there was one. */ public static RetryContext clear() { RetryContext value = getContext(); RetryContext parent = value == null ? null : value.getParent(); RetrySynchronizationManager.context.set(parent); return value; }
public void close(RetryContext context) { // Only close those policies that have been used (opened): for (RetryPolicy policy : contexts.keySet()) { policy.close(getContext(policy, context.getParent())); } }
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); }
/** * Clear the current context at the end of a batch - should only be used by * {@link RetryOperations} implementations. * * @return the old value if there was one. */ public static RetryContext clear() { RetryContext value = getContext(); RetryContext parent = value == null ? null : value.getParent(); RetrySynchronizationManager.context.set(parent); return value; }
public void close(RetryContext context) { // Only close those policies that have been used (opened): for (RetryPolicy policy : contexts.keySet()) { policy.close(getContext(policy, context.getParent())); } }
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); }