Class AlwaysSkipItemSkipPolicy
- java.lang.Object
- org.springframework.batch.core.step.skip.AlwaysSkipItemSkipPolicy
- All Implemented Interfaces:
SkipPolicy
public class AlwaysSkipItemSkipPolicy extends java.lang.Object implements SkipPolicy
Implementation of theSkipPolicy
interface that will always return that an item should be skipped.- Author:
- Ben Hale, Lucas Ward
Constructor Summary
Constructors Constructor Description AlwaysSkipItemSkipPolicy()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shouldSkip(java.lang.Throwable t, int skipCount)
Returns true or false, indicating whether or not processing should continue with the given throwable.
Method Detail
shouldSkip
public boolean shouldSkip(java.lang.Throwable t, int skipCount)
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.