Interface SortedSetCommands
- All Known Subinterfaces:
JedisCommands
- All Known Implementing Classes:
Jedis,JedisCluster,JedisPooled,JedisSentineled,JedisSharding,UnifiedJedis
-
Method Summary
Modifier and TypeMethodDescriptionbzmpop(long timeout, SortedSetOption option, int count, String... keys) bzmpop(long timeout, SortedSetOption option, String... keys) The blocking version ofZPOPMAXThe blocking version ofZPOPMINlongAdd the specified member having the specified score to the sorted set stored at key.longzadd(String key, double score, String member, ZAddParams params) Similar toZADDbut can be used with optional params.longSimilar toZADDbut for multiple members.longSimilar toZADDbut can be used with optional params, and fits for multiple members.zaddIncr(String key, double score, String member, ZAddParams params) Increments the score of member in the sorted set stored at key by increment.longReturn the sorted set cardinality (number of elements).longReturn the number of elements in the sorted set at key with a score between min and max.longSimilar toZCOUNTbut with exclusive range.Compute the difference between all the sets in the given keys.longzdiffStore(String dstkey, String... keys) Compute the difference between all the sets in the given keys.zdiffWithScores(String... keys) Compute the difference between all the sets in the given keys.doubleIf member already exists in the sorted set adds the increment to its score and updates the position of the element in the sorted set accordingly.zincrby(String key, double increment, String member, ZIncrByParams params) Similar toZINCRBYbut can be used with optionals params.Compute the intersection between all the sets in the given keys.longzintercard(long limit, String... keys) Similar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.longzintercard(String... keys) Similar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.longzinterstore(String dstkey, String... sets) Compute the intersection between all the sets in the given keys.longzinterstore(String dstkey, ZParams params, String... sets) Compute the intersection between all the sets in the given keys.zinterWithScores(ZParams params, String... keys) Compute the intersection between all the sets in the given keys.longReturn the number of elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.zmpop(SortedSetOption option, int count, String... keys) zmpop(SortedSetOption option, String... keys) Return the scores associated with the specified members in the sorted set stored at key.Remove and return the member with the highest score in the sorted set stored at key.Remove and return up to count members with the highest scores in the sorted set stored at key.Remove and return the member with the lowest score in the sorted set stored at key.Remove and return up to count members with the lowest scores in the sorted set stored at key.zrandmember(String key) Return a random element from the sorted set value stored at key.zrandmember(String key, long count) Return an array of distinct elements.zrandmemberWithScores(String key, long count) Similar toZRANDMEMBERbut the replay will include the scores with the result.Returns the specified range of elements in the sorted set stored at key.zrange(String key, ZRangeParams zRangeParams) Similar toZRANGEbut can be used with additional params.zrangeByLex(String key, String min, String max) Return all the elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.zrangeByLex(String key, String min, String max, int offset, int count) Similar toZRANGEbut with limit option.zrangeByScore(String key, double min, double max) Return all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).zrangeByScore(String key, double min, double max, int offset, int count) Similar toZRANGEbut with exclusive range.zrangeByScore(String key, String min, String max) Similar toZRANGEbut with exclusive range.zrangeByScore(String key, String min, String max, int offset, int count) Similar toZRANGEbut with limit option,zrangeByScoreWithScores(String key, double min, double max) Similar toZRANGEbut return with scores.zrangeByScoreWithScores(String key, double min, double max, int offset, int count) Similar toZRANGEbut with limit option, and return with scores.zrangeByScoreWithScores(String key, String min, String max) Similar toZRANGEbut with exclusive range, and return with scores.zrangeByScoreWithScores(String key, String min, String max, int offset, int count) Similar toZRANGEbut with exclusive range, with limit options and return with scores.longzrangestore(String dest, String src, ZRangeParams zRangeParams) Similar toZRANGEbut stores the result indest.zrangeWithScores(String key, long start, long stop) Returns the specified range of elements in the sorted set stored at key with the scores.zrangeWithScores(String key, ZRangeParams zRangeParams) Similar toZRANGEbut can be used with additional params.Return the rank (or index) of member in the sorted set at key, with scores being ordered from low to high.zrankWithScore(String key, String member) Returns the rank and the score of member in the sorted set stored at key, with the scores ordered from low to high.longRemove the specified member from the sorted set value stored at key.longzremrangeByLex(String key, String min, String max) Remove all elements in the sorted set stored at key between the lexicographical range specified by min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.longzremrangeByRank(String key, long start, long stop) Remove all elements in the sorted set at key with rank between start and end.longzremrangeByScore(String key, double min, double max) Remove all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).longzremrangeByScore(String key, String min, String max) Similar toZREMRANGEbut with limit option.Returns the specified range of elements in the sorted set stored at key.zrevrangeByLex(String key, String max, String min) Return all the elements in the sorted set at key with a value between max and min, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.zrevrangeByLex(String key, String max, String min, int offset, int count) Similar toZRANGEbut with limit option.zrevrangeByScore(String key, double max, double min) Return all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min).zrevrangeByScore(String key, double max, double min, int offset, int count) Similar toZRANGEbut with limit option,zrevrangeByScore(String key, String max, String min) Similar toZREVRANGEbut with exclusive range.zrevrangeByScore(String key, String max, String min, int offset, int count) Similar toZREVRANGEbut with limit option,zrevrangeByScoreWithScores(String key, double max, double min) Similar toZREVRANGEbut return with scores.zrevrangeByScoreWithScores(String key, double max, double min, int offset, int count) Similar toZREVRANGEbut with limit options and return with scores.zrevrangeByScoreWithScores(String key, String max, String min) Similar toZREVRANGEbut with exclusive range, and return with scores.zrevrangeByScoreWithScores(String key, String max, String min, int offset, int count) Similar toZREVRANGEbut with exclusive range, with limit options and return with scores.zrevrangeWithScores(String key, long start, long stop) Similar toZREVRANGEbut the reply will include the scores of the returned elements.Return the rank (or index) of member in the sorted set at key, with scores being ordered from high to low.zrevrankWithScore(String key, String member) Returns the rank and the score of member in the sorted set stored at key, with the scores ordered from high to low.default ScanResult<Tuple> zscan(String key, String cursor, ScanParams params) Return the score of the specified element of the sorted set at key.Compute the union between all the sets in the given keys.longzunionstore(String dstkey, String... sets) Compute the union between all the sets in the given keys.longzunionstore(String dstkey, ZParams params, String... sets) Compute the union between all the sets in the given keys.zunionWithScores(ZParams params, String... keys) Compute the union between all the sets in the given keys.
-
Method Details
-
zadd
Add the specified member having the specified score to the sorted set stored at key. If member is already a member of the sorted set the score is updated, and the element reinserted in the right position to ensure sorting. If key does not exist a new sorted set with the specified member as sole member is created. If the key exists but does not hold a sorted set value an error is returned.The score value can be the string representation of a double precision floating point number.
Time complexity O(log(N)) with N being the number of elements in the sorted set
- Parameters:
key-score-member-- Returns:
- 1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
-
zadd
Similar toZADDbut can be used with optional params.- Parameters:
key-score-member-params-ZAddParams- Returns:
- 1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
- See Also:
-
zadd
Similar toZADDbut for multiple members.- Parameters:
key-scoreMembers-- Returns:
- The number of elements added to the sorted set (excluding score updates).
- See Also:
-
zadd
Similar toZADDbut can be used with optional params, and fits for multiple members.- Parameters:
key-scoreMembers-params-ZAddParams- Returns:
- The number of elements added to the sorted set (excluding score updates).
- See Also:
-
zaddIncr
Increments the score of member in the sorted set stored at key by increment. If member does not exist in the sorted set, it is added with increment as its score (as if its previous score was 0.0). If key does not exist, a new sorted set with the specified member as its sole member is created.The score value should be the string representation of a numeric value, and accepts double precision floating point numbers. It is possible to provide a negative value to decrement the score.
Time complexity O(log(N)) with N being the number of elements in the sorted set
- Parameters:
key-score-member-params-ZAddParams- Returns:
- 1 if the new element was added, 0 if the element was already a member of the sorted set and the score was updated
-
zrem
Remove the specified member from the sorted set value stored at key. If member was not a member of the set no operation is performed. If key does not hold a set value an error is returned.Time complexity O(log(N)) with N being the number of elements in the sorted set
- Parameters:
key-members-- Returns:
- 1 if the new element was removed, 0 if the new element was not a member of the set
-
zincrby
If member already exists in the sorted set adds the increment to its score and updates the position of the element in the sorted set accordingly. If member does not already exist in the sorted set it is added with increment as score (that is, like if the previous score was virtually zero). If key does not exist a new sorted set with the specified member as sole member is created. If the key exists but does not hold a sorted set value an error is returned.The score value can be the string representation of a double precision floating point number. It's possible to provide a negative value to perform a decrement.
For an introduction to sorted sets check the Introduction to Redis data types page.
Time complexity O(log(N)) with N being the number of elements in the sorted set
- Parameters:
key-increment-member-- Returns:
- The new score
-
zincrby
Similar toZINCRBYbut can be used with optionals params.- Parameters:
key-increment-member-params-ZIncrByParams- Returns:
- The new score for key
- See Also:
-
zrank
Return the rank (or index) of member in the sorted set at key, with scores being ordered from low to high.When the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands.
Time complexity O(log(N))
- Parameters:
key-member-- Returns:
- The rank of the element as an integer reply if the element exists. A nil bulk reply if there is no such element
-
zrevrank
Return the rank (or index) of member in the sorted set at key, with scores being ordered from high to low.When the given member does not exist in the sorted set, the special value 'nil' is returned. The returned rank (or index) of the member is 0-based for both commands.
Time complexity O(log(N))
- Parameters:
key-member-- Returns:
- The rank of the element as an integer reply if the element exists. A nil bulk reply if there is no such element
-
zrankWithScore
Returns the rank and the score of member in the sorted set stored at key, with the scores ordered from low to high.- Parameters:
key- the keymember- the member- Returns:
- the KeyValue contains rank and score.
-
zrevrankWithScore
Returns the rank and the score of member in the sorted set stored at key, with the scores ordered from high to low.- Parameters:
key- the keymember- the member- Returns:
- the KeyValue contains rank and score.
-
zrange
Returns the specified range of elements in the sorted set stored at key.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
- Parameters:
key- the key to querystart- the minimum indexstop- the maximum index- Returns:
- A List of Strings in the specified range
-
zrevrange
Returns the specified range of elements in the sorted set stored at key. The elements are considered to be ordered from the highest to the lowest score. Descending lexicographical order is used for elements with equal score.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
- Parameters:
key- the key to querystart- the minimum indexstop- the maximum index- Returns:
- A List of Strings in the specified range
-
zrangeWithScores
Returns the specified range of elements in the sorted set stored at key with the scores.- Parameters:
key- the key to querystart- the minimum indexstop- the maximum index- Returns:
- A List of Tuple in the specified range (elements names and their scores)
-
zrevrangeWithScores
Similar toZREVRANGEbut the reply will include the scores of the returned elements.- Parameters:
key- the key to querystart- the minimum indexstop- the maximum index- Returns:
- A List of Tuple in the specified range (elements names and their scores)
- See Also:
-
zrange
Similar toZRANGEbut can be used with additional params.- Parameters:
key- the key to queryzRangeParams-ZRangeParams- Returns:
- A List of Strings in the specified range
- See Also:
-
zrangeWithScores
Similar toZRANGEbut can be used with additional params.- Parameters:
key- the key to queryzRangeParams-ZRangeParams- Returns:
- A List of Tuple in the specified range (elements names and their scores)
- See Also:
-
zrangestore
Similar toZRANGEbut stores the result indest.- Parameters:
dest- the storing keysrc- the key to queryzRangeParams-ZRangeParams- Returns:
- The number of elements in the resulting sorted set
- See Also:
-
zrandmember
Return a random element from the sorted set value stored at key.Time complexity O(N) where N is the number of elements returned
- Parameters:
key-- Returns:
- Random String from the set
-
zrandmember
Return an array of distinct elements. The array's length is either count or the sorted set's cardinality (ZCARD), whichever is lower.Time complexity O(N) where N is the number of elements returned
- Parameters:
key-count- choose up to count elements- Returns:
- A list of distinct Strings from the set
-
zrandmemberWithScores
Similar toZRANDMEMBERbut the replay will include the scores with the result.- Parameters:
key-count- choose up to count elements- Returns:
- A List of distinct Strings with their scores
- See Also:
-
zcard
Return the sorted set cardinality (number of elements). If the key does not exist 0 is returned, like for empty sorted sets.Time complexity O(1)
- Parameters:
key-- Returns:
- The cardinality (number of elements) of the set as an integer
-
zscore
Return the score of the specified element of the sorted set at key. If the specified element does not exist in the sorted set, or the key does not exist at all, a special 'nil' value is returned.Time complexity O(1)
- Parameters:
key-member-- Returns:
- The score
-
zmscore
Return the scores associated with the specified members in the sorted set stored at key. For every member that does not exist in the sorted set, a nil value is returned.Time complexity O(N) where N is the number of members being requested
- Parameters:
key-members-- Returns:
- The scores
-
zpopmax
Remove and return the member with the highest score in the sorted set stored at key.Time complexity O(log(N)) with N being the number of elements in the sorted set
- Parameters:
key-- Returns:
- The popped element and the score
-
zpopmax
Remove and return up to count members with the highest scores in the sorted set stored at key.Time complexity O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.
- Parameters:
key-count- the number of elements to pop- Returns:
- A List of popped elements and scores
-
zpopmin
Remove and return the member with the lowest score in the sorted set stored at key.Time complexity O(log(N)) with N being the number of elements in the sorted set
- Parameters:
key-- Returns:
- The popped element and the score
-
zpopmin
Remove and return up to count members with the lowest scores in the sorted set stored at key.Time complexity O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.
- Parameters:
key-count- the number of elements to pop- Returns:
- A List of popped elements and scores
-
zcount
Return the number of elements in the sorted set at key with a score between min and max.Time complexity O(log(N)) with N being the number of elements in the sorted set.
- Parameters:
key- the key to querymin- minimum scoremax- maximum score- Returns:
- The number of elements in the specified score range.
-
zcount
Similar toZCOUNTbut with exclusive range.- See Also:
-
zrangeByScore
Return all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max). The elements are considered to be ordered from low to high scores.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
- Parameters:
key- the key to querymin- minimum scoremax- maximum score- Returns:
- A List of elements in the specified score range
-
zrangeByScore
Similar toZRANGEbut with exclusive range.- See Also:
-
zrevrangeByScore
Return all the elements in the sorted set at key with a score between max and min (including elements with score equal to max or min). In contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered from high to low scores.The elements having the same score are returned in reverse lexicographical order.
Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
- Parameters:
key- the key to querymax- maximum scoremin- minimum score- Returns:
- A List of elements in the specified score range
-
zrangeByScore
Similar toZRANGEbut with exclusive range.- Parameters:
key- the key to querymin- minimum scoremax- maximum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScore
Similar toZREVRANGEbut with exclusive range.- See Also:
-
zrangeByScore
Similar toZRANGEbut with limit option,- Parameters:
key- the key to querymin- minimum scoremax- maximum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScore
Similar toZRANGEbut with limit option,- Parameters:
key- the key to querymax- maximum scoremin- minimum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrangeByScoreWithScores
Similar toZRANGEbut return with scores.- Parameters:
key- the key to querymin- minimum scoremax- maximum score- Returns:
- A List of elements with scores in the specified score range
- See Also:
-
zrevrangeByScoreWithScores
Similar toZREVRANGEbut return with scores.- Parameters:
key- the key to querymax- maximum scoremin- minimum score- Returns:
- A List of elements with scores in the specified score range
- See Also:
-
zrangeByScoreWithScores
Similar toZRANGEbut with limit option, and return with scores.- Parameters:
key- the key to querymin- minimum scoremax- maximum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScore
Similar toZREVRANGEbut with limit option,- Parameters:
key- the key to querymax- maximum scoremin- minimum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrangeByScoreWithScores
Similar toZRANGEbut with exclusive range, and return with scores.- See Also:
-
zrevrangeByScoreWithScores
Similar toZREVRANGEbut with exclusive range, and return with scores.- See Also:
-
zrangeByScoreWithScores
Similar toZRANGEbut with exclusive range, with limit options and return with scores.- Parameters:
key- the key to querymin- minimum scoremax- maximum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScoreWithScores
Similar toZREVRANGEbut with limit options and return with scores.- Parameters:
key- the key to querymax- maximum scoremin- minimum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByScoreWithScores
Similar toZREVRANGEbut with exclusive range, with limit options and return with scores.- Parameters:
key- the key to querymax- maximum scoremin- minimum scoreoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zremrangeByRank
Remove all elements in the sorted set at key with rank between start and end. Start and end are 0-based with rank 0 being the element with the lowest score. Both start and end can be negative numbers, where they indicate offsets starting at the element with the highest rank. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth.Time complexity O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
- Parameters:
key-start-stop-- Returns:
- The number of elements removed
-
zremrangeByScore
Remove all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).Time complexity O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
- Parameters:
key-min- minimum score to removemax- maximum score to remove- Returns:
- The number of elements removed
-
zremrangeByScore
Similar toZREMRANGEbut with limit option.- See Also:
-
zlexcount
Return the number of elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.Time complexity O(log(N)) with N being the number of elements in the sorted set.
- Parameters:
key-min- minimum valuemax- maximum value- Returns:
- The number of elements in the specified score range
-
zrangeByLex
Return all the elements in the sorted set at key with a value between min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
- Parameters:
key-min- minimum valuemax- maximum value- Returns:
- A List of elements in the specified score range
-
zrangeByLex
Similar toZRANGEbut with limit option.- Parameters:
key-min- minimum valuemax- maximum valueoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zrevrangeByLex
Return all the elements in the sorted set at key with a value between max and min, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned.
- Parameters:
key-max- maximum valuemin- minimum value- Returns:
- A List of elements in the specified score range
-
zrevrangeByLex
Similar toZRANGEbut with limit option.- Parameters:
key-max- maximum valuemin- minimum valueoffset- the first index of the sub-rangecount- count of the sub-range. A negative count returns all elements from the offset- Returns:
- A List of elements in the specified score range
- See Also:
-
zremrangeByLex
Remove all elements in the sorted set stored at key between the lexicographical range specified by min and max, when all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering.Time complexity O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
- Parameters:
key-min- minimum value to removemax- maximum value to remove- Returns:
- The number of elements removed
-
zscan
-
zscan
-
bzpopmax
The blocking version ofZPOPMAX- Parameters:
timeout- specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.keys-
-
bzpopmin
The blocking version ofZPOPMIN- Parameters:
timeout- specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.keys-
-
zdiff
Compute the difference between all the sets in the given keys.Time complexity O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.
- Parameters:
keys- group of sets- Returns:
- The result of the difference
-
zdiffWithScores
Compute the difference between all the sets in the given keys. Return the result with scores.- Parameters:
keys- group of sets- Returns:
- The result of the difference with their scores
-
zdiffStore
Compute the difference between all the sets in the given keys. Store the result in dstkey.- Parameters:
dstkey-keys- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey.
-
zinter
Compute the intersection between all the sets in the given keys.Time complexity O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
- Parameters:
params-ZParamskeys- group of sets- Returns:
- The result of the intersection
-
zinterWithScores
Compute the intersection between all the sets in the given keys. Return the result with scores.- Parameters:
params-ZParamskeys- group of sets- Returns:
- The result of the intersection with their scores
-
zinterstore
Compute the intersection between all the sets in the given keys. Store the result in dstkey.- Parameters:
dstkey-sets- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey
-
zinterstore
Compute the intersection between all the sets in the given keys. Store the result in dstkey.- Parameters:
dstkey-params-ZParamssets- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey
-
zintercard
Similar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
- Parameters:
keys- group of sets- Returns:
- The number of elements in the resulting intersection
- See Also:
-
zintercard
Similar toZINTER, but instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets
- Parameters:
limit- If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinalitykeys- group of sets- Returns:
- The number of elements in the resulting intersection
- See Also:
-
zunion
Compute the union between all the sets in the given keys.Time complexity O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
- Parameters:
params-ZParamskeys- group of sets- Returns:
- The result of the union
-
zunionWithScores
Compute the union between all the sets in the given keys. Return the result with scores.- Parameters:
params-ZParamskeys- group of sets- Returns:
- The result of the union with their scores
-
zunionstore
Compute the union between all the sets in the given keys. Store the result in dstkey.- Parameters:
dstkey-sets- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey
-
zunionstore
Compute the union between all the sets in the given keys. Store the result in dstkey.- Parameters:
dstkey-params-ZParamssets- group of sets- Returns:
- The number of elements in the resulting sorted set at dstkey
-
zmpop
-
zmpop
-
bzmpop
-
bzmpop
-