Module spring.data.redis
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.RecordBuilderto fluently createrecords.static <S,V> ObjectRecord<S, V> objectBacked(V value) Create newObjectRecordbacked by the given value.static ByteBufferRecordrawBuffer(Map<ByteBuffer, ByteBuffer> raw) Create a newByteBufferRecordfor the given raw field/value pairs.static ByteRecordCreate a newByteRecordfor the given raw field/value pairs.static StringRecordCreate a newByteBufferRecordfor the given raw field/value pairs.
-
Method Details
-
rawBytes
Create a newByteRecordfor the given raw field/value pairs.- Parameters:
raw- must not be null.- Returns:
- new instance of
ByteRecord.
-
rawBuffer
Create a newByteBufferRecordfor the given raw field/value pairs.- Parameters:
raw- must not be null.- Returns:
- new instance of
ByteBufferRecord.
-
string
Create a newByteBufferRecordfor 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 newObjectRecordbacked 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.RecordBuilderto fluently createrecords.- Returns:
- new instance of
StreamRecords.RecordBuilder.
-