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 avalue
tokey
.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 atkey
by one.Decrements the number stored atkey
bydelta
.Removes the given key.Get the value ofkey
.Get a substring of value ofkey
betweenbegin
andend
.getAndDelete
(K key) Return the value atkey
and delete the key.getAndExpire
(K key, Duration timeout) Return the value atkey
and expire the key by applyingtimeout
.getAndPersist
(K key) Return the value atkey
and persist the key.Setvalue
ofkey
and return its old value.« Get the bit value atoffset
of value atkey
.Increments the number stored atkey
by one.Increment the string representing a floating point number stored atkey
bydelta
.Increments the number stored atkey
bydelta
.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 intuple
only if the provided key does not exist.Setvalue
forkey
.Overwrite parts ofkey
starting at the specifiedoffset
with givenvalue
.Set thevalue
and expirationtimeout
forkey
.Sets the bit atoffset
in value stored atkey
.Set thevalue
and expirationtimeout
forkey
.setIfAbsent
(K key, V value) Setkey
to hold the stringvalue
ifkey
is absent.setIfAbsent
(K key, V value, Duration timeout) Setkey
to hold the stringvalue
and expirationtimeout
ifkey
is absent.setIfPresent
(K key, V value) Setkey
to hold the stringvalue
ifkey
is present.setIfPresent
(K key, V value, Duration timeout) Setkey
to hold the stringvalue
and expirationtimeout
ifkey
is present.Get the length of the value stored atkey
.
-
Method Details
-
set
Setvalue
forkey
.- Parameters:
key
- must not be null.value
-- See Also:
-
set
Set thevalue
and expirationtimeout
forkey
.- Parameters:
key
- must not be null.value
-timeout
- must not be null.- See Also:
-
setGet
Set thevalue
and expirationtimeout
forkey
. 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
Setkey
to hold the stringvalue
ifkey
is absent.- Parameters:
key
- must not be null.value
-- See Also:
-
setIfAbsent
Setkey
to hold the stringvalue
and expirationtimeout
ifkey
is absent.- Parameters:
key
- must not be null.value
-timeout
- must not be null.- Since:
- 2.1
- See Also:
-
setIfPresent
Setkey
to hold the stringvalue
ifkey
is present.- Parameters:
key
- must not be null.value
-- See Also:
-
setIfPresent
Setkey
to hold the stringvalue
and expirationtimeout
ifkey
is 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 intuple
only 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 atkey
and delete the key.- Parameters:
key
- must not be null.- Since:
- 2.6
- See Also:
-
getAndExpire
Return the value atkey
and 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 atkey
and persist the key. This operation removes any TTL that is associated withkey
.- Parameters:
key
- must not be null.- Since:
- 2.6
- See Also:
-
getAndSet
Setvalue
ofkey
and 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 atkey
by one.- Parameters:
key
- must not be null.- Since:
- 2.1
- See Also:
-
increment
Increments the number stored atkey
bydelta
.- Parameters:
key
- must not be null.delta
-- Since:
- 2.1
- See Also:
-
increment
Increment the string representing a floating point number stored atkey
bydelta
.- Parameters:
key
- must not be null.delta
-- Since:
- 2.1
- See Also:
-
decrement
Decrements the number stored atkey
by one.- Parameters:
key
- must not be null.- Since:
- 2.1
- See Also:
-
decrement
Decrements the number stored atkey
bydelta
.- Parameters:
key
- must not be null.delta
-- Since:
- 2.1
- See Also:
-
append
Append avalue
tokey
.- Parameters:
key
- must not be null.value
-- See Also:
-
get
Get a substring of value ofkey
betweenbegin
andend
.- Parameters:
key
- must not be null.start
-end
-- See Also:
-
set
Overwrite parts ofkey
starting at the specifiedoffset
with 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 atoffset
in value stored atkey
.- Parameters:
key
- must not be null.offset
-value
-- See Also:
-
getBit
« Get the bit value atoffset
of 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:
-