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

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

Introduction

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

Prototype

public void setUserData(Object userData) 

Source Link

Usage

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

@Override
protected void initializeUserData(Chunk<I> inputs) {
    @SuppressWarnings("unchecked")
    UserData<O> data = (UserData<O>) inputs.getUserData();
    if (data == null) {
        data = new UserData<O>();
        inputs.setUserData(data);
        data.setOutputs(new Chunk<O>());
    }/*from w ww .j  av  a 2 s .c om*/
}