Package org.jeasy.batch.core.writer
Interface RecordWriter<P>
-
- Type Parameters:
P- type of the record's payload
- All Known Implementing Classes:
BlockingQueueRecordWriter,CollectionRecordWriter,CompositeRecordWriter,FileRecordWriter,RetryableRecordWriter,StandardErrorRecordWriter,StandardOutputRecordWriter,StringRecordWriter
public interface RecordWriter<P>Interface for all record writers.- 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 writerdefault voidopen()Open the writer.voidwriteRecords(Batch<P> batch)Write a batch of records to a data sink.
-
-
-
Method Detail
-
open
default void open() throws java.lang.ExceptionOpen the writer.- Throws:
java.lang.Exception- if an error occurs during opening the writer
-
writeRecords
void writeRecords(Batch<P> batch) throws java.lang.Exception
Write a batch of records to a data sink.- Parameters:
batch- of records to write.- Throws:
java.lang.Exception- if an error occurs during record writing
-
close
default void close() throws java.lang.ExceptionClose the writer- Throws:
java.lang.Exception- if an error occurs during closing the writer
-
-