Summer.Batch.Infrastructure.Item.IItemReader< out out T > Interface Template Reference

Strategy interface for providing the data. Implementations are expected to be stateful and will be called multiple times for each batch, with each call to Read() returning a different value and finally returning null when all input data is exhausted. Implementations need not be thread-safe and clients of a IItemReader need to be aware that this is the case. A richer interface (e.g. with a look ahead or peek) is not feasible because we need to support transactions in an asynchronous batch. More...

Public Member Functions

Read ()
 Reads a piece of input data and advance to the next one. Implementations must return null at the end of the input data set. In a transactional setting, caller might get the same item twice from successive calls (or otherwise), if the first call was in a transaction that rolled back. More...
 

Detailed Description

Strategy interface for providing the data. Implementations are expected to be stateful and will be called multiple times for each batch, with each call to Read() returning a different value and finally returning null when all input data is exhausted. Implementations need not be thread-safe and clients of a IItemReader need to be aware that this is the case. A richer interface (e.g. with a look ahead or peek) is not feasible because we need to support transactions in an asynchronous batch.

Template Parameters
T The type of the read items. Must be nullable.
Type Constraints
T :class 

Member Function Documentation

Reads a piece of input data and advance to the next one. Implementations must return null at the end of the input data set. In a transactional setting, caller might get the same item twice from successive calls (or otherwise), if the first call was in a transaction that rolled back.

Returns
Exceptions
Exception 
UnexpectedInputException 
NonTransientResourceException 
ParseException 

The documentation for this interface was generated from the following file:
  • Summer.Batch.Infrastructure/Item/IItemReader.cs