Class ReactiveRedisTemplate<K,V>
- Type Parameters:
K- the Redis key type against which the template works (usually a String)V- the Redis value type against which the template works
- All Implemented Interfaces:
ReactiveRedisOperations<K,V>
- Direct Known Subclasses:
ReactiveStringRedisTemplate
ReactiveRedisOperations.
Performs automatic serialization/deserialization between the given objects and the underlying binary data in the Redis store.
Note that while the template is generified, it is up to the serializers/deserializers to properly convert the given Objects to and from binary data.
Streams of methods returning Mono<K> or Flux<M> are terminated with
InvalidDataAccessApiUsageException when
RedisElementReader.read(ByteBuffer) returns null for a
particular element as Reactive Streams prohibit the usage of null values.
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl, Petromir Dzhunev, John Blum
-
Constructor Summary
ConstructorsConstructorDescriptionReactiveRedisTemplate(ReactiveRedisConnectionFactory connectionFactory, RedisSerializationContext<K, V> serializationContext) Creates newReactiveRedisTemplateusing givenReactiveRedisConnectionFactoryandRedisSerializationContext.ReactiveRedisTemplate(ReactiveRedisConnectionFactory connectionFactory, RedisSerializationContext<K, V> serializationContext, boolean exposeConnection) Creates newReactiveRedisTemplateusing givenReactiveRedisConnectionFactoryandRedisSerializationContext. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Long>convertAndSend(String destination, V message) Publishes the given message to the given channel.reactor.core.publisher.Mono<Boolean>Copy givensourceKeytotargetKey.<T> reactor.core.publisher.Flux<T>createFlux(ReactiveRedisCallback<T> callback) Create a reusable Flux for aReactiveRedisCallback.<T> reactor.core.publisher.Mono<T>createMono(ReactiveRedisCallback<T> callback) Create a reusable Mono for aReactiveRedisCallback.protected ReactiveRedisConnectioncreateRedisConnectionProxy(ReactiveRedisConnection reactiveRedisConnection) final reactor.core.publisher.Mono<Long>Delete givenkey.reactor.core.publisher.Mono<Long>Delete givenkeys.<T> reactor.core.publisher.Flux<T>execute(ReactiveRedisCallback<T> action) Executes the given action within a Redis connection.<T> reactor.core.publisher.Flux<T>execute(ReactiveRedisCallback<T> action, boolean exposeConnection) Executes the given action object within a connection that can be exposed or not.<T> reactor.core.publisher.Flux<T>execute(RedisScript<T> script, List<K> keys, List<?> args) Executes the givenRedisScript<T> reactor.core.publisher.Flux<T>execute(RedisScript<T> script, List<K> keys, List<?> args, RedisElementWriter<?> argsWriter, RedisElementReader<T> resultReader) Executes the givenRedisScript, using the providedRedisSerializers to serialize the script arguments and result.<T> reactor.core.publisher.Flux<T>executeInSession(ReactiveRedisSessionCallback<K, V, T> action) Executes the given action within a Redis session using the sameReactiveRedisConnection.reactor.core.publisher.Mono<Boolean>Set time to live for givenkey.reactor.core.publisher.Mono<Boolean>Set the expiration for givenkeyas a expireAt timestamp.protected reactor.core.publisher.Mono<ReactiveRedisConnection>Creates aMonowhich emits a newReactiveRedisConnection.Returns the connectionFactory.reactor.core.publisher.Mono<Duration>Get the time to live forkey.reactor.core.publisher.Mono<Boolean>Determine if givenkeyexists.reactor.core.publisher.Flux<K>Find all keys matching the givenpattern.reactor.core.publisher.Flux<? extends ReactiveSubscription.Message<String,V>> reactor.core.publisher.Mono<reactor.core.publisher.Flux<? extends ReactiveSubscription.Message<String,V>>> listenToLater(Topic... topics) reactor.core.publisher.Mono<Boolean>Move givenkeyto database withindex.Returns geospatial specific operations interface.<K1,V1> ReactiveGeoOperations<K1, V1> opsForGeo(RedisSerializationContext<K1, V1> serializationContext) Returns geospatial specific operations interface.<HK,HV> ReactiveHashOperations<K, HK, HV> Returns the operations performed on hash values.<K1,HK, HV> ReactiveHashOperations<K1, HK, HV> opsForHash(RedisSerializationContext<K1, ?> serializationContext) Returns the operations performed on hash values given aRedisSerializationContext.Returns the operations performed on multisets using HyperLogLog.<K1,V1> ReactiveHyperLogLogOperations<K1, V1> opsForHyperLogLog(RedisSerializationContext<K1, V1> serializationContext) Returns the operations performed on multisets using HyperLogLog given aRedisSerializationContext.Returns the operations performed on list values.<K1,V1> ReactiveListOperations<K1, V1> opsForList(RedisSerializationContext<K1, V1> serializationContext) Returns the operations performed on list values given aRedisSerializationContext.Returns the operations performed on set values.<K1,V1> ReactiveSetOperations<K1, V1> opsForSet(RedisSerializationContext<K1, V1> serializationContext) Returns the operations performed on set values given aRedisSerializationContext.<HK,HV> ReactiveStreamOperations<K, HK, HV> Returns the operations performed on streams.<HK,HV> ReactiveStreamOperations<K, HK, HV> opsForStream(HashMapper<? super K, ? super HK, ? super HV> hashMapper) Returns the operations performed on streams.<HK,HV> ReactiveStreamOperations<K, HK, HV> opsForStream(RedisSerializationContext<K, ?> serializationContext) Returns the operations performed on streams given aRedisSerializationContext.protected <HK,HV> ReactiveStreamOperations<K, HK, HV> opsForStream(RedisSerializationContext<K, ?> serializationContext, HashMapper<? super K, ? super HK, ? super HV> hashMapper) Returns the operations performed on simple values (or Strings in Redis terminology).<K1,V1> ReactiveValueOperations<K1, V1> opsForValue(RedisSerializationContext<K1, V1> serializationContext) Returns the operations performed on simple values (or Strings in Redis terminology) given aRedisSerializationContext.Returns the operations performed on zset values (also known as sorted sets).<K1,V1> ReactiveZSetOperations<K1, V1> opsForZSet(RedisSerializationContext<K1, V1> serializationContext) Returns the operations performed on zset values (also known as sorted sets) given aRedisSerializationContext.reactor.core.publisher.Mono<Boolean>Remove the expiration from givenkey.protected <T> org.reactivestreams.Publisher<T>postProcessResult(org.reactivestreams.Publisher<T> result, ReactiveRedisConnection connection, boolean existingConnection) Processes the result before returning thePublisher.protected ReactiveRedisConnectionpreProcessConnection(ReactiveRedisConnection connection, boolean existingConnection) Processes the connection (before any settings are executed on it).reactor.core.publisher.Mono<K>Return a random key from the keyspace.reactor.core.publisher.Mono<Boolean>Rename keyoldKeytonewKey.reactor.core.publisher.Mono<Boolean>renameIfAbsent(K oldKey, K newKey) Rename keyoldKeytonewKeyonly ifnewKeydoes not exist.reactor.core.publisher.Flux<K>scan(ScanOptions options) Use aFluxto iterate over keys.reactor.core.publisher.Mono<DataType>Determine the type stored atkey.final reactor.core.publisher.Mono<Long>Unlink thekeyfrom the keyspace.reactor.core.publisher.Mono<Long>Unlink thekeysfrom the keyspace.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.redis.core.ReactiveRedisOperations
execute, execute, listenToChannel, listenToChannelLater, listenToPattern, listenToPatternLater, scan
-
Constructor Details
-
ReactiveRedisTemplate
public ReactiveRedisTemplate(ReactiveRedisConnectionFactory connectionFactory, RedisSerializationContext<K, V> serializationContext) Creates newReactiveRedisTemplateusing givenReactiveRedisConnectionFactoryandRedisSerializationContext.- Parameters:
connectionFactory- must not be null.serializationContext- must not be null.
-
ReactiveRedisTemplate
public ReactiveRedisTemplate(ReactiveRedisConnectionFactory connectionFactory, RedisSerializationContext<K, V> serializationContext, boolean exposeConnection) Creates newReactiveRedisTemplateusing givenReactiveRedisConnectionFactoryandRedisSerializationContext.- Parameters:
connectionFactory- must not be null.serializationContext- must not be null.exposeConnection- flag indicating to expose the connection used.
-
-
Method Details
-
getConnectionFactory
Returns the connectionFactory.- Returns:
- Returns the connectionFactory
-
execute
Description copied from interface:ReactiveRedisOperationsExecutes the given action within a Redis connection. Application exceptions thrown by the action object get propagated to the caller (can only be unchecked) whenever possible. Redis exceptions are transformed into appropriate DAO ones. Allows for returning a result object, that is a domain object or a collection of domain objects. Performs automatic serialization/deserialization for the given objects to and from binary data suitable for the Redis storage. Note: Callback code is not supposed to handle transactions itself! Use an appropriate transaction manager. Generally, callback code must not touch any Connection lifecycle methods, like close, to let the template do its work.- Specified by:
executein interfaceReactiveRedisOperations<K,V> - Type Parameters:
T- return type- Parameters:
action- callback object that specifies the Redis action- Returns:
- a result object returned by the action or
Flux.empty().
-
execute
public <T> reactor.core.publisher.Flux<T> execute(ReactiveRedisCallback<T> action, boolean exposeConnection) Executes the given action object within a connection that can be exposed or not. Additionally, the connection can be pipelined. Note the results of the pipeline are discarded (making it suitable for write-only scenarios).- Type Parameters:
T- return type- Parameters:
action- callback object to executeexposeConnection- whether to enforce exposure of the native Redis Connection to callback code- Returns:
- object returned by the action
-
executeInSession
public <T> reactor.core.publisher.Flux<T> executeInSession(ReactiveRedisSessionCallback<K, V, T> action) Description copied from interface:ReactiveRedisOperationsExecutes the given action within a Redis session using the sameReactiveRedisConnection. Application exceptions thrown by the action object get propagated to the caller (can only be unchecked) whenever possible. Redis exceptions are transformed into appropriate DAO ones. Allows for returning a result object, that is a domain object or a collection of domain objects. Performs automatic serialization/deserialization for the given objects to and from binary data suitable for the Redis storage. Note: Callback code is not supposed to handle transactions itself! Use an appropriate transaction manager. Generally, callback code must not touch any Connection lifecycle methods, like close, to let the template do its work.- Specified by:
executeInSessionin interfaceReactiveRedisOperations<K,V> - Type Parameters:
T- return type- Parameters:
action- callback object that specifies the Redis action- Returns:
- a result object returned by the action or
Flux.empty().
-
createFlux
Create a reusable Flux for aReactiveRedisCallback. Callback is executed within a connection context. The connection is released outside the callback.- Parameters:
callback- must not be null- Returns:
- a
Fluxwrapping theReactiveRedisCallback.
-
createMono
Create a reusable Mono for aReactiveRedisCallback. Callback is executed within a connection context. The connection is released outside the callback.- Parameters:
callback- must not be null- Returns:
- a
Monowrapping theReactiveRedisCallback.
-
getConnection
Creates aMonowhich emits a newReactiveRedisConnection. Can be overridden in subclasses to provide a different mechanism for connection allocation for the given method.- Since:
- 2.5.5
-
convertAndSend
Description copied from interface:ReactiveRedisOperationsPublishes the given message to the given channel.- Specified by:
convertAndSendin interfaceReactiveRedisOperations<K,V> - Parameters:
destination- the channel to publish to, must not be null nor empty.message- message to publish. Must not be null.- Returns:
- the number of clients that received the message
- See Also:
-
listenTo
public reactor.core.publisher.Flux<? extends ReactiveSubscription.Message<String,V>> listenTo(Topic... topics) Description copied from interface:ReactiveRedisOperationsSubscribe to the Redis channels for the giventopicsand emitmessagesreceived for those.Note that this method allocates a new
ReactiveRedisMessageListenerContainerand uses a dedicated connection, similar to other methods on this interface. Invoking this method multiple times is an indication that you should useReactiveRedisMessageListenerContainerdirectly.- Specified by:
listenToin interfaceReactiveRedisOperations<K,V> - Parameters:
topics- must not be null.- Returns:
- a hot sequence of
messages. - See Also:
-
listenToLater
public reactor.core.publisher.Mono<reactor.core.publisher.Flux<? extends ReactiveSubscription.Message<String,V>>> listenToLater(Topic... topics) Description copied from interface:ReactiveRedisOperationsSubscribe to the Redis channels for the giventopicsand emitmessagesreceived for those. TheMonocompletes once thetopicsubscriptions are registered.Note that this method allocates a new
ReactiveRedisMessageListenerContainerand uses a dedicated connection, similar to other methods on this interface. Invoking this method multiple times is an indication that you should useReactiveRedisMessageListenerContainerdirectly.- Specified by:
listenToLaterin interfaceReactiveRedisOperations<K,V> - Parameters:
topics- must not be null.- Returns:
- a hot sequence of
messages. - See Also:
-
copy
Description copied from interface:ReactiveRedisOperationsCopy givensourceKeytotargetKey.- Specified by:
copyin interfaceReactiveRedisOperations<K,V> - Parameters:
sourceKey- must not be null.targetKey- must not be null.- Returns:
- See Also:
-
hasKey
Description copied from interface:ReactiveRedisOperationsDetermine if givenkeyexists.- Specified by:
hasKeyin interfaceReactiveRedisOperations<K,V> - Parameters:
key- must not be null.- Returns:
- See Also:
-
type
Description copied from interface:ReactiveRedisOperationsDetermine the type stored atkey.- Specified by:
typein interfaceReactiveRedisOperations<K,V> - Parameters:
key- must not be null.- Returns:
- See Also:
-
keys
Description copied from interface:ReactiveRedisOperationsFind all keys matching the givenpattern.
IMPORTANT: It is recommended to useReactiveRedisOperations.scan()to iterate over the keyspace asReactiveRedisOperations.keys(Object)is a non-interruptible and expensive Redis operation.- Specified by:
keysin interfaceReactiveRedisOperations<K,V> - Parameters:
pattern- must not be null.- Returns:
- the
Fluxemitting matching keys one by one. - See Also:
-
scan
Description copied from interface:ReactiveRedisOperationsUse aFluxto iterate over keys. The resultingFluxacts as a cursor and issuesSCANcommands itself as long as the subscriber signals demand.- Specified by:
scanin interfaceReactiveRedisOperations<K,V> - Parameters:
options- must not be null. UseScanOptions.NONEinstead.- Returns:
- the
Fluxemitting the keys one by one or anempty fluxif none exist. - See Also:
-
randomKey
Description copied from interface:ReactiveRedisOperationsReturn a random key from the keyspace.- Specified by:
randomKeyin interfaceReactiveRedisOperations<K,V> - Returns:
- See Also:
-
rename
Description copied from interface:ReactiveRedisOperationsRename keyoldKeytonewKey.- Specified by:
renamein interfaceReactiveRedisOperations<K,V> - Parameters:
oldKey- must not be null.newKey- must not be null.- See Also:
-
renameIfAbsent
Description copied from interface:ReactiveRedisOperationsRename keyoldKeytonewKeyonly ifnewKeydoes not exist.- Specified by:
renameIfAbsentin interfaceReactiveRedisOperations<K,V> - Parameters:
oldKey- must not be null.newKey- must not be null.- Returns:
- See Also:
-
delete
Description copied from interface:ReactiveRedisOperationsDelete givenkey.- Specified by:
deletein interfaceReactiveRedisOperations<K,V> - Parameters:
keys- must not be null.- Returns:
- The number of keys that were removed.
- See Also:
-
delete
Description copied from interface:ReactiveRedisOperationsDelete givenkeys. This command buffers keys received fromPublisherinto chunks of 128 keys to delete to reduce the number of issuedDELcommands.- Specified by:
deletein interfaceReactiveRedisOperations<K,V> - Parameters:
keys- must not be null.- Returns:
- The number of keys that were removed.
- See Also:
-
unlink
Description copied from interface:ReactiveRedisOperationsUnlink thekeyfrom the keyspace. Unlike withReactiveRedisOperations.delete(Object[])the actual memory reclaiming here happens asynchronously.- Specified by:
unlinkin interfaceReactiveRedisOperations<K,V> - Parameters:
keys- must not be null.- Returns:
- The number of keys that were removed. null when used in pipeline / transaction.
- See Also:
-
unlink
Description copied from interface:ReactiveRedisOperationsUnlink thekeysfrom the keyspace. Unlike withReactiveRedisOperations.delete(Publisher)the actual memory reclaiming here happens asynchronously. This command buffers keys received fromPublisherinto chunks of 128 keys to delete to reduce the number of issuedUNLINKcommands.- Specified by:
unlinkin interfaceReactiveRedisOperations<K,V> - Parameters:
keys- must not be null.- Returns:
- The number of keys that were removed. null when used in pipeline / transaction.
- See Also:
-
expire
Description copied from interface:ReactiveRedisOperationsSet time to live for givenkey.- Specified by:
expirein interfaceReactiveRedisOperations<K,V> - Parameters:
key- must not be null.timeout- must not be null.- Returns:
-
expireAt
Description copied from interface:ReactiveRedisOperationsSet the expiration for givenkeyas a expireAt timestamp.- Specified by:
expireAtin interfaceReactiveRedisOperations<K,V> - Parameters:
key- must not be null.expireAt- must not be null.- Returns:
-
persist
Description copied from interface:ReactiveRedisOperationsRemove the expiration from givenkey.- Specified by:
persistin interfaceReactiveRedisOperations<K,V> - Parameters:
key- must not be null.- Returns:
- See Also:
-
getExpire
Description copied from interface:ReactiveRedisOperationsGet the time to live forkey.- Specified by:
getExpirein interfaceReactiveRedisOperations<K,V> - Parameters:
key- must not be null.- Returns:
- the
Durationof the associated key.Duration.ZEROif no timeout associated or emptyMonoif the key does not exist. - See Also:
-
move
Description copied from interface:ReactiveRedisOperationsMove givenkeyto database withindex.- Specified by:
movein interfaceReactiveRedisOperations<K,V> - Parameters:
key- must not be null.- Returns:
- See Also:
-
execute
public <T> reactor.core.publisher.Flux<T> execute(RedisScript<T> script, List<K> keys, List<?> args) Description copied from interface:ReactiveRedisOperationsExecutes the givenRedisScript- Specified by:
executein interfaceReactiveRedisOperations<K,V> - Parameters:
script- The script to execute. Must not be null.keys- keys that need to be passed to the script. Must not be null.args- args that need to be passed to the script. Must not be null.- Returns:
- result value of the script
Flux.empty()ifRedisScript.getResultType()is null, likely indicating a throw-away status reply (i.e. "OK").
-
execute
public <T> reactor.core.publisher.Flux<T> execute(RedisScript<T> script, List<K> keys, List<?> args, RedisElementWriter<?> argsWriter, RedisElementReader<T> resultReader) Description copied from interface:ReactiveRedisOperationsExecutes the givenRedisScript, using the providedRedisSerializers to serialize the script arguments and result.- Specified by:
executein interfaceReactiveRedisOperations<K,V> - Parameters:
script- The script to executekeys- keys that need to be passed to the script.args- args that need to be passed to the script.argsWriter- TheRedisElementWriterto use for serializing argsresultReader- TheRedisElementReaderto use for serializing the script return value- Returns:
- result value of the script
Flux.empty()ifRedisScript.getResultType()is null, likely indicating a throw-away status reply (i.e. "OK").
-
preProcessConnection
protected ReactiveRedisConnection preProcessConnection(ReactiveRedisConnection connection, boolean existingConnection) Processes the connection (before any settings are executed on it). Default implementation returns the connection as is.- Parameters:
connection- must not be null.existingConnection-
-
postProcessResult
protected <T> org.reactivestreams.Publisher<T> postProcessResult(org.reactivestreams.Publisher<T> result, ReactiveRedisConnection connection, boolean existingConnection) Processes the result before returning thePublisher. Default implementation returns the result as is.- Parameters:
result- must not be null.connection- must not be null.existingConnection-- Returns:
-
createRedisConnectionProxy
protected ReactiveRedisConnection createRedisConnectionProxy(ReactiveRedisConnection reactiveRedisConnection) -
opsForGeo
Description copied from interface:ReactiveRedisOperationsReturns geospatial specific operations interface.- Specified by:
opsForGeoin interfaceReactiveRedisOperations<K,V> - Returns:
- geospatial specific operations.
-
opsForGeo
public <K1,V1> ReactiveGeoOperations<K1,V1> opsForGeo(RedisSerializationContext<K1, V1> serializationContext) Description copied from interface:ReactiveRedisOperationsReturns geospatial specific operations interface.- Specified by:
opsForGeoin interfaceReactiveRedisOperations<K,V> - Parameters:
serializationContext- serializers to be used with the returned operations, must not be null.- Returns:
- geospatial specific operations.
-
opsForHash
Description copied from interface:ReactiveRedisOperationsReturns the operations performed on hash values.- Specified by:
opsForHashin interfaceReactiveRedisOperations<K,V> - Type Parameters:
HK- hash key (or field) type.HV- hash value type.- Returns:
- hash operations.
-
opsForHash
public <K1,HK, ReactiveHashOperations<K1,HV> HK, opsForHashHV> (RedisSerializationContext<K1, ?> serializationContext) Description copied from interface:ReactiveRedisOperationsReturns the operations performed on hash values given aRedisSerializationContext.- Specified by:
opsForHashin interfaceReactiveRedisOperations<K,V> HK- hash key (or field) type.HV- hash value type.- Parameters:
serializationContext- serializers to be used with the returned operations, must not be null.- Returns:
- hash operations.
-
opsForHyperLogLog
Description copied from interface:ReactiveRedisOperationsReturns the operations performed on multisets using HyperLogLog.- Specified by:
opsForHyperLogLogin interfaceReactiveRedisOperations<K,V> - Returns:
- never null.
-
opsForHyperLogLog
public <K1,V1> ReactiveHyperLogLogOperations<K1,V1> opsForHyperLogLog(RedisSerializationContext<K1, V1> serializationContext) Description copied from interface:ReactiveRedisOperationsReturns the operations performed on multisets using HyperLogLog given aRedisSerializationContext.- Specified by:
opsForHyperLogLogin interfaceReactiveRedisOperations<K,V> - Parameters:
serializationContext- serializers to be used with the returned operations, must not be null.- Returns:
- never null.
-
opsForList
Description copied from interface:ReactiveRedisOperationsReturns the operations performed on list values.- Specified by:
opsForListin interfaceReactiveRedisOperations<K,V> - Returns:
- list operations.
-
opsForList
public <K1,V1> ReactiveListOperations<K1,V1> opsForList(RedisSerializationContext<K1, V1> serializationContext) Description copied from interface:ReactiveRedisOperationsReturns the operations performed on list values given aRedisSerializationContext.- Specified by:
opsForListin interfaceReactiveRedisOperations<K,V> - Parameters:
serializationContext- serializers to be used with the returned operations, must not be null.- Returns:
- list operations.
-
opsForSet
Description copied from interface:ReactiveRedisOperationsReturns the operations performed on set values.- Specified by:
opsForSetin interfaceReactiveRedisOperations<K,V> - Returns:
- set operations.
-
opsForSet
public <K1,V1> ReactiveSetOperations<K1,V1> opsForSet(RedisSerializationContext<K1, V1> serializationContext) Description copied from interface:ReactiveRedisOperationsReturns the operations performed on set values given aRedisSerializationContext.- Specified by:
opsForSetin interfaceReactiveRedisOperations<K,V> - Parameters:
serializationContext- serializers to be used with the returned operations, must not be null.- Returns:
- set operations.
-
opsForStream
Description copied from interface:ReactiveRedisOperationsReturns the operations performed on streams.- Specified by:
opsForStreamin interfaceReactiveRedisOperations<K,V> - Returns:
- stream operations.
-
opsForStream
public <HK,HV> ReactiveStreamOperations<K,HK, opsForStreamHV> (HashMapper<? super K, ? super HK, ? super HV> hashMapper) Description copied from interface:ReactiveRedisOperationsReturns the operations performed on streams.- Specified by:
opsForStreamin interfaceReactiveRedisOperations<K,V> - Parameters:
hashMapper- theHashMapperto use when mapping complex objects.- Returns:
- stream operations.
-
opsForStream
public <HK,HV> ReactiveStreamOperations<K,HK, opsForStreamHV> (RedisSerializationContext<K, ?> serializationContext) Description copied from interface:ReactiveRedisOperationsReturns the operations performed on streams given aRedisSerializationContext.- Specified by:
opsForStreamin interfaceReactiveRedisOperations<K,V> - Parameters:
serializationContext- serializers to be used with the returned operations, must not be null.- Returns:
- stream operations.
-
opsForStream
protected <HK,HV> ReactiveStreamOperations<K,HK, opsForStreamHV> (RedisSerializationContext<K, ?> serializationContext, @Nullable HashMapper<? super K, ? super HK, ? super HV> hashMapper) -
opsForValue
Description copied from interface:ReactiveRedisOperationsReturns the operations performed on simple values (or Strings in Redis terminology).- Specified by:
opsForValuein interfaceReactiveRedisOperations<K,V> - Returns:
- value operations
-
opsForValue
public <K1,V1> ReactiveValueOperations<K1,V1> opsForValue(RedisSerializationContext<K1, V1> serializationContext) Description copied from interface:ReactiveRedisOperationsReturns the operations performed on simple values (or Strings in Redis terminology) given aRedisSerializationContext.- Specified by:
opsForValuein interfaceReactiveRedisOperations<K,V> - Parameters:
serializationContext- serializers to be used with the returned operations, must not be null.- Returns:
- value operations.
-
opsForZSet
Description copied from interface:ReactiveRedisOperationsReturns the operations performed on zset values (also known as sorted sets).- Specified by:
opsForZSetin interfaceReactiveRedisOperations<K,V> - Returns:
- zset operations.
-
opsForZSet
public <K1,V1> ReactiveZSetOperations<K1,V1> opsForZSet(RedisSerializationContext<K1, V1> serializationContext) Description copied from interface:ReactiveRedisOperationsReturns the operations performed on zset values (also known as sorted sets) given aRedisSerializationContext.- Specified by:
opsForZSetin interfaceReactiveRedisOperations<K,V> - Parameters:
serializationContext- serializers to be used with the returned operations, must not be null.- Returns:
- zset operations.
-
getSerializationContext
- Specified by:
getSerializationContextin interfaceReactiveRedisOperations<K,V> - Returns:
- the
RedisSerializationContext.
-