类 ExceptionClassifierSkipPolicy
- java.lang.Object
- org.springframework.batch.core.step.skip.ExceptionClassifierSkipPolicy
- 所有已实现的接口:
SkipPolicy
public class ExceptionClassifierSkipPolicy extends java.lang.Object implements SkipPolicy
ASkipPolicy
that depends on an exception classifier to make its decision, and then delegates to the classifier result.- 作者:
- Dave Syer
- 另请参阅:
SubclassClassifier
构造器概要
构造器 构造器 说明 ExceptionClassifierSkipPolicy()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
setExceptionClassifier(org.springframework.classify.SubclassClassifier<java.lang.Throwable,SkipPolicy> classifier)
The classifier that will be used to choose a delegate policy.void
setPolicyMap(java.util.Map<java.lang.Class<? extends java.lang.Throwable>,SkipPolicy> policyMap)
Setter for policy map.boolean
shouldSkip(java.lang.Throwable t, int skipCount)
Consult the classifier and find a delegate policy, and then use that to determine the outcome.
构造器详细资料
ExceptionClassifierSkipPolicy
public ExceptionClassifierSkipPolicy()
方法详细资料
setExceptionClassifier
public void setExceptionClassifier(org.springframework.classify.SubclassClassifier<java.lang.Throwable,SkipPolicy> classifier)
The classifier that will be used to choose a delegate policy.- 参数:
classifier
- the classifier to use to choose a delegate policy
setPolicyMap
public void setPolicyMap(java.util.Map<java.lang.Class<? extends java.lang.Throwable>,SkipPolicy> policyMap)
Setter for policy map. This property should not be changed dynamically - set it once, e.g. in configuration, and then don't change it during a running application. Either this property or the exception classifier directly should be set, but not both.- 参数:
policyMap
- a map of String toSkipPolicy
that will be used to create aClassifier
to locate a policy.
shouldSkip
public boolean shouldSkip(java.lang.Throwable t, int skipCount) throws SkipLimitExceededException
Consult the classifier and find a delegate policy, and then use that to determine the outcome.- 指定者:
shouldSkip
在接口中SkipPolicy
- 参数:
t
- the throwable to considerskipCount
- the current skip count- 返回:
- true if the exception can be skipped
- 抛出:
SkipLimitExceededException
- if a limit is exceeded