Class StreamRecords
java.lang.Object
org.springframework.data.redis.connection.stream.StreamRecords
StreamRecords
provides utilities to create specific Record
instances.- Since:
- 2.2
- Author:
- Christoph Strobl
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <S,
K, V> MapRecord<S, K, V> static StreamRecords.RecordBuilder<?>
Obtain new instance ofStreamRecords.RecordBuilder
to fluently createrecords
.static <S,
V> ObjectRecord<S, V> objectBacked
(V value) Create newObjectRecord
backed by the given value.static ByteBufferRecord
rawBuffer
(Map<ByteBuffer, ByteBuffer> raw) Create a newByteBufferRecord
for the given raw field/value pairs.static ByteRecord
Create a newByteRecord
for the given raw field/value pairs.static StringRecord
Create a newByteBufferRecord
for the given raw field/value pairs.
-
Method Details
-
rawBytes
Create a newByteRecord
for the given raw field/value pairs.- Parameters:
raw
- must not be null.- Returns:
- new instance of
ByteRecord
.
-
rawBuffer
Create a newByteBufferRecord
for the given raw field/value pairs.- Parameters:
raw
- must not be null.- Returns:
- new instance of
ByteBufferRecord
.
-
string
Create a newByteBufferRecord
for the given raw field/value pairs.- Parameters:
raw
- must not be null.- Returns:
- new instance of
ByteBufferRecord
.
-
mapBacked
- Type Parameters:
S
- type of the stream key.K
- type of the map key.V
- type of the map value.- Parameters:
map
- must not be null.- Returns:
- new instance of
MapRecord
.
-
objectBacked
Create newObjectRecord
backed by the given value.- Type Parameters:
S
- the stream key typeV
- the value type.- Parameters:
value
- must not be null.- Returns:
- new instance of
ObjectRecord
.
-
newRecord
Obtain new instance ofStreamRecords.RecordBuilder
to fluently createrecords
.- Returns:
- new instance of
StreamRecords.RecordBuilder
.
-