public static interface Record.Factory
ContentFactory
includes this factory.
Modifier and Type | Method and Description |
---|---|
Record.StructuredBuilder |
newDeltaRecordBuilder(MRecord metadata)
Returns a new structured record builder (i.e.
|
Record |
newRecord(Collection<String> fields)
Create a new record comprising the supplied field values.
|
Record |
newRecord(String... fields)
Create a new record comprising the supplied field values.
|
Record.Builder |
newRecordBuilder()
Returns a new record builder.
|
Record.StructuredBuilder |
newRecordBuilder(MRecord metadata)
Returns a new structured record builder (i.e.
|
Record newRecord(String... fields)
fields
- an array of field values to populate the recordRecord newRecord(Collection<String> fields) throws IllegalArgumentException
fields
- a collection of field values to populate the record. If
null, an empty record is created.IllegalArgumentException
Record.Builder newRecordBuilder()
Record.StructuredBuilder newRecordBuilder(MRecord metadata) throws IllegalArgumentException
metadata
to enable field writes by name).
The record will have all fields initialized to the default values indicated by the metadata.
metadata
- the metadata to useIllegalArgumentException
- if metadata
is nullRecord.StructuredBuilder newDeltaRecordBuilder(MRecord metadata) throws IllegalArgumentException
metadata
to enable field writes by name).
The record will have all fields initialized to the value that would indicate no change in a delta (i.e. a zero length string).
This differs from newRecordBuilder(MRecord)
in that it may
be used to build record content that may be used to perform delta
updates of record topics.
It should be noted that a repeating field will have the minimum number of occurrences set to zero length string and will therefore need to be carefully manipulated to produce true deltas.
metadata
- the metadata to useIllegalArgumentException
- if metadata
is nullCopyright © 2016 Push Technology Ltd. All Rights Reserved.