public interface ReactiveRedisOperations<K,V>
ReactiveRedisTemplate. Not often
used but a useful option for extensibility and testability (as it can be easily mocked or stubbed).| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Long> |
delete(K... key)
Delete given
key. |
reactor.core.publisher.Mono<Long> |
delete(org.reactivestreams.Publisher<K> keys)
Delete given
keys. |
<T> reactor.core.publisher.Flux<T> |
execute(ReactiveRedisCallback<T> action)
Executes the given action within a Redis connection.
|
default <T> reactor.core.publisher.Flux<T> |
execute(RedisScript<T> script)
Executes the given
RedisScript. |
default <T> reactor.core.publisher.Flux<T> |
execute(RedisScript<T> script,
List<K> keys)
Executes the given
RedisScript. |
<T> reactor.core.publisher.Flux<T> |
execute(RedisScript<T> script,
List<K> keys,
List<?> args)
Executes the given
RedisScript |
<T> reactor.core.publisher.Flux<T> |
execute(RedisScript<T> script,
List<K> keys,
List<?> args,
RedisElementWriter<?> argsWriter,
RedisElementReader<T> resultReader)
Executes the given
RedisScript, using the provided RedisSerializers to serialize the script
arguments and result. |
reactor.core.publisher.Mono<Boolean> |
expire(K key,
Duration timeout)
Set time to live for given
key. |
reactor.core.publisher.Mono<Boolean> |
expireAt(K key,
Instant expireAt)
Set the expiration for given
key as a expireAt timestamp. |
reactor.core.publisher.Mono<Duration> |
getExpire(K key)
Get the time to live for
key. |
RedisSerializationContext<K,V> |
getSerializationContext() |
reactor.core.publisher.Mono<Boolean> |
hasKey(K key)
Determine if given
key exists. |
reactor.core.publisher.Flux<K> |
keys(K pattern)
Find all keys matching the given
pattern. |
reactor.core.publisher.Mono<Boolean> |
move(K key,
int dbIndex)
Move given
key to database with index. |
ReactiveGeoOperations<K,V> |
opsForGeo()
Returns geospatial specific operations interface.
|
<K,V> ReactiveGeoOperations<K,V> |
opsForGeo(RedisSerializationContext<K,V> serializationContext)
Returns geospatial specific operations interface.
|
<HK,HV> ReactiveHashOperations<K,HK,HV> |
opsForHash()
Returns the operations performed on hash values.
|
<K,HK,HV> ReactiveHashOperations<K,HK,HV> |
opsForHash(RedisSerializationContext<K,?> serializationContext)
Returns the operations performed on hash values given a
RedisSerializationContext. |
ReactiveHyperLogLogOperations<K,V> |
opsForHyperLogLog()
Returns the operations performed on multisets using HyperLogLog.
|
<K,V> ReactiveHyperLogLogOperations<K,V> |
opsForHyperLogLog(RedisSerializationContext<K,V> serializationContext)
Returns the operations performed on multisets using HyperLogLog given a
RedisSerializationContext. |
ReactiveListOperations<K,V> |
opsForList()
Returns the operations performed on list values.
|
<K,V> ReactiveListOperations<K,V> |
opsForList(RedisSerializationContext<K,V> serializationContext)
Returns the operations performed on list values given a
RedisSerializationContext. |
ReactiveSetOperations<K,V> |
opsForSet()
Returns the operations performed on set values.
|
<K,V> ReactiveSetOperations<K,V> |
opsForSet(RedisSerializationContext<K,V> serializationContext)
Returns the operations performed on set values given a
RedisSerializationContext. |
ReactiveValueOperations<K,V> |
opsForValue()
Returns the operations performed on simple values (or Strings in Redis terminology).
|
<K,V> ReactiveValueOperations<K,V> |
opsForValue(RedisSerializationContext<K,V> serializationContext)
Returns the operations performed on simple values (or Strings in Redis terminology) given a
RedisSerializationContext. |
ReactiveZSetOperations<K,V> |
opsForZSet()
Returns the operations performed on zset values (also known as sorted sets).
|
<K,V> ReactiveZSetOperations<K,V> |
opsForZSet(RedisSerializationContext<K,V> serializationContext)
Returns the operations performed on zset values (also known as sorted sets) given a
RedisSerializationContext. |
reactor.core.publisher.Mono<Boolean> |
persist(K key)
Remove the expiration from given
key. |
reactor.core.publisher.Mono<K> |
randomKey()
Return a random key from the keyspace.
|
reactor.core.publisher.Mono<Boolean> |
rename(K oldKey,
K newKey)
Rename key
oldKey to newKey. |
reactor.core.publisher.Mono<Boolean> |
renameIfAbsent(K oldKey,
K newKey)
Rename key
oleName to newKey only if newKey does not exist. |
reactor.core.publisher.Mono<DataType> |
type(K key)
Determine the type stored at
key. |
<T> reactor.core.publisher.Flux<T> execute(ReactiveRedisCallback<T> action)
T - return typeaction - callback object that specifies the Redis actionFlux.empty().reactor.core.publisher.Mono<Boolean> hasKey(K key)
key exists.key - must not be null.reactor.core.publisher.Mono<DataType> type(K key)
key.key - must not be null.reactor.core.publisher.Flux<K> keys(K pattern)
pattern.pattern - must not be null.reactor.core.publisher.Mono<K> randomKey()
reactor.core.publisher.Mono<Boolean> rename(K oldKey, K newKey)
oldKey to newKey.oldKey - must not be null.newKey - must not be null.reactor.core.publisher.Mono<Boolean> renameIfAbsent(K oldKey, K newKey)
oleName to newKey only if newKey does not exist.oldKey - must not be null.newKey - must not be null.reactor.core.publisher.Mono<Long> delete(K... key)
key.key - must not be null.reactor.core.publisher.Mono<Long> delete(org.reactivestreams.Publisher<K> keys)
keys.keys - must not be null.reactor.core.publisher.Mono<Boolean> expire(K key, Duration timeout)
key.key - must not be null.timeout - must not be null.reactor.core.publisher.Mono<Boolean> expireAt(K key, Instant expireAt)
key as a expireAt timestamp.key - must not be null.expireAt - must not be null.reactor.core.publisher.Mono<Boolean> persist(K key)
key.key - must not be null.reactor.core.publisher.Mono<Boolean> move(K key, int dbIndex)
key to database with index.key - must not be null.dbIndex - reactor.core.publisher.Mono<Duration> getExpire(K key)
key.key - must not be null.Duration of the associated key. Duration.ZERO if no timeout associated or empty
Mono if the key does not exist.default <T> reactor.core.publisher.Flux<T> execute(RedisScript<T> script)
RedisScript.script - must not be null.Flux.empty() if RedisScript.getResultType() is null,
likely indicating a throw-away status reply (i.e. "OK").default <T> reactor.core.publisher.Flux<T> execute(RedisScript<T> script, List<K> keys)
RedisScript.script - must not be null.keys - must not be null.Flux.empty() if RedisScript.getResultType() is null,
likely indicating a throw-away status reply (i.e. "OK").<T> reactor.core.publisher.Flux<T> execute(RedisScript<T> script, List<K> keys, List<?> args)
RedisScriptscript - 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.Flux.empty() if RedisScript.getResultType() is null,
likely indicating a throw-away status reply (i.e. "OK").<T> reactor.core.publisher.Flux<T> execute(RedisScript<T> script, List<K> keys, List<?> args, RedisElementWriter<?> argsWriter, RedisElementReader<T> resultReader)
RedisScript, using the provided RedisSerializers to serialize the script
arguments and result.script - The script to executeargsWriter - The RedisElementWriter to use for serializing argsresultReader - The RedisElementReader to use for serializing the script return valuekeys - keys that need to be passed to the script.args - args that need to be passed to the script.Flux.empty() if RedisScript.getResultType() is null,
likely indicating a throw-away status reply (i.e. "OK").ReactiveGeoOperations<K,V> opsForGeo()
<K,V> ReactiveGeoOperations<K,V> opsForGeo(RedisSerializationContext<K,V> serializationContext)
serializationContext - serializers to be used with the returned operations, must not be null.<HK,HV> ReactiveHashOperations<K,HK,HV> opsForHash()
HK - hash key (or field) type.HV - hash value type.<K,HK,HV> ReactiveHashOperations<K,HK,HV> opsForHash(RedisSerializationContext<K,?> serializationContext)
RedisSerializationContext.HK - hash key (or field) type.HV - hash value type.serializationContext - serializers to be used with the returned operations, must not be null.ReactiveHyperLogLogOperations<K,V> opsForHyperLogLog()
<K,V> ReactiveHyperLogLogOperations<K,V> opsForHyperLogLog(RedisSerializationContext<K,V> serializationContext)
RedisSerializationContext.serializationContext - serializers to be used with the returned operations, must not be null.ReactiveListOperations<K,V> opsForList()
<K,V> ReactiveListOperations<K,V> opsForList(RedisSerializationContext<K,V> serializationContext)
RedisSerializationContext.serializationContext - serializers to be used with the returned operations, must not be null.ReactiveSetOperations<K,V> opsForSet()
<K,V> ReactiveSetOperations<K,V> opsForSet(RedisSerializationContext<K,V> serializationContext)
RedisSerializationContext.serializationContext - serializers to be used with the returned operations, must not be null.ReactiveValueOperations<K,V> opsForValue()
<K,V> ReactiveValueOperations<K,V> opsForValue(RedisSerializationContext<K,V> serializationContext)
RedisSerializationContext.serializationContext - serializers to be used with the returned operations, must not be null.ReactiveZSetOperations<K,V> opsForZSet()
<K,V> ReactiveZSetOperations<K,V> opsForZSet(RedisSerializationContext<K,V> serializationContext)
RedisSerializationContext.serializationContext - serializers to be used with the returned operations, must not be null.RedisSerializationContext<K,V> getSerializationContext()
RedisSerializationContext.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.