Example usage for org.springframework.batch.core.step.skip LimitCheckingItemSkipPolicy LimitCheckingItemSkipPolicy

List of usage examples for org.springframework.batch.core.step.skip LimitCheckingItemSkipPolicy LimitCheckingItemSkipPolicy

Introduction

In this page you can find the example usage for org.springframework.batch.core.step.skip LimitCheckingItemSkipPolicy LimitCheckingItemSkipPolicy.

Prototype

public LimitCheckingItemSkipPolicy(int skipLimit, Classifier<Throwable, Boolean> skippableExceptionClassifier) 

Source Link

Usage

From source file:org.springframework.batch.core.step.item.FaultTolerantStepFactoryBeanTests.java

/**
 * Check items causing errors are skipped as expected.
 *//*from  w w w  . j  a  v a2s  . c  om*/
@Test
public void testReadSkipWithPolicy() throws Exception {
    // Should be ignored
    factory.setSkipLimit(0);
    factory.setSkipPolicy(new LimitCheckingItemSkipPolicy(2,
            Collections.<Class<? extends Throwable>, Boolean>singletonMap(Exception.class, true)));
    testReadSkip();
}