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 givenHashMapperto the backing value to create a newMapRecord.<SK> ObjectRecord<SK,V> withStreamKey(SK key) Create a new instance ofRecordwith 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
ObjectRecordholding thestreamkey andvalue.
-
withId
Description copied from interface:Record -
withStreamKey
Description copied from interface:RecordCreate a new instance ofRecordwith the given key to store the record at.- Specified by:
withStreamKeyin interfaceRecord<S,V> - Parameters:
key- the Redis key identifying the stream.- Returns:
- new instance of
Record.
-
toMapRecord
Apply the givenHashMapperto the backing value to create a newMapRecord. An already assignedidis carried over to the new instance.
-