Interface RScoredSortedSetReactive<V>
-
- Type Parameters:
V- value type
- All Superinterfaces:
RExpirableReactive,RObjectReactive,RSortableReactive<Set<V>>
- All Known Subinterfaces:
RGeoReactive<V>,RLexSortedSetReactive
public interface RScoredSortedSetReactive<V> extends RExpirableReactive, RSortableReactive<Set<V>>
Reactive interface for SortedSet object- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Boolean>add(double score, V object)Adds element to this set, overrides previous score if it has been already added.reactor.core.publisher.Mono<Integer>addAll(Map<V,Double> objects)Adds all elements contained in the specified map to this sorted set.reactor.core.publisher.Mono<Integer>addAndGetRank(double score, V object)Adds element to this set, overrides previous score if it has been already added.reactor.core.publisher.Mono<Integer>addAndGetRevRank(double score, V object)Adds element to this set, overrides previous score if it has been already added.reactor.core.publisher.Mono<List<Integer>>addAndGetRevRank(Map<? extends V,Double> map)Adds elements to this set, overrides previous score if it has been already added.reactor.core.publisher.Mono<Boolean>addIfExists(double score, V object)Adds element to this set only if it's already exists.reactor.core.publisher.Mono<Boolean>addIfGreater(double score, V object)Adds element to this set only if new score greater than current score of existed element.reactor.core.publisher.Mono<Boolean>addIfLess(double score, V object)Adds element to this set only if new score less than current score of existed element.reactor.core.publisher.Mono<Double>addScore(V element, Number value)Increases score of specified element by value.reactor.core.publisher.Mono<Integer>addScoreAndGetRank(V object, Number value)Adds score to element and returns its rankreactor.core.publisher.Mono<Integer>addScoreAndGetRevRank(V object, Number value)Adds score to element and returns its reverse rankreactor.core.publisher.Mono<Boolean>contains(V o)Returnstrueif this sorted set contains encoded state of the specified element.reactor.core.publisher.Mono<Boolean>containsAll(Collection<?> c)Returnstrueif this sorted set contains all of the elements in encoded state in the specified collection.reactor.core.publisher.Mono<Integer>count(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)Returns the number of elements with a score betweenstartScoreandendScore.reactor.core.publisher.Mono<Integer>diff(String... names)Diff provided ScoredSortedSets and store result to current ScoredSortedSetreactor.core.publisher.Mono<Collection<ScoredEntry<V>>>entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)Returns all entries (value and its score) betweenstartScoreandendScore.reactor.core.publisher.Mono<Collection<ScoredEntry<V>>>entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)Returns all entries (value and its score) betweenstartScoreandendScore.reactor.core.publisher.Mono<Collection<ScoredEntry<V>>>entryRange(int startIndex, int endIndex)Returns entries (value and its score) by rank range.reactor.core.publisher.Mono<Collection<ScoredEntry<V>>>entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)Returns all entries (value and its score) betweenstartScoreandendScorein reversed order.reactor.core.publisher.Mono<Collection<ScoredEntry<V>>>entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)Returns all entries (value and its score) betweenstartScoreandendScorein reversed order.reactor.core.publisher.Mono<Collection<ScoredEntry<V>>>entryRangeReversed(int startIndex, int endIndex)Returns entries (value and its score) by rank range in reverse order.reactor.core.publisher.Mono<V>first()Returns the head element ornullif this sorted set is empty.reactor.core.publisher.Mono<Double>firstScore()Returns score of the head element or returnsnullif this sorted set is empty.reactor.core.publisher.Mono<List<Double>>getScore(Collection<V> elements)Returns scores of elements.reactor.core.publisher.Mono<Double>getScore(V o)Returns score of element ornullif it doesn't exist.reactor.core.publisher.Mono<Integer>intersection(String... names)Intersect provided ScoredSortedSets and store result to current ScoredSortedSetreactor.core.publisher.Mono<Integer>intersection(Map<String,Double> nameWithWeight)Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetreactor.core.publisher.Mono<Integer>intersection(RScoredSortedSet.Aggregate aggregate, String... names)Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetreactor.core.publisher.Mono<Integer>intersection(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetreactor.core.publisher.Flux<V>iterator()reactor.core.publisher.Flux<V>iterator(int count)Returns an iterator over elements in this set.reactor.core.publisher.Flux<V>iterator(String pattern)Returns an iterator over elements in this set.reactor.core.publisher.Flux<V>iterator(String pattern, int count)Returns an iterator over elements in this set.reactor.core.publisher.Mono<V>last()Returns the tail element ornullif this sorted set is empty.reactor.core.publisher.Mono<Double>lastScore()Returns score of the tail element or returnsnullif this sorted set is empty.reactor.core.publisher.Mono<V>pollFirst()Removes and returns the head element ornullif this sorted set is empty.reactor.core.publisher.Mono<Collection<V>>pollFirst(int count)Removes and returns the head elements of this sorted set.reactor.core.publisher.Mono<V>pollFirst(long timeout, TimeUnit unit)Removes and returns the head element ornullif this sorted set is empty.reactor.core.publisher.Mono<V>pollFirstFromAny(long timeout, TimeUnit unit, String... queueNames)Removes and returns first available head element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.reactor.core.publisher.Mono<V>pollLast()Removes and returns the tail element ornullif this sorted set is empty.reactor.core.publisher.Mono<Collection<V>>pollLast(int count)Removes and returns the tail elements of this sorted set.reactor.core.publisher.Mono<V>pollLast(long timeout, TimeUnit unit)Removes and returns the tail element ornullif this sorted set is empty.reactor.core.publisher.Mono<V>pollLastFromAny(long timeout, TimeUnit unit, String... queueNames)Removes and returns first available tail element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.reactor.core.publisher.Mono<V>random()Returns random element from this sorted setreactor.core.publisher.Mono<Collection<V>>random(int count)Returns random elements from this sorted set limited bycountreactor.core.publisher.Mono<Map<V,Double>>randomEntries(int count)Returns random entries from this sorted set limited bycount.reactor.core.publisher.Mono<Integer>rangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)Stores to defined ScoredSortedSet values betweenstartScoreandendScore.reactor.core.publisher.Mono<Integer>rangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)Stores to defined ScoredSortedSet values betweenstartScoreandendScore.reactor.core.publisher.Mono<Integer>rangeTo(String destName, int startIndex, int endIndex)Stores to defined ScoredSortedSet values by rank range.reactor.core.publisher.Mono<Integer>rank(V o)Returns rank of value, with the scores ordered from low to high.reactor.core.publisher.Mono<Collection<V>>readAll()Read all values at once.reactor.core.publisher.Mono<Collection<V>>readDiff(String... names)Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.reactor.core.publisher.Mono<Collection<V>>readIntersection(String... names)Intersect provided ScoredSortedSets with current ScoredSortedSet without state changereactor.core.publisher.Mono<Collection<V>>readIntersection(Map<String,Double> nameWithWeight)Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state changereactor.core.publisher.Mono<Collection<V>>readIntersection(RScoredSortedSet.Aggregate aggregate, String... names)Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state changereactor.core.publisher.Mono<Collection<V>>readIntersection(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state changereactor.core.publisher.Mono<Collection<V>>readUnion(String... names)Union ScoredSortedSets specified by name with current ScoredSortedSet without state change.reactor.core.publisher.Mono<Collection<V>>readUnion(Map<String,Double> nameWithWeight)Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.reactor.core.publisher.Mono<Collection<V>>readUnion(RScoredSortedSet.Aggregate aggregate, String... names)Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.reactor.core.publisher.Mono<Collection<V>>readUnion(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changereactor.core.publisher.Mono<Boolean>remove(V object)Removes a single instance of the specified element from this sorted set, if it is present.reactor.core.publisher.Mono<Boolean>removeAll(Collection<?> c)Removes all of this sorted set's elements that are also contained in the specified collection.reactor.core.publisher.Mono<Integer>removeRangeByRank(int startIndex, int endIndex)Removes values by rank range.reactor.core.publisher.Mono<Integer>removeRangeByScore(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)Removes values by score range.reactor.core.publisher.Mono<Boolean>retainAll(Collection<?> c)Retains only the elements in this sorted set that are contained in the specified collection.reactor.core.publisher.Mono<Integer>revRangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)Stores to defined ScoredSortedSet values in reversed order betweenstartScoreandendScore.reactor.core.publisher.Mono<Integer>revRangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)Stores to defined ScoredSortedSet values in reversed order betweenstartScoreandendScore.reactor.core.publisher.Mono<Integer>revRangeTo(String destName, int startIndex, int endIndex)Stores to defined ScoredSortedSet values in reversed order by rank range.reactor.core.publisher.Mono<List<Integer>>revRank(Collection<V> elements)Returns ranks of elements, with the scores ordered from high to low.reactor.core.publisher.Mono<Integer>revRank(V o)Returns rank of value, with the scores ordered from high to low.reactor.core.publisher.Mono<Integer>size()Returns size of this set.reactor.core.publisher.Mono<V>takeFirst()Removes and returns the head element waiting if necessary for an element to become available.reactor.core.publisher.Flux<V>takeFirstElements()Retrieves and removes continues stream of elements from the head of this queue.reactor.core.publisher.Mono<V>takeLast()Removes and returns the tail element waiting if necessary for an element to become available.reactor.core.publisher.Flux<V>takeLastElements()Retrieves and removes continues stream of elements from the tail of this queue.reactor.core.publisher.Mono<Boolean>tryAdd(double score, V object)Adds element to this set only if has not been added before.reactor.core.publisher.Mono<Integer>union(String... names)Union provided ScoredSortedSets and store result to current ScoredSortedSetreactor.core.publisher.Mono<Integer>union(Map<String,Double> nameWithWeight)Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetreactor.core.publisher.Mono<Integer>union(RScoredSortedSet.Aggregate aggregate, String... names)Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetreactor.core.publisher.Mono<Integer>union(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetreactor.core.publisher.Mono<Collection<V>>valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)Returns all values betweenstartScoreandendScore.reactor.core.publisher.Mono<Collection<V>>valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)Returns all values betweenstartScoreandendScore.reactor.core.publisher.Mono<Collection<V>>valueRange(int startIndex, int endIndex)Returns values by rank range.reactor.core.publisher.Mono<Collection<V>>valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)Returns all values betweenstartScoreandendScorein reversed order.reactor.core.publisher.Mono<Collection<V>>valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)Returns all values betweenstartScoreandendScorein reversed order.reactor.core.publisher.Mono<Collection<V>>valueRangeReversed(int startIndex, int endIndex)Returns values by rank range in reverse order.-
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectReactive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Methods inherited from interface org.redisson.api.RSortableReactive
readSorted, readSorted, readSorted, readSorted, readSorted, readSorted, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
-
-
-
-
Method Detail
-
pollLastFromAny
reactor.core.publisher.Mono<V> pollLastFromAny(long timeout, TimeUnit unit, String... queueNames)
Removes and returns first available tail element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.Requires Redis 5.0.0 and higher.
- Parameters:
queueNames- - names of queuetimeout- how long to wait before giving up, in units ofunitunit- aTimeUnitdetermining how to interpret thetimeoutparameter- Returns:
- the tail element, or
nullif all sorted sets are empty
-
pollFirstFromAny
reactor.core.publisher.Mono<V> pollFirstFromAny(long timeout, TimeUnit unit, String... queueNames)
Removes and returns first available head element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.Requires Redis 5.0.0 and higher.
- Parameters:
queueNames- - names of queuetimeout- how long to wait before giving up, in units ofunitunit- aTimeUnitdetermining how to interpret thetimeoutparameter- Returns:
- the head element, or
nullif all sorted sets are empty
-
pollFirst
reactor.core.publisher.Mono<V> pollFirst(long timeout, TimeUnit unit)
Removes and returns the head element ornullif this sorted set is empty.Requires Redis 5.0.0 and higher.
- Parameters:
timeout- how long to wait before giving up, in units ofunitunit- aTimeUnitdetermining how to interpret thetimeoutparameter- Returns:
- the head element,
or
nullif this sorted set is empty
-
pollLast
reactor.core.publisher.Mono<V> pollLast(long timeout, TimeUnit unit)
Removes and returns the tail element ornullif this sorted set is empty.Requires Redis 5.0.0 and higher.
- Parameters:
timeout- how long to wait before giving up, in units ofunitunit- aTimeUnitdetermining how to interpret thetimeoutparameter- Returns:
- the tail element or
nullif this sorted set is empty
-
pollFirst
reactor.core.publisher.Mono<Collection<V>> pollFirst(int count)
Removes and returns the head elements of this sorted set.- Parameters:
count- - elements amount- Returns:
- the head elements of this sorted set
-
pollLast
reactor.core.publisher.Mono<Collection<V>> pollLast(int count)
Removes and returns the tail elements of this sorted set.- Parameters:
count- - elements amount- Returns:
- the tail elements of this sorted set
-
pollFirst
reactor.core.publisher.Mono<V> pollFirst()
Removes and returns the head element ornullif this sorted set is empty.- Returns:
- the head element,
or
nullif this sorted set is empty
-
pollLast
reactor.core.publisher.Mono<V> pollLast()
Removes and returns the tail element ornullif this sorted set is empty.- Returns:
- the tail element or
nullif this sorted set is empty
-
first
reactor.core.publisher.Mono<V> first()
Returns the head element ornullif this sorted set is empty.- Returns:
- the head element or
nullif this sorted set is empty
-
last
reactor.core.publisher.Mono<V> last()
Returns the tail element ornullif this sorted set is empty.- Returns:
- the tail element or
nullif this sorted set is empty
-
firstScore
reactor.core.publisher.Mono<Double> firstScore()
Returns score of the head element or returnsnullif this sorted set is empty.- Returns:
- the tail element or
nullif this sorted set is empty
-
lastScore
reactor.core.publisher.Mono<Double> lastScore()
Returns score of the tail element or returnsnullif this sorted set is empty.- Returns:
- the tail element or
nullif this sorted set is empty
-
random
reactor.core.publisher.Mono<V> random()
Returns random element from this sorted setRequires Redis 6.2.0 and higher.
- Returns:
- random element
-
random
reactor.core.publisher.Mono<Collection<V>> random(int count)
Returns random elements from this sorted set limited bycountRequires Redis 6.2.0 and higher.
- Parameters:
count- - values amount to return- Returns:
- random elements
-
randomEntries
reactor.core.publisher.Mono<Map<V,Double>> randomEntries(int count)
Returns random entries from this sorted set limited bycount. Each map entry uses element as key and score as value.Requires Redis 6.2.0 and higher.
- Parameters:
count- - entries amount to return- Returns:
- random entries
-
iterator
reactor.core.publisher.Flux<V> iterator(String pattern)
Returns an iterator over elements in this set. Ifpatternis not null then only elements match this pattern are loaded.- Parameters:
pattern- - search pattern- Returns:
- iterator
-
iterator
reactor.core.publisher.Flux<V> iterator(int count)
Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined bycountparam.- Parameters:
count- - size of elements batch- Returns:
- iterator
-
iterator
reactor.core.publisher.Flux<V> iterator(String pattern, int count)
Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined bycountparam. If pattern is not null then only elements match this pattern are loaded.- Parameters:
pattern- - search patterncount- - size of elements batch- Returns:
- iterator
-
iterator
reactor.core.publisher.Flux<V> iterator()
-
removeRangeByScore
reactor.core.publisher.Mono<Integer> removeRangeByScore(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Removes values by score range.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusive- Returns:
- number of elements removed
-
removeRangeByRank
reactor.core.publisher.Mono<Integer> removeRangeByRank(int startIndex, int endIndex)
Removes values by rank range. Indexes are zero based.-1means the highest score,-2means the second highest score.- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- number of elements removed
-
rank
reactor.core.publisher.Mono<Integer> rank(V o)
Returns rank of value, with the scores ordered from low to high.- Parameters:
o- - object- Returns:
- rank or
nullif value does not exist
-
revRank
reactor.core.publisher.Mono<Integer> revRank(V o)
Returns rank of value, with the scores ordered from high to low.- Parameters:
o- - object- Returns:
- rank or
nullif value does not exist
-
revRank
reactor.core.publisher.Mono<List<Integer>> revRank(Collection<V> elements)
Returns ranks of elements, with the scores ordered from high to low.- Parameters:
elements- - elements- Returns:
- ranks or
nullif value does not exist
-
getScore
reactor.core.publisher.Mono<Double> getScore(V o)
Returns score of element ornullif it doesn't exist.- Parameters:
o- - element- Returns:
- score
-
getScore
reactor.core.publisher.Mono<List<Double>> getScore(Collection<V> elements)
Returns scores of elements.- Parameters:
elements- - elements- Returns:
- element scores
-
add
reactor.core.publisher.Mono<Boolean> add(double score, V object)
Adds element to this set, overrides previous score if it has been already added.- Parameters:
score- - object scoreobject- - object itself- Returns:
trueif element has added andfalseif not.
-
addAll
reactor.core.publisher.Mono<Integer> addAll(Map<V,Double> objects)
Adds all elements contained in the specified map to this sorted set. Map contains of score mapped by object.- Parameters:
objects- - map of elements to add- Returns:
- amount of added elements, not including already existing in this sorted set
-
addAndGetRank
reactor.core.publisher.Mono<Integer> addAndGetRank(double score, V object)
Adds element to this set, overrides previous score if it has been already added. Finally return the rank of the item- Parameters:
score- - object scoreobject- - object itself- Returns:
- rank
-
addAndGetRevRank
reactor.core.publisher.Mono<Integer> addAndGetRevRank(double score, V object)
Adds element to this set, overrides previous score if it has been already added. Finally return the reverse rank of the item- Parameters:
score- - object scoreobject- - object itself- Returns:
- reverse rank
-
addAndGetRevRank
reactor.core.publisher.Mono<List<Integer>> addAndGetRevRank(Map<? extends V,Double> map)
Adds elements to this set, overrides previous score if it has been already added. Finally returns reverse rank list of the items- Parameters:
map- - map of object and scores, make sure to use an ordered map- Returns:
- collection of reverse ranks
-
tryAdd
reactor.core.publisher.Mono<Boolean> tryAdd(double score, V object)
Adds element to this set only if has not been added before.Requires Redis 3.0.2 and higher.
- Parameters:
score- - object scoreobject- - object itself- Returns:
trueif element has added andfalseif not.
-
addIfExists
reactor.core.publisher.Mono<Boolean> addIfExists(double score, V object)
Adds element to this set only if it's already exists.Requires Redis 3.0.2 and higher.
- Parameters:
score- - object scoreobject- - object itself- Returns:
trueif element added andfalseif not.
-
addIfLess
reactor.core.publisher.Mono<Boolean> addIfLess(double score, V object)
Adds element to this set only if new score less than current score of existed element.Requires Redis 6.2.0 and higher.
- Parameters:
score- - object scoreobject- - object itself- Returns:
trueif element added andfalseif not.
-
addIfGreater
reactor.core.publisher.Mono<Boolean> addIfGreater(double score, V object)
Adds element to this set only if new score greater than current score of existed element.Requires Redis 6.2.0 and higher.
- Parameters:
score- - object scoreobject- - object itself- Returns:
trueif element added andfalseif not.
-
remove
reactor.core.publisher.Mono<Boolean> remove(V object)
Removes a single instance of the specified element from this sorted set, if it is present.- Parameters:
object- element to be removed from this sorted set, if present- Returns:
trueif an element was removed as a result of this call
-
size
reactor.core.publisher.Mono<Integer> size()
Returns size of this set.- Returns:
- size
-
contains
reactor.core.publisher.Mono<Boolean> contains(V o)
Returnstrueif this sorted set contains encoded state of the specified element.- Parameters:
o- element whose presence in this collection is to be tested- Returns:
trueif this sorted set contains the specified element andfalseotherwise
-
containsAll
reactor.core.publisher.Mono<Boolean> containsAll(Collection<?> c)
Returnstrueif this sorted set contains all of the elements in encoded state in the specified collection.- Parameters:
c- collection to be checked for containment in this sorted set- Returns:
trueif this sorted set contains all of the elements in the specified collection
-
removeAll
reactor.core.publisher.Mono<Boolean> removeAll(Collection<?> c)
Removes all of this sorted set's elements that are also contained in the specified collection.- Parameters:
c- sorted set containing elements to be removed from this collection- Returns:
trueif this sorted set changed as a result of the call
-
retainAll
reactor.core.publisher.Mono<Boolean> retainAll(Collection<?> c)
Retains only the elements in this sorted set that are contained in the specified collection.- Parameters:
c- collection containing elements to be retained in this collection- Returns:
trueif this sorted set changed as a result of the call
-
addScore
reactor.core.publisher.Mono<Double> addScore(V element, Number value)
Increases score of specified element by value.- Parameters:
element- - element whose score needs to be increasedvalue- - value- Returns:
- updated score of element
-
addScoreAndGetRevRank
reactor.core.publisher.Mono<Integer> addScoreAndGetRevRank(V object, Number value)
Adds score to element and returns its reverse rank- Parameters:
object- - object itselfvalue- - object score- Returns:
- reverse rank
-
addScoreAndGetRank
reactor.core.publisher.Mono<Integer> addScoreAndGetRank(V object, Number value)
Adds score to element and returns its rank- Parameters:
object- - object itselfvalue- - object score- Returns:
- rank
-
valueRange
reactor.core.publisher.Mono<Collection<V>> valueRange(int startIndex, int endIndex)
Returns values by rank range. Indexes are zero based.-1means the highest score,-2means the second highest score.- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- elements
-
entryRange
reactor.core.publisher.Mono<Collection<ScoredEntry<V>>> entryRange(int startIndex, int endIndex)
Returns entries (value and its score) by rank range. Indexes are zero based.-1means the highest score,-2means the second highest score.- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- entries
-
valueRange
reactor.core.publisher.Mono<Collection<V>> valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all values betweenstartScoreandendScore.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusive- Returns:
- values
-
entryRange
reactor.core.publisher.Mono<Collection<ScoredEntry<V>>> entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all entries (value and its score) betweenstartScoreandendScore.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusive- Returns:
- entries
-
valueRange
reactor.core.publisher.Mono<Collection<V>> valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all values betweenstartScoreandendScore.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusiveoffset- - offset of sorted datacount- - amount of sorted data- Returns:
- values
-
entryRange
reactor.core.publisher.Mono<Collection<ScoredEntry<V>>> entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all entries (value and its score) betweenstartScoreandendScore.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusiveoffset- - offset of sorted datacount- - amount of sorted data- Returns:
- entries
-
valueRangeReversed
reactor.core.publisher.Mono<Collection<V>> valueRangeReversed(int startIndex, int endIndex)
Returns values by rank range in reverse order. Indexes are zero based.-1means the highest score,-2means the second highest score.- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- elements
-
valueRangeReversed
reactor.core.publisher.Mono<Collection<V>> valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all values betweenstartScoreandendScorein reversed order.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusive- Returns:
- values
-
valueRangeReversed
reactor.core.publisher.Mono<Collection<V>> valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all values betweenstartScoreandendScorein reversed order.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusiveoffset- - offset of sorted datacount- - amount of sorted data- Returns:
- values
-
entryRangeReversed
reactor.core.publisher.Mono<Collection<ScoredEntry<V>>> entryRangeReversed(int startIndex, int endIndex)
Returns entries (value and its score) by rank range in reverse order. Indexes are zero based.-1means the highest score,-2means the second highest score.- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- entries
-
entryRangeReversed
reactor.core.publisher.Mono<Collection<ScoredEntry<V>>> entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns all entries (value and its score) betweenstartScoreandendScorein reversed order.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusive- Returns:
- entries
-
entryRangeReversed
reactor.core.publisher.Mono<Collection<ScoredEntry<V>>> entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Returns all entries (value and its score) betweenstartScoreandendScorein reversed order.- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusiveoffset- - offset of sorted datacount- - amount of sorted data- Returns:
- entries
-
count
reactor.core.publisher.Mono<Integer> count(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Returns the number of elements with a score betweenstartScoreandendScore.- Parameters:
startScore- - start scorestartScoreInclusive- - start score inclusiveendScore- - end scoreendScoreInclusive- - end score inclusive- Returns:
- count
-
readAll
reactor.core.publisher.Mono<Collection<V>> readAll()
Read all values at once.- Returns:
- values
-
rangeTo
reactor.core.publisher.Mono<Integer> rangeTo(String destName, int startIndex, int endIndex)
Stores to defined ScoredSortedSet values by rank range. Indexes are zero based.-1means the highest score,-2means the second highest score.Requires Redis 6.2.0 and higher.
- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- elements
-
rangeTo
reactor.core.publisher.Mono<Integer> rangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Stores to defined ScoredSortedSet values betweenstartScoreandendScore.Requires Redis 6.2.0 and higher.
- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusive- Returns:
- values
-
rangeTo
reactor.core.publisher.Mono<Integer> rangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Stores to defined ScoredSortedSet values betweenstartScoreandendScore.Requires Redis 6.2.0 and higher.
- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusiveoffset- - offset of sorted datacount- - amount of sorted data- Returns:
- values
-
revRangeTo
reactor.core.publisher.Mono<Integer> revRangeTo(String destName, int startIndex, int endIndex)
Stores to defined ScoredSortedSet values in reversed order by rank range. Indexes are zero based.-1means the highest score,-2means the second highest score.Requires Redis 6.2.0 and higher.
- Parameters:
startIndex- - start indexendIndex- - end index- Returns:
- elements
-
revRangeTo
reactor.core.publisher.Mono<Integer> revRangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
Stores to defined ScoredSortedSet values in reversed order betweenstartScoreandendScore.Requires Redis 6.2.0 and higher.
- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusive- Returns:
- values
-
revRangeTo
reactor.core.publisher.Mono<Integer> revRangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)
Stores to defined ScoredSortedSet values in reversed order betweenstartScoreandendScore.Requires Redis 6.2.0 and higher.
- Parameters:
startScore- - start score. UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersstartScoreInclusive- - start score inclusiveendScore- - end score UseDouble.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYto define infinity numbersendScoreInclusive- - end score inclusiveoffset- - offset of sorted datacount- - amount of sorted data- Returns:
- values
-
intersection
reactor.core.publisher.Mono<Integer> intersection(String... names)
Intersect provided ScoredSortedSets and store result to current ScoredSortedSet- Parameters:
names- - names of ScoredSortedSet- Returns:
- length of intersection
-
intersection
reactor.core.publisher.Mono<Integer> intersection(RScoredSortedSet.Aggregate aggregate, String... names)
Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet- Parameters:
aggregate- - score aggregation modenames- - names of ScoredSortedSet- Returns:
- length of intersection
-
intersection
reactor.core.publisher.Mono<Integer> intersection(Map<String,Double> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet- Parameters:
nameWithWeight- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of intersection
-
intersection
reactor.core.publisher.Mono<Integer> intersection(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet- Parameters:
aggregate- - score aggregation modenameWithWeight- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of intersection
-
readIntersection
reactor.core.publisher.Mono<Collection<V>> readIntersection(String... names)
Intersect provided ScoredSortedSets with current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Parameters:
names- - names of ScoredSortedSet- Returns:
- result of intersection
-
readIntersection
reactor.core.publisher.Mono<Collection<V>> readIntersection(RScoredSortedSet.Aggregate aggregate, String... names)
Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state changeRequires Redis 6.2.0 and higher.
- Parameters:
aggregate- - score aggregation modenames- - names of ScoredSortedSet- Returns:
- result of intersection
-
readIntersection
reactor.core.publisher.Mono<Collection<V>> readIntersection(Map<String,Double> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Parameters:
nameWithWeight- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of intersection
-
readIntersection
reactor.core.publisher.Mono<Collection<V>> readIntersection(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)
Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state changeRequires Redis 6.2.0 and higher.
- Parameters:
aggregate- - score aggregation modenameWithWeight- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of intersection
-
union
reactor.core.publisher.Mono<Integer> union(String... names)
Union provided ScoredSortedSets and store result to current ScoredSortedSet- Parameters:
names- - names of ScoredSortedSet- Returns:
- length of union
-
union
reactor.core.publisher.Mono<Integer> union(RScoredSortedSet.Aggregate aggregate, String... names)
Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet- Parameters:
aggregate- - score aggregation modenames- - names of ScoredSortedSet- Returns:
- length of union
-
union
reactor.core.publisher.Mono<Integer> union(Map<String,Double> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet- Parameters:
nameWithWeight- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of union
-
union
reactor.core.publisher.Mono<Integer> union(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet- Parameters:
aggregate- - score aggregation modenameWithWeight- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- length of union
-
readUnion
reactor.core.publisher.Mono<Collection<V>> readUnion(String... names)
Union ScoredSortedSets specified by name with current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Parameters:
names- - names of ScoredSortedSet- Returns:
- result of union
-
readUnion
reactor.core.publisher.Mono<Collection<V>> readUnion(RScoredSortedSet.Aggregate aggregate, String... names)
Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Parameters:
aggregate- - score aggregation modenames- - names of ScoredSortedSet- Returns:
- result of union
-
readUnion
reactor.core.publisher.Mono<Collection<V>> readUnion(Map<String,Double> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Parameters:
nameWithWeight- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of union
-
readUnion
reactor.core.publisher.Mono<Collection<V>> readUnion(RScoredSortedSet.Aggregate aggregate, Map<String,Double> nameWithWeight)
Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Parameters:
aggregate- - score aggregation modenameWithWeight- - name of ScoredSortedSet mapped to weight multiplier- Returns:
- result of union
-
readDiff
reactor.core.publisher.Mono<Collection<V>> readDiff(String... names)
Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.Requires Redis 6.2.0 and higher.
- Parameters:
names- - name of sets- Returns:
- result of diff
-
diff
reactor.core.publisher.Mono<Integer> diff(String... names)
Diff provided ScoredSortedSets and store result to current ScoredSortedSetRequires Redis 6.2.0 and higher.
- Parameters:
names- - name of sets- Returns:
- length of diff
-
takeFirst
reactor.core.publisher.Mono<V> takeFirst()
Removes and returns the head element waiting if necessary for an element to become available.- Returns:
- the head element
-
takeLast
reactor.core.publisher.Mono<V> takeLast()
Removes and returns the tail element waiting if necessary for an element to become available.- Returns:
- the tail element
-
takeFirstElements
reactor.core.publisher.Flux<V> takeFirstElements()
Retrieves and removes continues stream of elements from the head of this queue. Waits for next element become available.- Returns:
- stream of head elements
-
takeLastElements
reactor.core.publisher.Flux<V> takeLastElements()
Retrieves and removes continues stream of elements from the tail of this queue. Waits for next element become available.- Returns:
- stream of tail elements
-
-