public class ProducerRecords
extends java.lang.Object
ProducerRecords is the parameter type used in
Channel.produce(ProducerRecords). They consists of a List of
ProducerRecords.ProducerRecord objects each one mainly containing a data pair: the payload data and the target topic. It also
contains other optional attributes. In order to easily create instances of ProducerRecords.ProducerRecord, it implements the
builder pattern (see ProducerRecords.ProducerRecord.Builder).
The sole goal of ProducerRecords.ProducerRecord is to easily build the equivalent JSON objects required by the RESTful
produce interface.
| Modifier and Type | Class and Description |
|---|---|
static class |
ProducerRecords.ProducerRecord
Helper class containing all attributes and inner classes of a produce record.
|
| Constructor and Description |
|---|
ProducerRecords() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ProducerRecords.ProducerRecord producerRecord)
Add a
ProducerRecords.ProducerRecord object to the ProducerRecords internal list |
java.util.List<ProducerRecords.ProducerRecord> |
getRecords()
Get the
List of ProducerRecords.ProducerRecord |
public java.util.List<ProducerRecords.ProducerRecord> getRecords()
List of ProducerRecords.ProducerRecordList of ProducerRecords.ProducerRecordpublic void add(ProducerRecords.ProducerRecord producerRecord)
ProducerRecords.ProducerRecord object to the ProducerRecords internal listproducerRecord - the ProducerRecords.ProducerRecord to add