RedisSortedSet
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Type members
Types
Value members
Abstract methods
Adds all the specified members with the specified scores to the sorted set stored at key. It is possible to specify multiple score / member pairs. If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering.
Adds all the specified members with the specified scores to the sorted set stored at key. It is possible to specify multiple score / member pairs. If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering.
If key does not exist, a new sorted set with the specified members as sole members is created, like if the sorted set was empty.
Value parameters
- scoreValues
-
values and corresponding scores to be added
Attributes
- Returns
-
the sorted set for chaining calls
- Note
-
If the key exists but does not hold a sorted set, an error is returned.
Time complexity: O(log(N)) for each item added, where N is the number of elements in the sorted set.
Tests if the element is contained in the sorted set. Returns true if exists, otherwise returns false
Tests if the element is contained in the sorted set. Returns true if exists, otherwise returns false
Value parameters
- element
-
tested element
Attributes
- Returns
-
true if exists in the set, otherwise false
- Note
-
Time complexity: O(1)
Returns the specified range of elements in the sorted set stored at key which sorted in order specified by param isReverse
.
Returns the specified range of elements in the sorted set stored at key which sorted in order specified by param isReverse
.
Value parameters
- isReverse
-
whether sorted in descending order or not
- start
-
the start index of the range
- stop
-
the stop index of the range
Attributes
Removes the specified members from the sorted set stored at key. Non existing members are ignored. An error is returned when key exists and does not hold a sorted set.
Removes the specified members from the sorted set stored at key. Non existing members are ignored. An error is returned when key exists and does not hold a sorted set.
Value parameters
- element
-
elements to be removed
Attributes
- Returns
-
the sorted set for chaining calls
- Note
-
Time complexity: O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.
Inherited methods
Attributes
- Inherited from:
- RedisCollection (hidden)
Attributes
- Inherited from:
- RedisCollection (hidden)
Returns the length of the collection stored at key. If key does not exist, it is interpreted as an empty collection and 0 is returned. An error is returned when the value stored at key is not a proper collection.
Returns the length of the collection stored at key. If key does not exist, it is interpreted as an empty collection and 0 is returned. An error is returned when the value stored at key is not a proper collection.
Time complexity: O(1)
Attributes
- Returns
-
size of the list
- Inherited from:
- RedisCollection (hidden)