Interface ObjectRecord<S,V>
- Type Parameters:
V
- the type of the backing Object.
- All Superinterfaces:
Record<S,
V>
A
Record
within the stream mapped to a single object. This may be a simple type, such as String
or a
complex one.- Author:
- Christoph Strobl, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S,
V> ObjectRecord<S, V> create
(S stream, V value) toMapRecord
(HashMapper<? super V, HK, HV> mapper) Apply the givenHashMapper
to the backing value to create a newMapRecord
.<SK> ObjectRecord<SK,
V> withStreamKey
(SK key) Create a new instance ofRecord
with the given key to store the record at.Methods inherited from interface org.springframework.data.redis.connection.stream.Record
getId, getRequiredStream, getStream, getValue
-
Method Details
-
create
- Parameters:
stream
- the stream key.value
- the value.- Returns:
- the
ObjectRecord
holding thestream
key andvalue
.
-
withId
Description copied from interface:Record
-
withStreamKey
Description copied from interface:Record
Create a new instance ofRecord
with the given key to store the record at.- Specified by:
withStreamKey
in interfaceRecord<S,
V> - Parameters:
key
- the Redis key identifying the stream.- Returns:
- new instance of
Record
.
-
toMapRecord
Apply the givenHashMapper
to the backing value to create a newMapRecord
. An already assignedid
is carried over to the new instance.
-