private static class ExceptionClassifierRetryPolicy.ExceptionClassifierRetryContext extends RetryContextSupport implements RetryPolicy
| Modifier and Type | Field and Description |
|---|---|
private RetryContext |
context |
private java.util.Map<RetryPolicy,RetryContext> |
contexts |
private Classifier<java.lang.Throwable,RetryPolicy> |
exceptionClassifier |
private RetryPolicy |
policy |
| Constructor and Description |
|---|
ExceptionClassifierRetryContext(RetryContext parent,
Classifier<java.lang.Throwable,RetryPolicy> exceptionClassifier) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRetry(RetryContext context) |
void |
close(RetryContext context) |
private RetryContext |
getContext(RetryPolicy policy,
RetryContext parent) |
RetryContext |
open(RetryContext parent)
Acquire resources needed for the retry operation.
|
void |
registerThrowable(RetryContext context,
java.lang.Throwable throwable)
Called once per retry attempt, after the callback fails.
|
getLastThrowable, getParent, getRetryCount, isExhaustedOnly, registerThrowable, setExhaustedOnly, toStringattributeNames, copyAttributesFrom, equals, getAttribute, hasAttribute, hashCode, removeAttribute, setAttributeprivate final Classifier<java.lang.Throwable,RetryPolicy> exceptionClassifier
private RetryPolicy policy
private RetryContext context
private final java.util.Map<RetryPolicy,RetryContext> contexts
public ExceptionClassifierRetryContext(RetryContext parent, Classifier<java.lang.Throwable,RetryPolicy> exceptionClassifier)
public boolean canRetry(RetryContext context)
canRetry in interface RetryPolicycontext - the current retry statuspublic void close(RetryContext context)
close in interface RetryPolicycontext - a retry status created by the
RetryPolicy.open(RetryContext) method of this manager.public RetryContext open(RetryContext parent)
RetryPolicyopen in interface RetryPolicyparent - the parent context if we are in a nested retry.RetryContext object specific to this manager.public void registerThrowable(RetryContext context, java.lang.Throwable throwable)
RetryPolicyregisterThrowable in interface RetryPolicycontext - the current status object.private RetryContext getContext(RetryPolicy policy, RetryContext parent)