Package org.jeasy.batch.core.reader
Interface RecordReader<P>
-
- Type Parameters:
P- type of the record's payload
- All Known Implementing Classes:
AbstractFileRecordReader,AbstractMultiFileRecordReader,BlockingQueueRecordReader,FileRecordReader,IterableRecordReader,RetryableRecordReader,StandardInputRecordReader,StreamRecordReader,StringRecordReader
public interface RecordReader<P>Interface for record reader. This will be used to read records sequentially from a data source.- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Close the reader.default voidopen()Open the reader.Record<P>readRecord()Read next record from the data source.
-
-
-
Method Detail
-
open
default void open() throws java.lang.ExceptionOpen the reader.- Throws:
java.lang.Exception- if an error occurs during reader opening
-
readRecord
Record<P> readRecord() throws java.lang.Exception
Read next record from the data source.- Returns:
- the next record from the data source or
nullif the end of the data source is reached - Throws:
java.lang.Exception- if an error occurs during reading next record
-
close
default void close() throws java.lang.ExceptionClose the reader.- Throws:
java.lang.Exception- if an error occurs during reader closing
-
-