Interface ReactiveValueOperations<K,V>
public interface ReactiveValueOperations<K,V>
Reactive Redis operations for simple (or in Redis terminology 'string') values.
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, Jiahe Cai
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Long>Append avaluetokey.bitField(K key, BitFieldSubCommands command) Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.reactor.core.publisher.Mono<Long>Decrements the number stored atkeyby one.reactor.core.publisher.Mono<Long>Decrements the number stored atkeybydelta.reactor.core.publisher.Mono<Boolean>Removes the given key.reactor.core.publisher.Mono<V>Get the value ofkey.reactor.core.publisher.Mono<String>Get a substring of value ofkeybetweenbeginandend.reactor.core.publisher.Mono<V>getAndDelete(K key) Return the value atkeyand delete the key.reactor.core.publisher.Mono<V>getAndExpire(K key, Duration timeout) Return the value atkeyand expire the key by applyingtimeout.reactor.core.publisher.Mono<V>getAndPersist(K key) Return the value atkeyand persist the key.reactor.core.publisher.Mono<V>Setvalueofkeyand return its old value.reactor.core.publisher.Mono<Boolean>« Get the bit value atoffsetof value atkey.reactor.core.publisher.Mono<Long>Increments the number stored atkeyby one.reactor.core.publisher.Mono<Double>Increment the string representing a floating point number stored atkeybydelta.reactor.core.publisher.Mono<Long>Increments the number stored atkeybydelta.multiGet(Collection<K> keys) Get multiplekeys.reactor.core.publisher.Mono<Boolean>Set multiple keys to multiple values using key-value pairs provided intuple.reactor.core.publisher.Mono<Boolean>multiSetIfAbsent(Map<? extends K, ? extends V> map) Set multiple keys to multiple values using key-value pairs provided intupleonly if the provided key does not exist.reactor.core.publisher.Mono<Boolean>Setvalueforkey.reactor.core.publisher.Mono<Long>Overwrite parts ofkeystarting at the specifiedoffsetwith givenvalue.reactor.core.publisher.Mono<Boolean>Set thevalueand expirationtimeoutforkey.reactor.core.publisher.Mono<Boolean>Sets the bit atoffsetin value stored atkey.reactor.core.publisher.Mono<Boolean>setIfAbsent(K key, V value) Setkeyto hold the stringvalueifkeyis absent.reactor.core.publisher.Mono<Boolean>setIfAbsent(K key, V value, Duration timeout) Setkeyto hold the stringvalueand expirationtimeoutifkeyis absent.reactor.core.publisher.Mono<Boolean>setIfPresent(K key, V value) Setkeyto hold the stringvalueifkeyis present.reactor.core.publisher.Mono<Boolean>setIfPresent(K key, V value, Duration timeout) Setkeyto hold the stringvalueand expirationtimeoutifkeyis present.reactor.core.publisher.Mono<Long>Get the length of the value stored atkey.
-
Method Details
-
set
Setvalueforkey.- Parameters:
key- must not be null.value-- See Also:
-
set
Set thevalueand expirationtimeoutforkey.- Parameters:
key- must not be null.value-timeout- must not be null.- See Also:
-
setIfAbsent
Setkeyto hold the stringvalueifkeyis absent.- Parameters:
key- must not be null.value-- See Also:
-
setIfAbsent
Setkeyto hold the stringvalueand expirationtimeoutifkeyis absent.- Parameters:
key- must not be null.value-timeout- must not be null.- Since:
- 2.1
- See Also:
-
setIfPresent
Setkeyto hold the stringvalueifkeyis present.- Parameters:
key- must not be null.value-- See Also:
-
setIfPresent
Setkeyto hold the stringvalueand expirationtimeoutifkeyis present.- Parameters:
key- must not be null.value-timeout- must not be null.- Since:
- 2.1
- See Also:
-
multiSet
Set multiple keys to multiple values using key-value pairs provided intuple.- Parameters:
map- must not be null.- See Also:
-
multiSetIfAbsent
Set multiple keys to multiple values using key-value pairs provided intupleonly if the provided key does not exist.- Parameters:
map- must not be null.- See Also:
-
get
Get the value ofkey.- Parameters:
key- must not be null.- See Also:
-
getAndDelete
Return the value atkeyand delete the key.- Parameters:
key- must not be null.- Since:
- 2.6
- See Also:
-
getAndExpire
Return the value atkeyand expire the key by applyingtimeout.- Parameters:
key- must not be null.timeout- must not be null.- Since:
- 2.6
- See Also:
-
getAndPersist
Return the value atkeyand persist the key. This operation removes any TTL that is associated withkey.- Parameters:
key- must not be null.- Since:
- 2.6
- See Also:
-
getAndSet
Setvalueofkeyand return its old value.- Parameters:
key- must not be null.- See Also:
-
multiGet
Get multiplekeys. Values are in the order of the requested keys. Absent field values are represented using null in the resultingList.- Parameters:
keys- must not be null.- See Also:
-
increment
Increments the number stored atkeyby one.- Parameters:
key- must not be null.- Since:
- 2.1
- See Also:
-
increment
Increments the number stored atkeybydelta.- Parameters:
key- must not be null.delta-- Since:
- 2.1
- See Also:
-
increment
Increment the string representing a floating point number stored atkeybydelta.- Parameters:
key- must not be null.delta-- Since:
- 2.1
- See Also:
-
decrement
Decrements the number stored atkeyby one.- Parameters:
key- must not be null.- Since:
- 2.1
- See Also:
-
decrement
Decrements the number stored atkeybydelta.- Parameters:
key- must not be null.delta-- Since:
- 2.1
- See Also:
-
append
Append avaluetokey.- Parameters:
key- must not be null.value-- See Also:
-
get
Get a substring of value ofkeybetweenbeginandend.- Parameters:
key- must not be null.start-end-- See Also:
-
set
Overwrite parts ofkeystarting at the specifiedoffsetwith givenvalue.- Parameters:
key- must not be null.value-offset-- See Also:
-
size
Get the length of the value stored atkey.- Parameters:
key- must not be null.- See Also:
-
setBit
Sets the bit atoffsetin value stored atkey.- Parameters:
key- must not be null.offset-value-- See Also:
-
getBit
« Get the bit value atoffsetof value atkey.- Parameters:
key- must not be null.offset-- See Also:
-
bitField
Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.- Parameters:
key- must not be null.command- must not be null.- Returns:
- Since:
- 2.1
- See Also:
-
delete
Removes the given key.- Parameters:
key- must not be null.- See Also:
-