Class CompositeSkipPolicy
- java.lang.Object
- org.springframework.batch.core.step.skip.CompositeSkipPolicy
- All Implemented Interfaces:
SkipPolicy
public class CompositeSkipPolicy extends java.lang.Object implements SkipPolicy
- Author:
- Dave Syer
Constructor Summary
Constructors Constructor Description CompositeSkipPolicy()
CompositeSkipPolicy(SkipPolicy[] skipPolicies)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setSkipPolicies(SkipPolicy[] skipPolicies)
boolean
shouldSkip(java.lang.Throwable t, int skipCount)
Returns true or false, indicating whether or not processing should continue with the given throwable.
Constructor Detail
CompositeSkipPolicy
public CompositeSkipPolicy()
CompositeSkipPolicy
public CompositeSkipPolicy(SkipPolicy[] skipPolicies)
Method Detail
setSkipPolicies
public void setSkipPolicies(SkipPolicy[] skipPolicies)
shouldSkip
public boolean shouldSkip(java.lang.Throwable t, int skipCount) throws SkipLimitExceededException
Description copied from interface:SkipPolicy
Returns true or false, indicating whether or not processing should continue with the given throwable. Clients may useskipCount<0
to probe for exception types that are skippable, so implementations should be able to handle gracefully the case whereskipCount<0
. Implementations should avoid throwing any undeclared exceptions.- Specified by:
shouldSkip
in interfaceSkipPolicy
- Parameters:
t
- exception encountered while processingskipCount
- currently running count of skips- Returns:
- true if processing should continue, false otherwise.
- Throws:
SkipLimitExceededException
- if a limit is breached