Module spring.data.redis
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) Deserializekeywith the streamSerializer, field names with the fieldSerializer and values with the valueSerializer.default <T> MapRecord<T,T, T> deserialize(RedisSerializer<T> serializer) static ByteRecordConvert a binaryMapRecordinto aByteRecord.withStreamKey(byte[] key) Create a newByteRecordwith the associated stream key.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.data.redis.connection.stream.MapRecord
map, mapEntries, serialize, serialize, toObjectRecord, withStreamKeyMethods 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 newByteRecordwith the associated stream key.- Parameters:
key- the binary stream key.- Returns:
- a new
ByteRecord.
-
deserialize
Deserializekeyandfield/value pairswith the givenRedisSerializer. An already assignedidis 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) Deserializekeywith the streamSerializer, field names with the fieldSerializer and values with the valueSerializer. An already assignedidis 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
MapRecordholding the deserialized values.
-
of
Convert a binaryMapRecordinto aByteRecord.- Parameters:
source- must not be null.- Returns:
- new instance of
ByteRecord.
-