Package org.jeasy.batch.core.writer
Class CollectionRecordWriter<P>
- java.lang.Object
-
- org.jeasy.batch.core.writer.CollectionRecordWriter<P>
-
- Type Parameters:
P
- type of the record's payload
- All Implemented Interfaces:
RecordWriter<P>
public class CollectionRecordWriter<P> extends java.lang.Object implements RecordWriter<P>
Record writer that writes records to aCollection
.- Author:
- Mahmoud Ben Hassine ([email protected])
-
-
Constructor Summary
Constructors Constructor Description CollectionRecordWriter(java.util.Collection<P> collection)
Create a newCollectionRecordWriter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
writeRecords(Batch<P> batch)
Write a batch of records to a data sink.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jeasy.batch.core.writer.RecordWriter
close, open
-
-
-
-
Constructor Detail
-
CollectionRecordWriter
public CollectionRecordWriter(java.util.Collection<P> collection)
Create a newCollectionRecordWriter
.- Parameters:
collection
- the collection to write records to
-
-
Method Detail
-
writeRecords
public void writeRecords(Batch<P> batch)
Description copied from interface:RecordWriter
Write a batch of records to a data sink.- Specified by:
writeRecords
in interfaceRecordWriter<P>
- Parameters:
batch
- of records to write.
-
-