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 ([email protected])
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
Close the reader.default void
open()
Open the reader.Record<P>
readRecord()
Read next record from the data source.
-
-
-
Method Detail
-
open
default void open() throws java.lang.Exception
Open 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
null
if 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.Exception
Close the reader.- Throws:
java.lang.Exception
- if an error occurs during reader closing
-
-