Interface ReactiveZSetOperations<K,V>
public interface ReactiveZSetOperations<K,V>
Reactive Redis operations for Sorted (ZSet) Commands.
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, Christoph Strobl, Andrey Shlykov
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Boolean>
Addvalue
to a sorted set atkey
, or update itsscore
if it already exists.reactor.core.publisher.Mono<Long>
addAll
(K key, Collection<? extends ZSetOperations.TypedTuple<V>> tuples) Addtuples
to a sorted set atkey
, or update their score if it already exists.reactor.core.publisher.Mono<Long>
Count number of elements within sorted set with scores betweenmin
andmax
.reactor.core.publisher.Mono<Boolean>
Removes the given key.reactor.core.publisher.Flux<V>
difference
(K key, Collection<K> otherKeys) Diff sortedsets
.default reactor.core.publisher.Flux<V>
difference
(K key, K otherKey) Diff sortedsets
.reactor.core.publisher.Mono<Long>
differenceAndStore
(K key, Collection<K> otherKeys, K destKey) Diff sortedsets
and store result in destinationdestKey
.default reactor.core.publisher.Mono<Long>
differenceAndStore
(K key, K otherKey, K destKey) Diff sortedsets
and store result in destinationdestKey
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
differenceWithScores
(K key, Collection<K> otherKeys) Diff sortedsets
.default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
differenceWithScores
(K key, K otherKey) Diff sortedsets
.reactor.core.publisher.Flux<V>
distinctRandomMembers
(K key, long count) Getcount
distinct random elements from set atkey
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
distinctRandomMembersWithScore
(K key, long count) Getcount
distinct random elements with their score from set atkey
.reactor.core.publisher.Mono<Double>
incrementScore
(K key, V value, double delta) Increment the score of element withvalue
in sorted set byincrement
.reactor.core.publisher.Flux<V>
intersect
(K key, Collection<K> otherKeys) Intersect sortedsets
.default reactor.core.publisher.Flux<V>
Intersect sortedsets
.reactor.core.publisher.Mono<Long>
intersectAndStore
(K key, Collection<K> otherKeys, K destKey) Intersect sorted sets atkey
andotherKeys
and store result in destinationdestKey
.default reactor.core.publisher.Mono<Long>
intersectAndStore
(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate) Intersect sorted sets atkey
andotherKeys
and store result in destinationdestKey
.reactor.core.publisher.Mono<Long>
intersectAndStore
(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) Intersect sorted sets atkey
andotherKeys
and store result in destinationdestKey
.default reactor.core.publisher.Mono<Long>
intersectAndStore
(K key, K otherKey, K destKey) Intersect sorted sets atkey
andotherKey
and store result in destinationdestKey
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
intersectWithScores
(K key, Collection<K> otherKeys) Intersect sortedsets
.default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
intersectWithScores
(K key, Collection<K> otherKeys, Aggregate aggregate) Intersect sorted sets atkey
andotherKeys
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
intersectWithScores
(K key, Collection<K> otherKeys, Aggregate aggregate, Weights weights) Intersect sortedsets
.default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
intersectWithScores
(K key, K otherKey) Intersect sortedsets
.reactor.core.publisher.Mono<Long>
Count number of elements within sorted set with a value betweenRange.getLowerBound()
andRange.getUpperBound()
applying lexicographical ordering.reactor.core.publisher.Mono<ZSetOperations.TypedTuple<V>>
Remove and return the value with its score having the highest score from sorted set atkey
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
Remove and returncount
values with their score having the highest score from sorted set atkey
.reactor.core.publisher.Mono<ZSetOperations.TypedTuple<V>>
Remove and return the value with its score having the highest score from sorted set atkey
.reactor.core.publisher.Mono<ZSetOperations.TypedTuple<V>>
Remove and return the value with its score having the lowest score from sorted set atkey
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
Remove and returncount
values with their score having the lowest score from sorted set atkey
.reactor.core.publisher.Mono<ZSetOperations.TypedTuple<V>>
Remove and return the value with its score having the lowest score from sorted set atkey
.reactor.core.publisher.Mono<V>
randomMember
(K key) Get random element from set atkey
.reactor.core.publisher.Flux<V>
randomMembers
(K key, long count) Getcount
random elements from set atkey
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
randomMembersWithScore
(K key, long count) Getcount
random elements with their score from set atkey
.reactor.core.publisher.Mono<ZSetOperations.TypedTuple<V>>
randomMemberWithScore
(K key) Get random element with its score from set atkey
.reactor.core.publisher.Flux<V>
Get elements betweenstart
andend
from sorted set.default reactor.core.publisher.Mono<Long>
rangeAndStoreByLex
(K srcKey, K dstKey, Range<String> range) Store all elements atdstKey
with lexicographical ordering from ZSET atsrcKey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Mono<Long>
Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering from ZSET atsrcKey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.default reactor.core.publisher.Mono<Long>
rangeAndStoreByScore
(K srcKey, K dstKey, Range<Double> range) Store all elements atdstKey
with ordering by score from ZSET atsrcKey
with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Mono<Long>
Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with ordering by score from ZSET atsrcKey
with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Flux<V>
rangeByLex
(K key, Range<String> range) Get all elements with lexicographical ordering from ZSET atkey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Flux<V>
rangeByLex
(K key, Range<String> range, Limit limit) Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering from ZSET atkey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Flux<V>
rangeByScore
(K key, Range<Double> range) Get elements where score is betweenmin
andmax
from sorted set.reactor.core.publisher.Flux<V>
rangeByScore
(K key, Range<Double> range, Limit limit) Get elements in range fromstart
toend
where score is betweenmin
andmax
from sorted set.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
rangeByScoreWithScores
(K key, Range<Double> range) reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
rangeByScoreWithScores
(K key, Range<Double> range, Limit limit) reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
rangeWithScores
(K key, Range<Long> range) reactor.core.publisher.Mono<Long>
Determine the index of element withvalue
in a sorted set.reactor.core.publisher.Mono<Long>
Removevalues
from sorted set.reactor.core.publisher.Mono<Long>
removeRange
(K key, Range<Long> range) Remove elements in range betweenstart
andend
from sorted set withkey
.reactor.core.publisher.Mono<Long>
removeRangeByLex
(K key, Range<String> range) Remove elements in range from sorted set withkey
.reactor.core.publisher.Mono<Long>
removeRangeByScore
(K key, Range<Double> range) Remove elements with scores betweenmin
andmax
from sorted set withkey
.reactor.core.publisher.Flux<V>
reverseRange
(K key, Range<Long> range) Get elements in range fromstart
toend
from sorted set ordered from high to low.default reactor.core.publisher.Mono<Long>
reverseRangeAndStoreByLex
(K srcKey, K dstKey, Range<String> range) Store all elements atdstKey
with reverse lexicographical ordering from ZSET atsrcKey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Mono<Long>
Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering from ZSET atsrcKey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.default reactor.core.publisher.Mono<Long>
reverseRangeAndStoreByScore
(K srcKey, K dstKey, Range<Double> range) Store all elements atdstKey
with reverse ordering by score from ZSET atsrcKey
with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Mono<Long>
Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse ordering by score from ZSET atsrcKey
with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Flux<V>
reverseRangeByLex
(K key, Range<String> range) Get all elements with reverse lexicographical ordering from ZSET atkey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Flux<V>
reverseRangeByLex
(K key, Range<String> range, Limit limit) Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering from ZSET atkey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.reactor.core.publisher.Flux<V>
reverseRangeByScore
(K key, Range<Double> range) Get elements where score is betweenmin
andmax
from sorted set ordered from high to low.reactor.core.publisher.Flux<V>
reverseRangeByScore
(K key, Range<Double> range, Limit limit) Get elements in range fromstart
toend
where score is betweenmin
andmax
from sorted set ordered high -> low.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
reverseRangeByScoreWithScores
(K key, Range<Double> range) reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
reverseRangeByScoreWithScores
(K key, Range<Double> range, Limit limit) Get set ofTuple
in range fromstart
toend
where score is betweenmin
andmax
from sorted set ordered high -> low.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
reverseRangeWithScores
(K key, Range<Long> range) reactor.core.publisher.Mono<Long>
reverseRank
(K key, Object o) Determine the index of element withvalue
in a sorted set when scored high to low.default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
Use aFlux
to iterate over entries in the sorted set atkey
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
scan
(K key, ScanOptions options) reactor.core.publisher.Mono<Double>
Get the score of element withvalue
from sorted set with keykey
.Get the scores of elements withvalues
from sorted set with keykey
.reactor.core.publisher.Mono<Long>
Returns the number of elements of the sorted set stored with givenkey
.reactor.core.publisher.Flux<V>
union
(K key, Collection<K> otherKeys) Union sortedsets
.default reactor.core.publisher.Flux<V>
Union sortedsets
.reactor.core.publisher.Mono<Long>
unionAndStore
(K key, Collection<K> otherKeys, K destKey) Union sorted sets atkey
andotherKeys
and store result in destinationdestKey
.default reactor.core.publisher.Mono<Long>
unionAndStore
(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate) Union sorted sets atkey
andotherKeys
and store result in destinationdestKey
.reactor.core.publisher.Mono<Long>
unionAndStore
(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) Union sorted sets atkey
andotherKeys
and store result in destinationdestKey
.reactor.core.publisher.Mono<Long>
unionAndStore
(K key, K otherKey, K destKey) Union sorted sets atkey
andotherKeys
and store result in destinationdestKey
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
unionWithScores
(K key, Collection<K> otherKeys) Union sortedsets
.default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
unionWithScores
(K key, Collection<K> otherKeys, Aggregate aggregate) Union sorted sets atkey
andotherKeys
.reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
unionWithScores
(K key, Collection<K> otherKeys, Aggregate aggregate, Weights weights) Union sortedsets
.default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>>
unionWithScores
(K key, K otherKey) Union sortedsets
.
-
Method Details
-
add
Addvalue
to a sorted set atkey
, or update itsscore
if it already exists.- Parameters:
key
- must not be null.value
- the value.score
- the score.- Returns:
- See Also:
-
addAll
reactor.core.publisher.Mono<Long> addAll(K key, Collection<? extends ZSetOperations.TypedTuple<V>> tuples) Addtuples
to a sorted set atkey
, or update their score if it already exists.- Parameters:
key
- must not be null.tuples
- the score.- Returns:
- See Also:
-
remove
Removevalues
from sorted set. Return number of removed elements.- Parameters:
key
- must not be null.values
- must not be null.- Returns:
- See Also:
-
incrementScore
Increment the score of element withvalue
in sorted set byincrement
.- Parameters:
key
- must not be null.value
- the value.delta
- the delta to add. Can be negative.- Returns:
- See Also:
-
randomMember
Get random element from set atkey
.- Parameters:
key
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
distinctRandomMembers
Getcount
distinct random elements from set atkey
.- Parameters:
key
- must not be null.count
- number of members to return.- Returns:
- Throws:
IllegalArgumentException
- if count is negative.- Since:
- 2.6
- See Also:
-
randomMembers
Getcount
random elements from set atkey
.- Parameters:
key
- must not be null.count
- number of members to return.- Returns:
- Throws:
IllegalArgumentException
- if count is negative.- Since:
- 2.6
- See Also:
-
randomMemberWithScore
Get random element with its score from set atkey
.- Parameters:
key
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
distinctRandomMembersWithScore
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> distinctRandomMembersWithScore(K key, long count) Getcount
distinct random elements with their score from set atkey
.- Parameters:
key
- must not be null.count
- number of members to return.- Returns:
- Throws:
IllegalArgumentException
- if count is negative.- Since:
- 2.6
- See Also:
-
randomMembersWithScore
Getcount
random elements with their score from set atkey
.- Parameters:
key
- must not be null.count
- number of members to return.- Returns:
- Throws:
IllegalArgumentException
- if count is negative.- Since:
- 2.6
- See Also:
-
rank
Determine the index of element withvalue
in a sorted set.- Parameters:
key
- must not be null.o
- the value.- Returns:
- See Also:
-
reverseRank
Determine the index of element withvalue
in a sorted set when scored high to low.- Parameters:
key
- must not be null.o
- the value.- Returns:
- See Also:
-
range
Get elements betweenstart
andend
from sorted set.- Parameters:
key
- must not be null.range
- must not be null.- Returns:
- See Also:
-
rangeWithScores
- Parameters:
key
- must not be null.range
- must not be null.- Returns:
- See Also:
-
rangeByScore
Get elements where score is betweenmin
andmax
from sorted set.- Parameters:
key
- must not be null.range
- must not be null.- Returns:
- See Also:
-
rangeByScoreWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> rangeByScoreWithScores(K key, Range<Double> range) - Parameters:
key
- must not be null.range
- must not be null.- Returns:
- See Also:
-
rangeByScore
Get elements in range fromstart
toend
where score is betweenmin
andmax
from sorted set.- Parameters:
key
- must not be null.range
-limit
-- Returns:
- See Also:
-
rangeByScoreWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> rangeByScoreWithScores(K key, Range<Double> range, Limit limit) - Parameters:
key
-range
-limit
-- Returns:
- See Also:
-
reverseRange
Get elements in range fromstart
toend
from sorted set ordered from high to low.- Parameters:
key
- must not be null.range
-- Returns:
- See Also:
-
reverseRangeWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> reverseRangeWithScores(K key, Range<Long> range) - Parameters:
key
- must not be null.range
-- Returns:
- See Also:
-
reverseRangeByScore
Get elements where score is betweenmin
andmax
from sorted set ordered from high to low.- Parameters:
key
- must not be null.range
-- Returns:
- See Also:
-
reverseRangeByScoreWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> reverseRangeByScoreWithScores(K key, Range<Double> range) - Parameters:
key
- must not be null.range
-- Returns:
- See Also:
-
reverseRangeByScore
Get elements in range fromstart
toend
where score is betweenmin
andmax
from sorted set ordered high -> low.- Parameters:
key
- must not be null.range
-limit
-- Returns:
- See Also:
-
reverseRangeByScoreWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> reverseRangeByScoreWithScores(K key, Range<Double> range, Limit limit) Get set ofTuple
in range fromstart
toend
where score is betweenmin
andmax
from sorted set ordered high -> low.- Parameters:
key
- must not be null.range
-limit
-- Returns:
- See Also:
-
rangeAndStoreByLex
default reactor.core.publisher.Mono<Long> rangeAndStoreByLex(K srcKey, K dstKey, Range<String> range) Store all elements atdstKey
with lexicographical ordering from ZSET atsrcKey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
srcKey
- must not be null.dstKey
- must not be null.range
- must not be null.- Returns:
- the number of stored elements.
- Since:
- 3.0
- See Also:
-
rangeAndStoreByLex
reactor.core.publisher.Mono<Long> rangeAndStoreByLex(K srcKey, K dstKey, Range<String> range, Limit limit) Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering from ZSET atsrcKey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
srcKey
- must not be null.dstKey
- must not be null.range
- must not be null.limit
- must not be null.- Returns:
- the number of stored elements.
- Since:
- 3.0
- See Also:
-
reverseRangeAndStoreByLex
default reactor.core.publisher.Mono<Long> reverseRangeAndStoreByLex(K srcKey, K dstKey, Range<String> range) Store all elements atdstKey
with reverse lexicographical ordering from ZSET atsrcKey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
srcKey
- must not be null.dstKey
- must not be null.range
- must not be null.- Returns:
- the number of stored elements.
- Since:
- 3.0
- See Also:
-
reverseRangeAndStoreByLex
reactor.core.publisher.Mono<Long> reverseRangeAndStoreByLex(K srcKey, K dstKey, Range<String> range, Limit limit) Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering from ZSET atsrcKey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
srcKey
- must not be null.dstKey
- must not be null.range
- must not be null.limit
- must not be null.- Returns:
- the number of stored elements.
- Since:
- 3.0
- See Also:
-
rangeAndStoreByScore
@Nullable default reactor.core.publisher.Mono<Long> rangeAndStoreByScore(K srcKey, K dstKey, Range<Double> range) Store all elements atdstKey
with ordering by score from ZSET atsrcKey
with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
srcKey
- must not be null.dstKey
- must not be null.range
- must not be null.- Returns:
- the number of stored elements.
- Since:
- 3.0
- See Also:
-
rangeAndStoreByScore
reactor.core.publisher.Mono<Long> rangeAndStoreByScore(K srcKey, K dstKey, Range<Double> range, Limit limit) Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with ordering by score from ZSET atsrcKey
with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
srcKey
- must not be null.dstKey
- must not be null.range
- must not be null.limit
- must not be null.- Returns:
- the number of stored elements.
- Since:
- 3.0
- See Also:
-
reverseRangeAndStoreByScore
default reactor.core.publisher.Mono<Long> reverseRangeAndStoreByScore(K srcKey, K dstKey, Range<Double> range) Store all elements atdstKey
with reverse ordering by score from ZSET atsrcKey
with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
srcKey
- must not be null.dstKey
- must not be null.range
- must not be null.- Returns:
- the number of stored elements.
- Since:
- 3.0
- See Also:
-
reverseRangeAndStoreByScore
reactor.core.publisher.Mono<Long> reverseRangeAndStoreByScore(K srcKey, K dstKey, Range<Double> range, Limit limit) Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse ordering by score from ZSET atsrcKey
with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
srcKey
- must not be null.dstKey
- must not be null.range
- must not be null.limit
- must not be null.- Returns:
- the number of stored elements.
- Since:
- 3.0
- See Also:
-
scan
Use aFlux
to iterate over entries in the sorted set atkey
. The resultingFlux
acts as a cursor and issuesZSCAN
commands itself as long as the subscriber signals demand.- Parameters:
key
- must not be null.- Returns:
- the
Flux
emitting the values one by one or anempty Flux
if none exist. - Throws:
IllegalArgumentException
- when givenkey
is null.- Since:
- 2.1
- See Also:
-
scan
Use aFlux
to iterate over entries in the sorted set atkey
givenScanOptions
. The resultingFlux
acts as a cursor and issuesZSCAN
commands itself as long as the subscriber signals demand.- Parameters:
key
- must not be null.options
- must not be null. UseScanOptions.NONE
instead.- Returns:
- the
Flux
emitting the values one by one or anempty Flux
if none exist. - Throws:
IllegalArgumentException
- when one of the required arguments is null.- Since:
- 2.1
- See Also:
-
count
Count number of elements within sorted set with scores betweenmin
andmax
.- Parameters:
key
- must not be null.range
-- Returns:
- See Also:
-
lexCount
Count number of elements within sorted set with a value betweenRange.getLowerBound()
andRange.getUpperBound()
applying lexicographical ordering.- Parameters:
key
- must not be null.range
- must not be null- Returns:
- Since:
- 2.4
- See Also:
-
popMin
Remove and return the value with its score having the lowest score from sorted set atkey
.- Parameters:
key
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
popMin
Remove and returncount
values with their score having the lowest score from sorted set atkey
.- Parameters:
key
- must not be null.count
- number of elements to pop.- Returns:
- Since:
- 2.6
- See Also:
-
popMin
Remove and return the value with its score having the lowest score from sorted set atkey
.- Parameters:
key
- must not be null.timeout
- maximal duration to wait until an entry in the list atkey
is available. Must be eitherDuration.ZERO
or greater {@link 1 second}, must not be null. A timeout of zero can be used to wait indefinitely. Durations between zero and one second are not supported.- Returns:
- Since:
- 2.6
- See Also:
-
popMax
Remove and return the value with its score having the highest score from sorted set atkey
.- Parameters:
key
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
popMax
Remove and returncount
values with their score having the highest score from sorted set atkey
.- Parameters:
key
- must not be null.count
- number of elements to pop.- Returns:
- Since:
- 2.6
- See Also:
-
popMax
Remove and return the value with its score having the highest score from sorted set atkey
.- Parameters:
key
- must not be null.timeout
- maximal duration to wait until an entry in the list atkey
is available. Must be eitherDuration.ZERO
or greater {@link 1 second}, must not be null. A timeout of zero can be used to wait indefinitely. Durations between zero and one second are not supported.- Returns:
- Since:
- 2.6
- See Also:
-
size
Returns the number of elements of the sorted set stored with givenkey
.- Parameters:
key
-- Returns:
- See Also:
-
score
Get the score of element withvalue
from sorted set with keykey
.- Parameters:
key
- must not be null.o
- the value.- Returns:
- See Also:
-
score
Get the scores of elements withvalues
from sorted set with keykey
.- Parameters:
key
- must not be null.o
- the values.- Returns:
- Since:
- 2.6
- See Also:
-
removeRange
Remove elements in range betweenstart
andend
from sorted set withkey
.- Parameters:
key
- must not be null.range
-- Returns:
- See Also:
-
removeRangeByLex
Remove elements in range from sorted set withkey
.- Parameters:
key
- must not be null.range
- must not be null.- Returns:
- a
Mono
emitting the number or removed elements. - Since:
- 2.5
- See Also:
-
removeRangeByScore
Remove elements with scores betweenmin
andmax
from sorted set withkey
.- Parameters:
key
- must not be null.range
-- Returns:
- See Also:
-
difference
Diff sortedsets
.- Parameters:
key
- must not be null.otherKey
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
difference
Diff sortedsets
.- Parameters:
key
- must not be null.otherKeys
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
differenceWithScores
default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> differenceWithScores(K key, K otherKey) Diff sortedsets
.- Parameters:
key
- must not be null.otherKey
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
differenceWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> differenceWithScores(K key, Collection<K> otherKeys) Diff sortedsets
.- Parameters:
key
- must not be null.otherKeys
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
differenceAndStore
Diff sortedsets
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKey
- must not be null.destKey
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
differenceAndStore
Diff sortedsets
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKeys
- must not be null.destKey
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
intersect
Intersect sortedsets
.- Parameters:
key
- must not be null.otherKey
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
intersect
Intersect sortedsets
.- Parameters:
key
- must not be null.otherKeys
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
intersectWithScores
default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> intersectWithScores(K key, K otherKey) Intersect sortedsets
.- Parameters:
key
- must not be null.otherKey
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
intersectWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> intersectWithScores(K key, Collection<K> otherKeys) Intersect sortedsets
.- Parameters:
key
- must not be null.otherKeys
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
intersectWithScores
default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> intersectWithScores(K key, Collection<K> otherKeys, Aggregate aggregate) Intersect sorted sets atkey
andotherKeys
.- Parameters:
key
- must not be null.otherKeys
- must not be null.aggregate
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
intersectWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> intersectWithScores(K key, Collection<K> otherKeys, Aggregate aggregate, Weights weights) Intersect sortedsets
.- Parameters:
key
- must not be null.otherKeys
- must not be null.aggregate
- must not be null.weights
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
intersectAndStore
Intersect sorted sets atkey
andotherKey
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKey
- must not be null.destKey
- must not be null.- Returns:
- See Also:
-
intersectAndStore
Intersect sorted sets atkey
andotherKeys
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKeys
- must not be null.destKey
- must not be null.- Returns:
- See Also:
-
intersectAndStore
default reactor.core.publisher.Mono<Long> intersectAndStore(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate) Intersect sorted sets atkey
andotherKeys
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKeys
- must not be null.destKey
- must not be null.aggregate
- must not be null.- Returns:
- Since:
- 2.1
- See Also:
-
intersectAndStore
reactor.core.publisher.Mono<Long> intersectAndStore(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) Intersect sorted sets atkey
andotherKeys
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKeys
- must not be null.destKey
- must not be null.aggregate
- must not be null.weights
- must not be null.- Returns:
- Since:
- 2.1
- See Also:
-
union
Union sortedsets
.- Parameters:
key
- must not be null.otherKey
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
union
Union sortedsets
.- Parameters:
key
- must not be null.otherKeys
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
unionWithScores
default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> unionWithScores(K key, K otherKey) Union sortedsets
.- Parameters:
key
- must not be null.otherKey
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
unionWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> unionWithScores(K key, Collection<K> otherKeys) Union sortedsets
.- Parameters:
key
- must not be null.otherKeys
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
unionWithScores
default reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> unionWithScores(K key, Collection<K> otherKeys, Aggregate aggregate) Union sorted sets atkey
andotherKeys
.- Parameters:
key
- must not be null.otherKeys
- must not be null.aggregate
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
unionWithScores
reactor.core.publisher.Flux<ZSetOperations.TypedTuple<V>> unionWithScores(K key, Collection<K> otherKeys, Aggregate aggregate, Weights weights) Union sortedsets
.- Parameters:
key
- must not be null.otherKeys
- must not be null.aggregate
- must not be null.weights
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
unionAndStore
Union sorted sets atkey
andotherKeys
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKey
- must not be null.destKey
- must not be null.- Returns:
- See Also:
-
unionAndStore
Union sorted sets atkey
andotherKeys
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKeys
- must not be null.destKey
- must not be null.- Returns:
- See Also:
-
unionAndStore
default reactor.core.publisher.Mono<Long> unionAndStore(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate) Union sorted sets atkey
andotherKeys
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKeys
- must not be null.destKey
- must not be null.aggregate
- must not be null.- Returns:
- Since:
- 2.1
- See Also:
-
unionAndStore
reactor.core.publisher.Mono<Long> unionAndStore(K key, Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) Union sorted sets atkey
andotherKeys
and store result in destinationdestKey
.- Parameters:
key
- must not be null.otherKeys
- must not be null.destKey
- must not be null.aggregate
- must not be null.weights
- must not be null.- Returns:
- Since:
- 2.1
- See Also:
-
rangeByLex
Get all elements with lexicographical ordering from ZSET atkey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
key
- must not be null.range
- must not be null.- See Also:
-
rangeByLex
Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering from ZSET atkey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
key
- must not be nullrange
- must not be null.limit
- can be null.- Returns:
- See Also:
-
reverseRangeByLex
Get all elements with reverse lexicographical ordering from ZSET atkey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
key
- must not be null.range
- must not be null.- See Also:
-
reverseRangeByLex
Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering from ZSET atkey
with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
key
- must not be nullrange
- must not be null.limit
- can be null.- Returns:
- See Also:
-
delete
Removes the given key.- Parameters:
key
- must not be null.
-