Module spring.data.redis
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 TypeMethodDescriptionAppend 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.Decrements the number stored atkeyby one.Decrements the number stored atkeybydelta.Removes the given key.Get the value ofkey.Get a substring of value ofkeybetweenbeginandend.getAndDelete(K key) Return the value atkeyand delete the key.getAndExpire(K key, Duration timeout) Return the value atkeyand expire the key by applyingtimeout.getAndPersist(K key) Return the value atkeyand persist the key.Setvalueofkeyand return its old value.« Get the bit value atoffsetof value atkey.Increments the number stored atkeyby one.Increment the string representing a floating point number stored atkeybydelta.Increments the number stored atkeybydelta.multiGet(Collection<K> keys) Get multiplekeys.Set multiple keys to multiple values using key-value pairs provided intuple.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.Setvalueforkey.Overwrite parts ofkeystarting at the specifiedoffsetwith givenvalue.Set thevalueand expirationtimeoutforkey.Sets the bit atoffsetin value stored atkey.Set thevalueand expirationtimeoutforkey.setIfAbsent(K key, V value) Setkeyto hold the stringvalueifkeyis absent.setIfAbsent(K key, V value, Duration timeout) Setkeyto hold the stringvalueand expirationtimeoutifkeyis absent.setIfPresent(K key, V value) Setkeyto hold the stringvalueifkeyis present.setIfPresent(K key, V value, Duration timeout) Setkeyto hold the stringvalueand expirationtimeoutifkeyis present.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:
-
setGet
Set thevalueand expirationtimeoutforkey. Return the old string stored at key, or empty if key did not exist. An error is returned and SET aborted if the value stored at key is not a string.- Parameters:
key- must not be null.value-timeout- must not be null.- Since:
- 3.5
- 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:
-