public class StreamRecords extends Object
StreamRecords provides utilities to create specific Record instances.| Modifier and Type | Class and Description |
|---|---|
static class |
StreamRecords.RecordBuilder<S>
Builder for
Record. |
| Modifier and Type | Method and Description |
|---|---|
static <S,K,V> MapRecord<S,K,V> |
mapBacked(Map<K,V> map)
|
static StreamRecords.RecordBuilder<?> |
newRecord()
Obtain new instance of
StreamRecords.RecordBuilder to fluently create records. |
static <S,V> ObjectRecord<S,V> |
objectBacked(V value)
Create new
ObjectRecord backed by the given value. |
static ByteBufferRecord |
rawBuffer(Map<ByteBuffer,ByteBuffer> raw)
Create a new
ByteBufferRecord for the given raw field/value pairs. |
static ByteRecord |
rawBytes(Map<byte[],byte[]> raw)
Create a new
ByteRecord for the given raw field/value pairs. |
static StringRecord |
string(Map<String,String> raw)
Create a new
ByteBufferRecord for the given raw field/value pairs. |
public static ByteRecord rawBytes(Map<byte[],byte[]> raw)
ByteRecord for the given raw field/value pairs.raw - must not be null.ByteRecord.public static ByteBufferRecord rawBuffer(Map<ByteBuffer,ByteBuffer> raw)
ByteBufferRecord for the given raw field/value pairs.raw - must not be null.ByteBufferRecord.public static StringRecord string(Map<String,String> raw)
ByteBufferRecord for the given raw field/value pairs.raw - must not be null.ByteBufferRecord.public static <S,K,V> MapRecord<S,K,V> mapBacked(Map<K,V> map)
S - type of the stream key.K - type of the map key.V - type of the map value.map - must not be null.MapRecord.public static <S,V> ObjectRecord<S,V> objectBacked(V value)
ObjectRecord backed by the given value.S - the stream key typeV - the value type.value - must not be null.ObjectRecord.public static StreamRecords.RecordBuilder<?> newRecord()
StreamRecords.RecordBuilder to fluently create records.StreamRecords.RecordBuilder.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.