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 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
.reactor.core.publisher.Mono<Long>
Decrements the number stored atkey
by one.reactor.core.publisher.Mono<Long>
Decrements the number stored atkey
bydelta
.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 ofkey
betweenbegin
andend
.reactor.core.publisher.Mono<V>
getAndDelete
(K key) Return the value atkey
and delete the key.reactor.core.publisher.Mono<V>
getAndExpire
(K key, Duration timeout) Return the value atkey
and expire the key by applyingtimeout
.reactor.core.publisher.Mono<V>
getAndPersist
(K key) Return the value atkey
and persist the key.reactor.core.publisher.Mono<V>
Setvalue
ofkey
and return its old value.reactor.core.publisher.Mono<Boolean>
« Get the bit value atoffset
of value atkey
.reactor.core.publisher.Mono<Long>
Increments the number stored atkey
by one.reactor.core.publisher.Mono<Double>
Increment the string representing a floating point number stored atkey
bydelta
.reactor.core.publisher.Mono<Long>
Increments the number stored atkey
bydelta
.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 intuple
only if the provided key does not exist.reactor.core.publisher.Mono<Boolean>
Setvalue
forkey
.reactor.core.publisher.Mono<Long>
Overwrite parts ofkey
starting at the specifiedoffset
with givenvalue
.reactor.core.publisher.Mono<Boolean>
Set thevalue
and expirationtimeout
forkey
.reactor.core.publisher.Mono<Boolean>
Sets the bit atoffset
in value stored atkey
.reactor.core.publisher.Mono<Boolean>
setIfAbsent
(K key, V value) Setkey
to hold the stringvalue
ifkey
is absent.reactor.core.publisher.Mono<Boolean>
setIfAbsent
(K key, V value, Duration timeout) Setkey
to hold the stringvalue
and expirationtimeout
ifkey
is absent.reactor.core.publisher.Mono<Boolean>
setIfPresent
(K key, V value) Setkey
to hold the stringvalue
ifkey
is present.reactor.core.publisher.Mono<Boolean>
setIfPresent
(K key, V value, Duration timeout) Setkey
to hold the stringvalue
and expirationtimeout
ifkey
is present.reactor.core.publisher.Mono<Long>
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:
-
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 usingnull
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
-
delete
Removes the given key.- Parameters:
key
- must not be null.
-