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 ([email protected])
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
Close the writerdefault void
open()
Open the writer.void
writeRecords(Batch<P> batch)
Write a batch of records to a data sink.
-
-
-
Method Detail
-
open
default void open() throws java.lang.Exception
Open 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.Exception
Close the writer- Throws:
java.lang.Exception
- if an error occurs during closing the writer
-
-