Example usage for org.springframework.batch.core.step.item Chunk Chunk

List of usage examples for org.springframework.batch.core.step.item Chunk Chunk

Introduction

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

Prototype

public Chunk(Collection<? extends W> items, List<SkipWrapper<W>> skips) 

Source Link

Usage

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

@Override
protected Chunk<O> getAdjustedOutputs(Chunk<I> inputs, Chunk<O> outputs) {

    @SuppressWarnings("unchecked")
    UserData<O> data = (UserData<O>) inputs.getUserData();
    Chunk<O> previous = data.getOutputs();

    Chunk<O> next = new Chunk<O>(outputs.getItems(), previous.getSkips());
    next.setBusy(previous.isBusy());/*from   w  w  w.  j  a v  a2  s.  c  o m*/

    // Remember for next time if there are skips accumulating
    data.setOutputs(next);

    return next;

}