Interface RScoredSortedSetAsync<V>
- Type Parameters:
V
- value
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
,RSortableAsync<Set<V>>
- All Known Subinterfaces:
RGeo<V>
,RGeoAsync<V>
,RScoredSortedSet<V>
- All Known Implementing Classes:
RedissonGeo
,RedissonLexSortedSet
,RedissonScoredSortedSet
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionaddAllAsync
(Map<V, Double> objects) Adds all elements contained in the specified map to this sorted set.addAllIfAbsentAsync
(Map<V, Double> objects) Adds elements to this set only if they haven't been added before.addAllIfExistAsync
(Map<V, Double> objects) Adds elements to this set only if they already exist.addAllIfGreaterAsync
(Map<V, Double> objects) Adds elements to this set only if new scores greater than current score of existed elements.addAllIfLessAsync
(Map<V, Double> objects) Adds elements to this set only if new scores less than current score of existed elements.addAndGetRankAsync
(double score, V object) Adds element to this set, overrides previous score if it has been already added.addAndGetRevRankAsync
(double score, V object) Adds element to this set, overrides previous score if it has been already added.addAndGetRevRankAsync
(Map<? extends V, Double> map) Adds elements to this set, overrides previous score if it has been already added.Adds element to this set, overrides previous score if it has been already added.addIfAbsentAsync
(double score, V object) Adds element to this set only if has not been added before.addIfExistsAsync
(double score, V object) Adds element to this set only if it's already exists.addIfGreaterAsync
(double score, V object) Adds element to this set only if new score greater than current score of existed element.addIfLessAsync
(double score, V object) Adds element to this set only if new score less than current score of existed element.addScoreAndGetRankAsync
(V object, Number value) Adds score to element and returns its rankaddScoreAndGetRevRankAsync
(V object, Number value) Adds score to element and returns its reverse rankaddScoreAsync
(V element, Number value) Increases score of specified element by value.containsAllAsync
(Collection<?> c) Returnstrue
if this sorted set contains all of the elements in encoded state in the specified collection.Returnstrue
if this sorted set contains encoded state of the specified element.countAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns the number of elements with a score betweenstartScore
andendScore
.countIntersectionAsync
(int limit, String... names) Counts elements of set as a result of sets intersection with current set.countIntersectionAsync
(String... names) Counts elements of set as a result of sets intersection with current set.Diff provided ScoredSortedSets and store result to current ScoredSortedSetentryRangeAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScore
andendScore
.entryRangeAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all entries (value and its score) betweenstartScore
andendScore
.entryRangeAsync
(int startIndex, int endIndex) Returns entries (value and its score) by rank range.entryRangeReversedAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.entryRangeReversedAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.entryRangeReversedAsync
(int startIndex, int endIndex) Returns entries (value and its score) by rank range in reverse order.Returns the head element ornull
if this sorted set is empty.Returns score of the head element or returnsnull
if this sorted set is empty.getScoreAsync
(Collection<V> elements) Returns scores of elements.getScoreAsync
(V o) Returns score of element ornull
if it doesn't exist.intersectionAsync
(String... names) Intersect provided ScoredSortedSets and store result to current ScoredSortedSetintersectionAsync
(Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetintersectionAsync
(RScoredSortedSet.Aggregate aggregate, String... names) Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetintersectionAsync
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetReturns the tail element ornull
if this sorted set is empty.Returns score of the tail element or returnsnull
if this sorted set is empty.Removes and returns the head element ornull
if this sorted set is empty.pollFirstAsync
(int count) Removes and returns the head elements of this sorted set.pollFirstAsync
(long timeout, TimeUnit unit) Removes and returns the head element ornull
if this sorted set is empty.pollFirstAsync
(Duration duration, int count) Removes and returns the head elements.pollFirstEntriesFromAnyAsync
(int count, String... queueNames) Removes and returns first available head elements of any sorted set including this one.pollFirstEntriesFromAnyAsync
(Duration duration, int count, String... queueNames) Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.pollFirstFromAnyAsync
(int count, String... queueNames) Removes and returns first available head elements of any sorted set including this one.pollFirstFromAnyAsync
(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.pollFirstFromAnyAsync
(Duration duration, int count, String... queueNames) Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Removes and returns the tail element ornull
if this sorted set is empty.pollLastAsync
(int count) Removes and returns the tail elements of this sorted set.pollLastAsync
(long timeout, TimeUnit unit) Removes and returns the tail element ornull
if this sorted set is empty.pollLastAsync
(Duration duration, int count) Removes and returns the tail elements.pollLastEntriesFromAnyAsync
(int count, String... queueNames) Removes and returns first available tail entries of any sorted set including this one.pollLastEntriesFromAnyAsync
(Duration duration, int count, String... queueNames) Removes and returns first available tail entries of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.pollLastFromAnyAsync
(int count, String... queueNames) Removes and returns first available tail elements of any sorted set including this one.pollLastFromAnyAsync
(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.pollLastFromAnyAsync
(Duration duration, int count, String... queueNames) Removes and returns first available tail elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Returns random element from this sorted setrandomAsync
(int count) Returns random elements from this sorted set limited bycount
randomEntriesAsync
(int count) Returns random entries from this sorted set limited bycount
.rangeToAsync
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.rangeToAsync
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.rangeToAsync
(String destName, int startIndex, int endIndex) Stores to defined ScoredSortedSet values by rank range.Returns rank of value, with the scores ordered from low to high.Read all values at once.readDiffAsync
(String... names) Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.readIntersectionAsync
(String... names) Intersect provided ScoredSortedSets with current ScoredSortedSet without state changereadIntersectionAsync
(Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state changereadIntersectionAsync
(RScoredSortedSet.Aggregate aggregate, String... names) Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state changereadIntersectionAsync
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state changereadUnionAsync
(String... names) Union ScoredSortedSets specified by name with current ScoredSortedSet without state change.readUnionAsync
(Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.readUnionAsync
(RScoredSortedSet.Aggregate aggregate, String... names) Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.readUnionAsync
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changeremoveAllAsync
(Collection<?> c) Removes all of this sorted set's elements that are also contained in the specified collection.removeAsync
(V o) Removes a single instance of the specified element from this sorted set, if it is present.removeRangeByRankAsync
(int startIndex, int endIndex) Removes values by rank range.removeRangeByScoreAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Removes values by score range.replaceAsync
(V oldObject, V newObject) Replaces a previousoldObject
with anewObject
.retainAllAsync
(Collection<?> c) Retains only the elements in this sorted set that are contained in the specified collection.revRangeToAsync
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.revRangeToAsync
(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.revRangeToAsync
(String destName, int startIndex, int endIndex) Stores to defined ScoredSortedSet values in reversed order by rank range.revRankAsync
(Collection<V> elements) Returns ranks of elements, with the scores ordered from high to low.revRankAsync
(V o) Returns rank of value, with the scores ordered from high to low.Returns size of this set.Removes and returns the head element waiting if necessary for an element to become available.Removes and returns the tail element waiting if necessary for an element to become available.tryAddAsync
(double score, V object) Deprecated.unionAsync
(String... names) Union provided ScoredSortedSets and store result to current ScoredSortedSetunionAsync
(Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetunionAsync
(RScoredSortedSet.Aggregate aggregate, String... names) Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetunionAsync
(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetvalueRangeAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScore
andendScore
.valueRangeAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScore
andendScore
.valueRangeAsync
(int startIndex, int endIndex) Returns values by rank range.valueRangeReversedAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScore
andendScore
in reversed order.valueRangeReversedAsync
(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScore
andendScore
in reversed order.valueRangeReversedAsync
(int startIndex, int endIndex) Returns values by rank range in reverse order.Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
Methods inherited from interface org.redisson.api.RSortableAsync
readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync
-
Method Details
-
pollLastFromAnyAsync
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
- name of queuestimeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the tail element, or
null
if all sorted sets are empty
-
pollLastFromAnyAsync
Removes and returns first available tail elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Parameters:
duration
- how long to wait before giving upcount
- elements amountqueueNames
- name of queues- Returns:
- the tail elements
-
pollLastFromAnyAsync
Removes and returns first available tail elements of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Parameters:
count
- elements amountqueueNames
- name of queues- Returns:
- the tail elements
-
pollLastEntriesFromAnyAsync
Removes and returns first available tail entries of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Parameters:
count
- entries amountqueueNames
- name of queues- Returns:
- the head entries
-
pollLastEntriesFromAnyAsync
RFuture<Map<String,Map<V, pollLastEntriesFromAnyAsyncDouble>>> (Duration duration, int count, String... queueNames) Removes and returns first available tail entries of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Parameters:
duration
- how long to wait before giving upcount
- entries amountqueueNames
- name of queues- Returns:
- the tail entries
-
pollFirstFromAnyAsync
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
- name of queuestimeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the head element, or
null
if all sorted sets are empty
-
pollFirstFromAnyAsync
Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Parameters:
duration
- how long to wait before giving upcount
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstFromAnyAsync
Removes and returns first available head elements of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Parameters:
count
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstEntriesFromAnyAsync
Removes and returns first available head elements of any sorted set including this one.Requires Redis 7.0.0 and higher.
- Parameters:
count
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstEntriesFromAnyAsync
RFuture<Map<String,Map<V, pollFirstEntriesFromAnyAsyncDouble>>> (Duration duration, int count, String... queueNames) Removes and returns first available head elements of any sorted set, waiting up to the specified wait time if necessary for elements to become available in any of defined sorted sets including this one.Requires Redis 7.0.0 and higher.
- Parameters:
duration
- how long to wait before giving upcount
- elements amountqueueNames
- name of queues- Returns:
- the head elements
-
pollFirstAsync
Removes and returns the head element ornull
if this sorted set is empty.Requires Redis 5.0.0 and higher.
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the head element,
or
null
if this sorted set is empty
-
pollFirstAsync
Removes and returns the head elements.Requires Redis 7.0.0 and higher.
- Parameters:
duration
- how long to wait before giving upcount
- elements amount- Returns:
- the head elements
-
takeFirstAsync
Removes and returns the head element waiting if necessary for an element to become available.- Returns:
- the head element
-
takeLastAsync
Removes and returns the tail element waiting if necessary for an element to become available.- Returns:
- the tail element
-
pollLastAsync
Removes and returns the tail element ornull
if this sorted set is empty.Requires Redis 5.0.0 and higher.
- Parameters:
timeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the tail element or
null
if this sorted set is empty
-
pollLastAsync
Removes and returns the tail elements.Requires Redis 7.0.0 and higher.
- Parameters:
duration
- how long to wait before giving upcount
- elements amount- Returns:
- the tail elements
-
pollFirstAsync
Removes and returns the head elements of this sorted set.- Parameters:
count
- - elements amount- Returns:
- the head elements of this sorted set
-
pollLastAsync
Removes and returns the tail elements of this sorted set.- Parameters:
count
- - elements amount- Returns:
- the tail elements of this sorted set
-
pollFirstAsync
Removes and returns the head element ornull
if this sorted set is empty.- Returns:
- the head element,
or
null
if this sorted set is empty
-
pollLastAsync
Removes and returns the tail element ornull
if this sorted set is empty.- Returns:
- the tail element or
null
if this sorted set is empty
-
firstAsync
Returns the head element ornull
if this sorted set is empty.- Returns:
- the head element or
null
if this sorted set is empty
-
lastAsync
Returns the tail element ornull
if this sorted set is empty.- Returns:
- the tail element or
null
if this sorted set is empty
-
firstScoreAsync
Returns score of the head element or returnsnull
if this sorted set is empty.- Returns:
- the tail element or
null
if this sorted set is empty
-
lastScoreAsync
Returns score of the tail element or returnsnull
if this sorted set is empty.- Returns:
- the tail element or
null
if this sorted set is empty
-
randomAsync
Returns random element from this sorted setRequires Redis 6.2.0 and higher.
- Returns:
- value
-
randomAsync
Returns random elements from this sorted set limited bycount
Requires Redis 6.2.0 and higher.
- Parameters:
count
- - values amount to return- Returns:
- value
-
randomEntriesAsync
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
-
addAllAsync
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
-
addAllIfAbsentAsync
Adds elements to this set only if they haven't been added before.Requires Redis 3.0.2 and higher.
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfExistAsync
Adds elements to this set only if they already exist.Requires Redis 3.0.2 and higher.
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfGreaterAsync
Adds elements to this set only if new scores greater than current score of existed elements.Requires Redis 6.2.0 and higher.
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
addAllIfLessAsync
Adds elements to this set only if new scores less than current score of existed elements.Requires Redis 6.2.0 and higher.
- Parameters:
objects
- map of elements to add- Returns:
- amount of added elements
-
removeRangeByScoreAsync
RFuture<Integer> removeRangeByScoreAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Removes values by score range.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- number of elements removed
-
removeRangeByRankAsync
Removes values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- number of elements removed
-
rankAsync
Returns rank of value, with the scores ordered from low to high.- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
revRankAsync
Returns rank of value, with the scores ordered from high to low.- Parameters:
o
- - object- Returns:
- rank or
null
if value does not exist
-
revRankAsync
Returns ranks of elements, with the scores ordered from high to low.- Parameters:
elements
- - elements- Returns:
- ranks or
null
if value does not exist
-
getScoreAsync
Returns score of element ornull
if it doesn't exist.- Parameters:
o
- - element- Returns:
- score
-
getScoreAsync
Returns scores of elements.- Parameters:
elements
- - elements- Returns:
- element scores
-
addAsync
Adds element to this set, overrides previous score if it has been already added.- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element has added andfalse
if not.
-
addAndGetRankAsync
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
-
addAndGetRevRankAsync
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
-
addAndGetRevRankAsync
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
-
tryAddAsync
Deprecated.UseaddIfAbsentAsync(double, Object)
instead- Parameters:
score
- - object scoreobject
- - object itself- Returns:
true
if element has added andfalse
if not.
-
addIfAbsentAsync
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:
true
if element added andfalse
if not.
-
addIfExistsAsync
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:
true
if element added andfalse
if not.
-
addIfLessAsync
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:
true
if element added andfalse
if not.
-
addIfGreaterAsync
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:
true
if element added andfalse
if not.
-
removeAsync
Removes a single instance of the specified element from this sorted set, if it is present.- Parameters:
o
- element to be removed from this sorted set, if present- Returns:
true
if an element was removed as a result of this call
-
replaceAsync
Replaces a previousoldObject
with anewObject
. Returnsfalse
if previous object doesn't exist.- Parameters:
oldObject
- old objectnewObject
- new object- Returns:
true
if object has been replaced otherwisefalse
.
-
sizeAsync
Returns size of this set.- Returns:
- size
-
containsAsync
Returnstrue
if this sorted set contains encoded state of the specified element.- Parameters:
o
- element whose presence in this collection is to be tested- Returns:
true
if this sorted set contains the specified element andfalse
otherwise
-
containsAllAsync
Returnstrue
if 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:
true
if this sorted set contains all of the elements in the specified collection
-
removeAllAsync
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:
true
if this sorted set changed as a result of the call
-
retainAllAsync
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:
true
if this sorted set changed as a result of the call
-
addScoreAsync
Increases score of specified element by value.- Parameters:
element
- - element whose score needs to be increasedvalue
- - value- Returns:
- updated score of element
-
addScoreAndGetRevRankAsync
Adds score to element and returns its reverse rank- Parameters:
object
- - object itselfvalue
- - object score- Returns:
- reverse rank
-
addScoreAndGetRankAsync
Adds score to element and returns its rank- Parameters:
object
- - object itselfvalue
- - object score- Returns:
- rank
-
rangeToAsync
Stores to defined ScoredSortedSet values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
rangeToAsync
RFuture<Integer> rangeToAsync(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
rangeToAsync
RFuture<Integer> rangeToAsync(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
revRangeToAsync
Stores to defined ScoredSortedSet values in reversed order by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
revRangeToAsync
RFuture<Integer> revRangeToAsync(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
revRangeToAsync
RFuture<Integer> revRangeToAsync(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values in reversed order betweenstartScore
andendScore
.Requires Redis 6.2.0 and higher.
- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
valueRangeAsync
Returns values by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.Requires Redis 6.2.0 and higher.
- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
valueRangeReversedAsync
Returns values by rank range in reverse order. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- elements
-
entryRangeAsync
Returns entries (value and its score) by rank range. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- entries
-
entryRangeReversedAsync
Returns entries (value and its score) by rank range in reverse order. Indexes are zero based.-1
means the highest score,-2
means the second highest score.- Parameters:
startIndex
- - start indexendIndex
- - end index- Returns:
- entries
-
valueRangeAsync
RFuture<Collection<V>> valueRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScore
andendScore
.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
valueRangeReversedAsync
RFuture<Collection<V>> valueRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScore
andendScore
in reversed order.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- values
-
entryRangeAsync
RFuture<Collection<ScoredEntry<V>>> entryRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScore
andendScore
.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- entries
-
valueRangeAsync
RFuture<Collection<V>> valueRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScore
andendScore
.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
valueRangeReversedAsync
RFuture<Collection<V>> valueRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScore
andendScore
in reversed order.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- values
-
entryRangeAsync
RFuture<Collection<ScoredEntry<V>>> entryRangeAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all entries (value and its score) betweenstartScore
andendScore
.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- entries
-
entryRangeReversedAsync
RFuture<Collection<ScoredEntry<V>>> entryRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusive- Returns:
- entries
-
entryRangeReversedAsync
RFuture<Collection<ScoredEntry<V>>> entryRangeReversedAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all entries (value and its score) betweenstartScore
andendScore
in reversed order.- Parameters:
startScore
- - start score. UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersstartScoreInclusive
- - start score inclusiveendScore
- - end score UseDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
to define infinity numbersendScoreInclusive
- - end score inclusiveoffset
- - offset of sorted datacount
- - amount of sorted data- Returns:
- entries
-
countAsync
RFuture<Integer> countAsync(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns the number of elements with a score betweenstartScore
andendScore
.- Parameters:
startScore
- - start scorestartScoreInclusive
- - start score inclusiveendScore
- - end scoreendScoreInclusive
- - end score inclusive- Returns:
- count
-
readAllAsync
RFuture<Collection<V>> readAllAsync()Read all values at once.- Returns:
- values
-
intersectionAsync
Intersect provided ScoredSortedSets and store result to current ScoredSortedSet- Parameters:
names
- - names of ScoredSortedSet- Returns:
- length of intersection
-
intersectionAsync
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
-
intersectionAsync
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
-
intersectionAsync
RFuture<Integer> intersectionAsync(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
-
readIntersectionAsync
Intersect provided ScoredSortedSets with current ScoredSortedSet without state changeRequires Redis 6.2.0 and higher.
- Parameters:
names
- - names of ScoredSortedSet- Returns:
- result of intersection
-
readIntersectionAsync
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
-
readIntersectionAsync
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
-
readIntersectionAsync
RFuture<Collection<V>> readIntersectionAsync(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
-
countIntersectionAsync
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Parameters:
names
- - name of sets- Returns:
- amount of elements
-
countIntersectionAsync
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Parameters:
names
- - name of setslimit
- - sets intersection limit- Returns:
- amount of elements
-
unionAsync
Union provided ScoredSortedSets and store result to current ScoredSortedSet- Parameters:
names
- - names of ScoredSortedSet- Returns:
- length of union
-
unionAsync
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
-
unionAsync
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
-
unionAsync
RFuture<Integer> unionAsync(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
-
readUnionAsync
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
-
readUnionAsync
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
-
readUnionAsync
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
-
readUnionAsync
RFuture<Collection<V>> readUnionAsync(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
-
readDiffAsync
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
-
diffAsync
Diff provided ScoredSortedSets and store result to current ScoredSortedSetRequires Redis 6.2.0 and higher.
- Parameters:
names
- - name of sets- Returns:
- length of diff
-