|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.retry.policy.ExceptionClassifierRetryPolicy
public class ExceptionClassifierRetryPolicy
A RetryPolicy that dynamically adapts to one of a set of injected
policies according to the value of the latest exception.
| Constructor Summary | |
|---|---|
ExceptionClassifierRetryPolicy()
|
|
| Method Summary | |
|---|---|
boolean |
canRetry(RetryContext context)
Delegate to the policy currently activated in the context. |
void |
close(RetryContext context)
Delegate to the policy currently activated in the context. |
RetryContext |
open(RetryContext parent)
Create an active context that proxies a retry policy by chosing a target from the policy map. |
void |
registerThrowable(RetryContext context,
java.lang.Exception throwable)
Delegate to the policy currently activated in the context. |
void |
setExceptionClassifier(Classifier<java.lang.Throwable,RetryPolicy> exceptionClassifier)
Setter for an exception classifier. |
void |
setPolicyMap(java.util.Map<java.lang.Class<? extends java.lang.Throwable>,RetryPolicy> policyMap)
Setter for policy map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExceptionClassifierRetryPolicy()
| Method Detail |
|---|
public void setPolicyMap(java.util.Map<java.lang.Class<? extends java.lang.Throwable>,RetryPolicy> policyMap)
policyMap - a map of String to RetryPolicy that will be used
to create a Classifier to locate a policy.public void setExceptionClassifier(Classifier<java.lang.Throwable,RetryPolicy> exceptionClassifier)
exceptionClassifier - ExceptionClassifier to usepublic boolean canRetry(RetryContext context)
canRetry in interface RetryPolicycontext - the current retry status
RetryPolicy.canRetry(org.springframework.batch.retry.RetryContext)public void close(RetryContext context)
close in interface RetryPolicycontext - a retry status created by the
RetryPolicy.open(RetryContext) method of this manager.RetryPolicy.close(org.springframework.batch.retry.RetryContext)public RetryContext open(RetryContext parent)
open in interface RetryPolicyparent - the parent context if we are in a nested retry.
RetryContext object specific to this manager.RetryPolicy.open(RetryContext)
public void registerThrowable(RetryContext context,
java.lang.Exception throwable)
registerThrowable in interface RetryPolicycontext - the current status object.RetryPolicy.registerThrowable(org.springframework.batch.retry.RetryContext,
Exception)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||