Interface ByteRecord
- All Superinterfaces:
Iterable<Map.Entry<byte[],
,byte[]>> MapRecord<byte[],
,byte[], byte[]> Record<byte[],
Map<byte[], byte[]>>
A
Record
within the stream backed by a collection of binary field/value pairs.- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptiondefault <K,
HK, HV> MapRecord<K, HK, HV> deserialize
(RedisSerializer<? extends K> streamSerializer, RedisSerializer<? extends HK> fieldSerializer, RedisSerializer<? extends HV> valueSerializer) Deserializekey
with the streamSerializer, field names with the fieldSerializer and values with the valueSerializer.default <T> MapRecord<T,
T, T> deserialize
(RedisSerializer<T> serializer) static ByteRecord
Convert a binaryMapRecord
into aByteRecord
.withStreamKey
(byte[] key) Create a newByteRecord
with the associated stream key.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.springframework.data.redis.connection.stream.MapRecord
map, mapEntries, serialize, serialize, toObjectRecord, withStreamKey
Methods inherited from interface org.springframework.data.redis.connection.stream.Record
getId, getRequiredStream, getStream, getValue
-
Method Details
-
withId
Description copied from interface:Record
-
withStreamKey
Create a newByteRecord
with the associated stream key.- Parameters:
key
- the binary stream key.- Returns:
- a new
ByteRecord
.
-
deserialize
Deserializekey
andfield/value pairs
with the givenRedisSerializer
. An already assignedid
is carried over to the new instance. -
deserialize
default <K,HK, MapRecord<K,HV> HK, deserializeHV> (@Nullable RedisSerializer<? extends K> streamSerializer, @Nullable RedisSerializer<? extends HK> fieldSerializer, @Nullable RedisSerializer<? extends HV> valueSerializer) Deserializekey
with the streamSerializer, field names with the fieldSerializer and values with the valueSerializer. An already assignedid
is carried over to the new instance.- Parameters:
streamSerializer
- can be null if the key suites already the target format.fieldSerializer
- can be null if the fields suite already the target format.valueSerializer
- can be null if the values suite already the target format.- Returns:
- new
MapRecord
holding the deserialized values.
-
of
Convert a binaryMapRecord
into aByteRecord
.- Parameters:
source
- must not be null.- Returns:
- new instance of
ByteRecord
.
-