|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.step.skip.ExceptionClassifierSkipPolicy
public class ExceptionClassifierSkipPolicy
A SkipPolicy
that depends on an exception classifier to make its
decision, and then delegates to the classifier result.
SubclassClassifier
Constructor Summary | |
---|---|
ExceptionClassifierSkipPolicy()
|
Method Summary | |
---|---|
void |
setExceptionClassifier(SubclassClassifier<Throwable,SkipPolicy> classifier)
The classifier that will be used to choose a delegate policy. |
void |
setPolicyMap(Map<Class<? extends Throwable>,SkipPolicy> policyMap)
Setter for policy map. |
boolean |
shouldSkip(Throwable t,
int skipCount)
Consult the classifier and find a delegate policy, and then use that to determine the outcome. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExceptionClassifierSkipPolicy()
Method Detail |
---|
public void setExceptionClassifier(SubclassClassifier<Throwable,SkipPolicy> classifier)
classifier
- the classifier to use to choose a delegate policypublic void setPolicyMap(Map<Class<? extends Throwable>,SkipPolicy> policyMap)
policyMap
- a map of String to SkipPolicy
that will be used
to create a Classifier
to locate a policy.public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException
shouldSkip
in interface SkipPolicy
t
- the throwable to considerskipCount
- the current skip count
SkipLimitExceededException
- if a limit is exceeded
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |