Interface RScoredSortedSet<V>
- Type Parameters:
V- object type
- All Superinterfaces:
Iterable<V>,RExpirable,RExpirableAsync,RObject,RObjectAsync,RScoredSortedSetAsync<V>,RSortable<Set<V>>,RSortableAsync<Set<V>>
- All Known Subinterfaces:
RGeo<V>
- All Known Implementing Classes:
RedissonGeo,RedissonLexSortedSet,RedissonScoredSortedSet
- Author:
- Nikita Koksharov
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds element to this set, overrides previous score if it has been already added.intAdds all elements contained in the specified map to this sorted set.intaddAllIfAbsent(Map<V, Double> objects) Adds elements to this set only if they haven't been added before.intaddAllIfExist(Map<V, Double> objects) Adds elements to this set only if they already exist.intaddAllIfGreater(Map<V, Double> objects) Adds elements to this set only if new scores greater than current score of existed elements.intaddAllIfLess(Map<V, Double> objects) Adds elements to this set only if new scores less than current score of existed elements.addAndGetRank(double score, V object) Adds element to this set, overrides previous score if it has been already added.addAndGetRevRank(double score, V object) Adds element to this set, overrides previous score if it has been already added.addAndGetRevRank(Map<? extends V, Double> map) Adds elements to this set, overrides previous score if it has been already added.booleanaddIfAbsent(double score, V object) Adds element to this set only if has not been added before.booleanaddIfExists(double score, V object) Adds element to this set only if it's already exists.booleanaddIfGreater(double score, V object) Adds element to this set only if new score greater than current score of existed element.booleanAdds element to this set only if new score less than current score of existed element.intaddListener(ObjectListener listener) Adds object event listenerIncreases score of specified element by value.addScoreAndGetRank(V object, Number value) Adds score to element and returns its rankaddScoreAndGetRevRank(V object, Number value) Adds score to element and returns its reverse rankvoidclear()Removes all elements of this sorted set.booleanReturnstrueif this sorted set contains encoded state of the specified element.booleancontainsAll(Collection<?> c) Returnstrueif this sorted set contains all of the elements in encoded state in the specified collection.intcount(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns the number of elements with a score betweenstartScoreandendScore.countIntersection(int limit, String... names) Counts elements of set as a result of sets intersection with current set.countIntersection(String... names) Counts elements of set as a result of sets intersection with current set.intDiff provided ScoredSortedSets and store result to current ScoredSortedSetdistributedIterator(int count) Returns element iterator that can be shared across multiple applications.distributedIterator(String pattern) Returns iterator over elements that match specified pattern.distributedIterator(String iteratorName, String pattern, int count) Returns iterator over elements that match specified pattern.Returns an iterator over entries (value and its score) in this set.entryIterator(int count) Returns an iterator over entries (value and its score) in this set.entryIterator(String pattern) Returns an iterator over entries (value and its score) in this set.entryIterator(String pattern, int count) Returns an iterator over entries (value and its score) in this set.entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScoreandendScore.entryRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all entries (value and its score) betweenstartScoreandendScore.entryRange(int startIndex, int endIndex) Returns entries (value and its score) by rank range.entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all entries (value and its score) betweenstartScoreandendScorein reversed order.entryRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all entries (value and its score) betweenstartScoreandendScorein reversed order.entryRangeReversed(int startIndex, int endIndex) Returns entries (value and its score) by rank range in reverse order.first()Returns the head element ornullif this sorted set is empty.Returns the head entry (value and its score) ornullif this sorted set is empty.Returns score of the tail element or returnsnullif this sorted set is empty.Returns scores of elements.Returns score of element ornullif it doesn't exist.intintersection(String... names) Intersect provided ScoredSortedSets and store result to current ScoredSortedSetintintersection(Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetintintersection(RScoredSortedSet.Aggregate aggregate, String... names) Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetintintersection(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetbooleanisEmpty()Returnstrueif this set is emptyiterator(int count) Returns an iterator over elements in this set.Returns an iterator over elements in this set.Returns an iterator over elements in this set.last()Returns the tail element ornullif this sorted set is empty.Returns the tail entry (value and its score) ornullif this sorted set is empty.Returns score of the head element or returnsnullif this sorted set is empty.<KOut,VOut>
RCollectionMapReduce<V, KOut, VOut> ReturnsRMapReduceobject associated with this objectRemoves and returns the head element ornullif this sorted set is empty.pollFirst(int count) Removes and returns the head elements of this sorted set.Removes and returns the head element ornullif this sorted set is empty.Removes and returns the head elements.List<ScoredEntry<V>> pollFirstEntries(int count) Removes and returns the head entries (value and its score) of this sorted set.List<ScoredEntry<V>> pollFirstEntries(Duration duration, int count) Removes and returns the head entries (value and its score).pollFirstEntriesFromAny(int count, String... queueNames) Removes and returns first available head entries of any sorted set including this one.pollFirstEntriesFromAny(Duration duration, int count, String... queueNames) Removes and returns first available head 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.Removes and returns the head entry (value and its score) ornullif this sorted set is empty.pollFirstFromAny(int count, String... queueNames) Removes and returns first available head elements of any sorted set including this one.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.pollFirstFromAny(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.pollLast()Removes and returns the tail element ornullif this sorted set is empty.pollLast(int count) Removes and returns the tail elements of this sorted set.Removes and returns the tail element ornullif this sorted set is empty.Removes and returns the tail elements.List<ScoredEntry<V>> pollLastEntries(int count) Removes and returns the tail entries (value and its score) of this sorted set.List<ScoredEntry<V>> pollLastEntries(Duration duration, int count) Removes and returns the head entries (value and its score).pollLastEntriesFromAny(int count, String... queueNames) Removes and returns first available tail entries of any sorted set including this one.pollLastEntriesFromAny(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.Removes and returns the tail entry (value and its score) ornullif this sorted set is empty.pollLastFromAny(int count, String... queueNames) Removes and returns first available tail elements of any sorted set including this one.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.pollLastFromAny(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.random()Returns random element from this sorted setrandom(int count) Returns random elements from this sorted set limited bycountrandomEntries(int count) Returns random entries from this sorted set limited bycount.intrangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values betweenstartScoreandendScore.intrangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values betweenstartScoreandendScore.intStores to defined ScoredSortedSet values by rank range.Returns rank of value, with the ranks ordered from low to high.Returns rank and score of specifiedvalue, with the ranks ordered from low to high.readAll()Read all values at once.Diff ScoredSortedSets specified by name with current ScoredSortedSet without state change.readIntersection(String... names) Intersect provided ScoredSortedSets with current ScoredSortedSet without state changereadIntersection(Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet without state changereadIntersection(RScoredSortedSet.Aggregate aggregate, String... names) Intersect provided ScoredSortedSets with current ScoredSortedSet using defined aggregation method without state changereadIntersection(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Intersect provided ScoredSortedSets mapped to weight multiplier with current ScoredSortedSet using defined aggregation method without state changeUnion ScoredSortedSets specified by name with current ScoredSortedSet without state change.Union provided ScoredSortedSets mapped to weight multiplier and current ScoredSortedSet without state change.readUnion(RScoredSortedSet.Aggregate aggregate, String... names) Union ScoredSortedSets specified by name with defined aggregation method and current ScoredSortedSet without state change.readUnion(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and current ScoredSortedSet without state changebooleanRemoves a single instance of the specified element from this sorted set, if it is present.booleanremoveAll(Collection<?> c) Removes all of this sorted set's elements that are also contained in the specified collection.intremoveRangeByRank(int startIndex, int endIndex) Removes values by rank range.intremoveRangeByScore(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Removes values by score range.booleanReplaces a previousoldObjectwith anewObject.booleanretainAll(Collection<?> c) Retains only the elements in this sorted set that are contained in the specified collection.intrevRangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Stores to defined ScoredSortedSet values in reversed order betweenstartScoreandendScore.intrevRangeTo(String destName, double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Stores to defined ScoredSortedSet values in reversed order betweenstartScoreandendScore.intrevRangeTo(String destName, int startIndex, int endIndex) Stores to defined ScoredSortedSet values in reversed order by rank range.revRank(Collection<V> elements) Returns ranks of elements, with the scores ordered from high to low.Returns rank of value, with the ranks ordered from high to low.revRankEntry(V value) Returns rank and score of specifiedvalue, with the ranks ordered from high to low.intsize()Returns size of this set.stream()Returns stream of elements in this set.stream(int count) Returns stream of elements in this set.Returns stream of elements in this set.Returns stream of elements in this set.intsubscribeOnFirstElements(Consumer<V> consumer) Subscribes on first elements appeared in this set.intsubscribeOnLastElements(Consumer<V> consumer) Subscribes on last elements appeared in this set.Removes and returns the head element waiting if necessary for an element to become available.takeLast()Removes and returns the tail element waiting if necessary for an element to become available.Object[]toArray()Returns this sorted set in array of Object type.<T> T[]toArray(T[] a) Returns this sorted set in array of defined type.booleanDeprecated.intUnion provided ScoredSortedSets and store result to current ScoredSortedSetintUnion provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSetintunion(RScoredSortedSet.Aggregate aggregate, String... names) Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSetintunion(RScoredSortedSet.Aggregate aggregate, Map<String, Double> nameWithWeight) Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSetvoidunsubscribe(int listenerId) Un-subscribes defined listener.valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScoreandendScore.valueRange(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScoreandendScore.valueRange(int startIndex, int endIndex) Returns values by rank range.valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive) Returns all values betweenstartScoreandendScorein reversed order.valueRangeReversed(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count) Returns all values betweenstartScoreandendScorein reversed order.valueRangeReversed(int startIndex, int endIndex) Returns values by rank range in reverse order.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncMethods inherited from interface org.redisson.api.RScoredSortedSetAsync
addAllAsync, addAllIfAbsentAsync, addAllIfExistAsync, addAllIfGreaterAsync, addAllIfLessAsync, addAndGetRankAsync, addAndGetRevRankAsync, addAndGetRevRankAsync, addAsync, addIfAbsentAsync, addIfExistsAsync, addIfGreaterAsync, addIfLessAsync, addScoreAndGetRankAsync, addScoreAndGetRevRankAsync, addScoreAsync, containsAllAsync, containsAsync, countAsync, countIntersectionAsync, countIntersectionAsync, diffAsync, entryRangeAsync, entryRangeAsync, entryRangeAsync, entryRangeReversedAsync, entryRangeReversedAsync, entryRangeReversedAsync, firstAsync, firstEntryAsync, firstScoreAsync, getScoreAsync, getScoreAsync, intersectionAsync, intersectionAsync, intersectionAsync, intersectionAsync, lastAsync, lastEntryAsync, lastScoreAsync, pollFirstAsync, pollFirstAsync, pollFirstAsync, pollFirstAsync, pollFirstEntriesAsync, pollFirstEntriesAsync, pollFirstEntriesFromAnyAsync, pollFirstEntriesFromAnyAsync, pollFirstEntryAsync, pollFirstFromAnyAsync, pollFirstFromAnyAsync, pollFirstFromAnyAsync, pollLastAsync, pollLastAsync, pollLastAsync, pollLastAsync, pollLastEntriesAsync, pollLastEntriesAsync, pollLastEntriesFromAnyAsync, pollLastEntriesFromAnyAsync, pollLastEntryAsync, pollLastFromAnyAsync, pollLastFromAnyAsync, pollLastFromAnyAsync, randomAsync, randomAsync, randomEntriesAsync, rangeToAsync, rangeToAsync, rangeToAsync, rankAsync, rankEntryAsync, readAllAsync, readDiffAsync, readIntersectionAsync, readIntersectionAsync, readIntersectionAsync, readIntersectionAsync, readUnionAsync, readUnionAsync, readUnionAsync, readUnionAsync, removeAllAsync, removeAsync, removeRangeByRankAsync, removeRangeByScoreAsync, replaceAsync, retainAllAsync, revRangeToAsync, revRangeToAsync, revRangeToAsync, revRankAsync, revRankAsync, revRankEntryAsync, sizeAsync, takeFirstAsync, takeLastAsync, tryAddAsync, unionAsync, unionAsync, unionAsync, unionAsync, valueRangeAsync, valueRangeAsync, valueRangeAsync, valueRangeReversedAsync, valueRangeReversedAsync, valueRangeReversedAsyncMethods inherited from interface org.redisson.api.RSortable
readSort, readSort, readSort, readSort, readSort, readSort, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, sortTo, sortTo, sortTo, sortTo, sortTo, sortToMethods 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
-
mapReduce
ReturnsRMapReduceobject associated with this object- Type Parameters:
KOut- output keyVOut- output value- Returns:
- MapReduce instance
-
pollLastFromAny
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:
timeout- how long to wait before giving up, in units ofunitunit- aTimeUnitdetermining how to interpret thetimeoutparameterqueueNames- name of queues- Returns:
- the tail element, or
nullif all sorted sets are empty
-
pollLastFromAny
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
-
pollLastFromAny
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
-
pollLastEntriesFromAny
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
-
pollLastEntriesFromAny
Map<String,Map<V, pollLastEntriesFromAnyDouble>> (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
-
pollFirstFromAny
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:
timeout- how long to wait before giving up, in units ofunitunit- aTimeUnitdetermining how to interpret thetimeoutparameterqueueNames- name of queues- Returns:
- the head element, or
nullif all sorted sets are empty
-
pollFirstFromAny
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
-
pollFirstFromAny
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
-
pollFirstEntriesFromAny
Removes and returns first available head 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 elements
-
pollFirstEntriesFromAny
Map<String,Map<V, pollFirstEntriesFromAnyDouble>> (Duration duration, int count, String... queueNames) Removes and returns first available head 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 head entries
-
takeFirst
V takeFirst()Removes and returns the head element waiting if necessary for an element to become available.- Returns:
- the head element
-
takeLast
V takeLast()Removes and returns the tail element waiting if necessary for an element to become available.- Returns:
- the tail element
-
subscribeOnFirstElements
Subscribes on first elements appeared in this set. Continuously invokesRScoredSortedSetAsync.takeFirstAsync()method to get a new element.- Parameters:
consumer- - queue elements listener- Returns:
- listenerId - id of listener
-
subscribeOnLastElements
Subscribes on last elements appeared in this set. Continuously invokesRScoredSortedSetAsync.takeLastAsync()method to get a new element.- Parameters:
consumer- - queue elements listener- Returns:
- listenerId - id of listener
-
unsubscribe
void unsubscribe(int listenerId) Un-subscribes defined listener.- Parameters:
listenerId- - id of listener
-
pollFirst
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
-
pollFirst
Removes and returns the head elements.Requires Redis 7.0.0 and higher.
- Parameters:
duration- how long to wait before giving upcount- entries amount- Returns:
- the head elements
-
pollLast
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
-
pollLast
Removes and returns the tail elements.Requires Redis 7.0.0 and higher.
- Parameters:
duration- how long to wait before giving up- Returns:
- the tail elements
-
pollFirst
Removes and returns the head elements of this sorted set.- Parameters:
count- - elements amount- Returns:
- the head elements of this sorted set
-
pollLast
Removes and returns the tail elements of this sorted set.- Parameters:
count- - elements amount- Returns:
- the tail elements of this sorted set
-
pollFirst
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
-
pollFirstEntry
ScoredEntry<V> pollFirstEntry()Removes and returns the head entry (value and its score) ornullif this sorted set is empty.- Returns:
- the head entry,
or
nullif this sorted set is empty
-
pollFirstEntries
Removes and returns the head entries (value and its score) of this sorted set.- Parameters:
count- entries amount- Returns:
- the head entries of this sorted set
-
pollFirstEntries
Removes and returns the head entries (value and its score).Requires Redis 7.0.0 and higher.
- Parameters:
duration- how long to wait before giving upcount- entries amount- Returns:
- the head entries
-
pollLast
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
-
pollLastEntry
ScoredEntry<V> pollLastEntry()Removes and returns the tail entry (value and its score) ornullif this sorted set is empty.- Returns:
- the tail entry or
nullif this sorted set is empty
-
pollLastEntries
Removes and returns the tail entries (value and its score) of this sorted set.- Parameters:
count- entries amount- Returns:
- the tail entries of this sorted set
-
pollLastEntries
Removes and returns the head entries (value and its score).Requires Redis 7.0.0 and higher.
- Parameters:
duration- how long to wait before giving upcount- entries amount- Returns:
- the tail entries
-
first
V first()Returns the head element ornullif this sorted set is empty.- Returns:
- the head element or
nullif this sorted set is empty
-
firstEntry
ScoredEntry<V> firstEntry()Returns the head entry (value and its score) ornullif this sorted set is empty.- Returns:
- the head entry or
nullif this sorted set is empty
-
last
V last()Returns the tail element ornullif this sorted set is empty.- Returns:
- the tail element or
nullif this sorted set is empty
-
lastEntry
ScoredEntry<V> lastEntry()Returns the tail entry (value and its score) ornullif this sorted set is empty.- Returns:
- the tail entry or
nullif this sorted set is empty
-
firstScore
Double firstScore()Returns score of the tail element or returnsnullif this sorted set is empty.- Returns:
- the tail element or
nullif this sorted set is empty
-
lastScore
Double lastScore()Returns score of the head element or returnsnullif this sorted set is empty.- Returns:
- the tail element or
nullif this sorted set is empty
-
random
V random()Returns random element from this sorted setRequires Redis 6.2.0 and higher.
- Returns:
- random element
-
random
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
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
-
addAll
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
-
addAllIfAbsent
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
-
addAllIfExist
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
-
addAllIfGreater
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
-
addAllIfLess
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
-
removeRangeByScore
int 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
int 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
Returns rank of value, with the ranks ordered from low to high.- Parameters:
o- - object- Returns:
- rank or
nullif value does not exist
-
rankEntry
Returns rank and score of specifiedvalue, with the ranks ordered from low to high.- Parameters:
value- object- Returns:
- ranked entry or
nullif value does not exist
-
revRank
Returns rank of value, with the ranks ordered from high to low.- Parameters:
o- - object- Returns:
- rank or
nullif value does not exist
-
revRankEntry
Returns rank and score of specifiedvalue, with the ranks ordered from high to low.- Parameters:
value- object- Returns:
- ranked entry or
nullif value does not exist
-
revRank
Returns ranks of elements, with the scores ordered from high to low.- Parameters:
elements- - elements- Returns:
- ranks or
nullif value does not exist
-
getScore
Returns score of element ornullif it doesn't exist.- Parameters:
o- - element- Returns:
- score
-
getScore
Returns scores of elements.- Parameters:
elements- - elements- Returns:
- element scores
-
add
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.
-
addAndGetRank
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
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
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
Deprecated.UseaddIfAbsent(double, Object)instead- Parameters:
score- - object scoreobject- - object itself- Returns:
trueif element added andfalseif not.
-
addIfAbsent
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 added andfalseif not.
-
addIfExists
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
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
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.
-
replace
Replaces a previousoldObjectwith anewObject. Returnsfalseif previous object doesn't exist.- Parameters:
oldObject- old objectnewObject- new object- Returns:
trueif object has been replaced otherwisefalse.
-
size
int size()Returns size of this set.- Returns:
- size
-
isEmpty
boolean isEmpty()Returnstrueif this set is empty- Returns:
trueif empty
-
stream
Returns stream of elements in this set. Elements are loaded in batch. Batch size is 10.- Returns:
- stream of elements
-
stream
Returns stream of elements in this set. Ifpatternis not null then only elements match this pattern are loaded.- Parameters:
pattern- - search pattern- Returns:
- stream of elements
-
stream
Returns stream of elements in this set. Elements are loaded in batch. Batch size is defined bycountparam.- Parameters:
count- - size of elements batch- Returns:
- stream of elements
-
stream
Returns stream of 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:
- stream of elements
-
iterator
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
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
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
-
entryIterator
Iterator<ScoredEntry<V>> entryIterator()Returns an iterator over entries (value and its score) in this set.- Returns:
- iterator
-
entryIterator
Returns an iterator over entries (value and its score) in this set. Ifpatternis not null then only entries match this pattern are loaded.- Parameters:
pattern- search pattern- Returns:
- iterator
-
entryIterator
Returns an iterator over entries (value and its score) in this set. Entries are loaded in batch. Batch size is defined bycountparam.- Parameters:
count- size of elements batch- Returns:
- iterator
-
entryIterator
Returns an iterator over entries (value and its score) in this set. Entries are loaded in batch. Batch size is defined bycountparam. If pattern is not null then only entries match this pattern are loaded.- Parameters:
pattern- search patterncount- size of entries batch- Returns:
- iterator
-
distributedIterator
Returns element iterator that can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RSet.distributedIterator(String, String, int) for creating different iterators.- Parameters:
count- batch size- Returns:
- shared elements iterator
-
distributedIterator
Returns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RSet.distributedIterator(String, String, int) for creating different iterators.- Parameters:
pattern- element pattern- Returns:
- shared elements iterator
-
distributedIterator
Returns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. Iterator name must be resolved to the same hash slot as set name.- Parameters:
iteratorName- redis object name to which cursor will be savedpattern- element patterncount- batch size- Returns:
- shared elements iterator
-
contains
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
-
toArray
Object[] toArray()Returns this sorted set in array of Object type.- Returns:
- array of values
-
toArray
<T> T[] toArray(T[] a) Returns this sorted set in array of defined type.- Type Parameters:
T- type of element- Parameters:
a- - instance of array- Returns:
- array of values
-
remove
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:
trueif an element was removed as a result of this call
-
containsAll
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
Removes all of this sorted set's elements that are also contained in the specified collection.- Parameters:
c- collection containing elements to be removed from this collection- Returns:
trueif this sorted set changed as a result of the call
-
retainAll
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
-
clear
void clear()Removes all elements of this sorted set. -
addScore
Increases score of specified element by value.- Parameters:
element- - element whose score needs to be increasedvalue- - value- Returns:
- updated score of element
-
addScoreAndGetRank
Adds score to element and returns its rank- Parameters:
object- - object itselfvalue- - object score- Returns:
- rank
-
addScoreAndGetRevRank
Adds score to element and returns its reverse rank- Parameters:
object- - object itselfvalue- - object score- Returns:
- reverse rank
-
rangeTo
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
int 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
int 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
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
int 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
int 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
-
valueRange
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
-
valueRangeReversed
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
-
entryRange
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
-
entryRangeReversed
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
-
valueRange
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
-
valueRangeReversed
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
-
entryRange
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
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
-
valueRangeReversed
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
-
entryRange
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
-
entryRangeReversed
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
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
int 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 of elements
-
readAll
Collection<V> readAll()Read all values at once.- Returns:
- values
-
intersection
Intersect provided ScoredSortedSets and store result to current ScoredSortedSet- Parameters:
names- - names of ScoredSortedSet- Returns:
- length of intersection
-
intersection
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
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
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
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
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
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
-
countIntersection
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
-
countIntersection
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Parameters:
limit- - sets intersection limitnames- - name of sets- Returns:
- amount of elements
-
readIntersection
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
Union provided ScoredSortedSets and store result to current ScoredSortedSet- Parameters:
names- - names of ScoredSortedSet- Returns:
- length of union
-
union
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
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
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
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
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
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
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
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
Diff provided ScoredSortedSets and store result to current ScoredSortedSetRequires Redis 6.2.0 and higher.
- Parameters:
names- - name of sets- Returns:
- length of diff
-
addListener
Adds object event listener- Specified by:
addListenerin interfaceRObject- Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
-