t

scredis.commands

SortedSetCommands

trait SortedSetCommands extends AnyRef

This trait implements sorted set commands.

Self Type
SortedSetCommands with Connection with NonBlockingConnection
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SortedSetCommands
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. def zAdd[W](key: String, members: Map[W, Score])(implicit arg0: Writer[W]): Future[Long]

    Adds one or more members to a sorted set, or update its score if it already exists.

    Adds one or more members to a sorted set, or update its score if it already exists.

    key

    sorted set key

    members

    member-score pairs to be added

    returns

    the number of elements added to the sorted sets, not including elements already existing for which the score was updated

    Since

    2.4

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    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.

  21. def zAdd[W](key: String, member: W, score: Score)(implicit arg0: Writer[W]): Future[Boolean]

    Adds a member to a sorted set, or update its score if it already exists.

    Adds a member to a sorted set, or update its score if it already exists.

    key

    sorted set key

    member

    member to add

    score

    score of the member to add

    returns

    true if the member was added, or false if the member already exists

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    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.

  22. def zCard(key: String): Future[Long]

    Returns the number of members in a sorted set.

    Returns the number of members in a sorted set.

    key

    sorted set key

    returns

    the cardinality (number of elements) of the sorted set, or 0 if key does not exist

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  23. def zCount(key: String, min: ScoreLimit, max: ScoreLimit): Future[Long]

    Returns the number of elements of a sorted set belonging to a given score range.

    Returns the number of elements of a sorted set belonging to a given score range.

    key

    sorted set key

    min

    score lower bound

    max

    score upper bound

    returns

    the number of elements in the specified score range

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  24. def zIncrBy[W](key: String, member: W, increment: Double)(implicit arg0: Writer[W]): Future[Double]

    Increments the score of a member in a sorted set.

    Increments the score of a member in a sorted set.

    key

    sorted set key

    member

    member whose score needs to be incremented

    increment

    the increment

    returns

    the new score of member

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  25. def zInterStore(destKey: String, keys: Seq[String], aggregate: Aggregate = scredis.Aggregate.Sum): Future[Long]

    Intersects multiple sorted sets and stores the resulting sorted set in a new key.

    Intersects multiple sorted sets and stores the resulting sorted set in a new key.

    destKey

    sorted set key

    keys

    keys of sorted sets to intersect

    aggregate

    aggregation function (default is Sum)

    returns

    the number of elements in the resulting sorted set stored at destKey

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  26. def zInterStoreWeighted(destKey: String, keysWeightPairs: Map[String, Double], aggregate: Aggregate = scredis.Aggregate.Sum): Future[Long]

    Intersects multiple sorted sets and stores the resulting sorted set in a new key.

    Intersects multiple sorted sets and stores the resulting sorted set in a new key.

    destKey

    sorted set key

    keysWeightPairs

    key to weight pairs

    aggregate

    aggregation function (default is Sum)

    returns

    the number of elements in the resulting sorted set stored at destKey

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  27. def zLexCount(key: String, min: LexicalScoreLimit, max: LexicalScoreLimit): Future[Long]

    Returns the number of elements of a sorted set belonging to a given lexical score range.

    Returns the number of elements of a sorted set belonging to a given lexical score range.

    key

    sorted set key

    min

    lexical score lower bound

    max

    lexical score upper bound

    returns

    the number of elements in the specified lexical score range

    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Lexical ordering only applies when all the elements in a sorted set are inserted with the same score

  28. def zRange[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by index.

    Returns a range of members in a sorted set, by index.

    key

    sorted set key

    start

    start offset (inclusive)

    stop

    stop offset (inclusive)

    returns

    the set of ascendingly ordered elements in the specified range, or the empty set if key does not exist

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on. They can also be negative numbers indicating offsets from the end of the sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and so on. Out of range indexes will not produce an error. If start is larger than the largest index in the sorted set, or start > end, an empty list is returned. If end is larger than the end of the sorted set Redis will treat it like it is the last element of the sorted set. The indexes are inclusive.

  29. def zRangeByLex[R](key: String, min: LexicalScoreLimit, max: LexicalScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by lexical score.

    Returns a range of members in a sorted set, by lexical score.

    key

    sorted set key

    min

    lexical score lower bound

    max

    lexical score upper bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of ascendingly ordered elements in the specified lexical range, or the empty set if key does not exist

    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Lexical ordering only applies when all the elements in a sorted set are inserted with the same score

  30. def zRangeByScore[R](key: String, min: ScoreLimit, max: ScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by score.

    Returns a range of members in a sorted set, by score.

    key

    sorted set key

    min

    score lower bound

    max

    score upper bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of ascendingly ordered elements in the specified score range, or the empty set if key does not exist

    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    The elements having the same score are returned in lexicographical order (this follows from a property of the sorted set implementation in Redis and does not involve further computation).

  31. def zRangeByScoreWithScores[R](key: String, min: ScoreLimit, max: ScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[(R, Score)]]

    Returns a range of members with associated scores in a sorted set, by score.

    Returns a range of members with associated scores in a sorted set, by score.

    key

    sorted set key

    min

    score lower bound

    max

    score upper bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of ascendingly ordered element-score pairs in the specified score range, or the empty set if key does not exist

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    The elements having the same score are returned in lexicographical order (this follows from a property of the sorted set implementation in Redis and does not involve further computation).

  32. def zRangeWithScores[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[LinkedHashSet[(R, Score)]]

    Returns a range of members with associated scores in a sorted set, by index.

    Returns a range of members with associated scores in a sorted set, by index.

    key

    sorted set key

    start

    start offset (inclusive)

    stop

    end offset (inclusive)

    returns

    the set of ascendingly ordered elements-score pairs in the specified range, or the empty set if key does not exist

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on. They can also be negative numbers indicating offsets from the end of the sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and so on. Out of range indexes will not produce an error. If start is larger than the largest index in the sorted set, or start > end, an empty list is returned. If end is larger than the end of the sorted set Redis will treat it like it is the last element of the sorted set. The indexes are inclusive.

  33. def zRank[W](key: String, member: W)(implicit arg0: Writer[W]): Future[Option[Long]]

    Determines the index of a member in a sorted set.

    Determines the index of a member in a sorted set.

    key

    sorted set key

    member

    the value

    returns

    the rank or index of the member, or None if the member is not in the set or the key does not exist

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  34. def zRem[W](key: String, members: W*)(implicit arg0: Writer[W]): Future[Long]

    Removes one or more members from a sorted set.

    Removes one or more members from a sorted set.

    key

    sorted set key

    members

    additional values to be removed (only works with Redis >= 2.4)

    returns

    the number of members removed from the sorted set, not including non existing members

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Redis versions older than 2.4 can only remove one value per call.

  35. def zRemRangeByLex(key: String, min: LexicalScoreLimit, max: LexicalScoreLimit): Future[Long]

    Removes all members in a sorted set within the given lexical range.

    Removes all members in a sorted set within the given lexical range.

    key

    sorted set key

    min

    lexical score lower bound

    max

    lexical score upper bound

    returns

    the number of removed elements

    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Lexical ordering only applies when all the elements in a sorted set are inserted with the same score

  36. def zRemRangeByRank(key: String, start: Long, stop: Long): Future[Long]

    Removes all members in a sorted set within the given indexes.

    Removes all members in a sorted set within the given indexes.

    key

    sorted set key

    start

    the start offset or index (inclusive)

    stop

    the stop offset or index (inclusive)

    returns

    the number of members removed

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Both start and stop are zero-based inclusive indexes with 0 being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at the element with the highest score. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth.

  37. def zRemRangeByScore(key: String, min: ScoreLimit, max: ScoreLimit): Future[Long]

    Removes all members in a sorted set within the given scores range.

    Removes all members in a sorted set within the given scores range.

    key

    sorted set key

    min

    score lower bound

    max

    score upper bound

    returns

    the number of members removed

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Since version 2.1.6, min and max can be exclusive, following the syntax of ZRANGEBYSCORE.

  38. def zRevRange[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by index, with scores ordered from high to low.

    Returns a range of members in a sorted set, by index, with scores ordered from high to low.

    key

    sorted set key

    start

    start offset (inclusive)

    stop

    stop offset (inclusive)

    returns

    the set of descendingly ordered elements in the specified range, or the empty set if key does not exist

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Apart from the reversed ordering, ZREVRANGE is similar to ZRANGE.

  39. def zRevRangeByScore[R](key: String, max: ScoreLimit, min: ScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by score, with scores ordered from high to low.

    Returns a range of members in a sorted set, by score, with scores ordered from high to low.

    key

    sorted set key

    max

    score upper bound

    min

    score lower bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of descendingly ordered elements in the specified score range, or the empty set if key does not exist

    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Apart from the reversed ordering, ZREVRANGEBYSCORE is similar to ZRANGEBYSCORE. The elements having the same score are returned in reverse lexicographical order.

  40. def zRevRangeByScoreWithScores[R](key: String, max: ScoreLimit, min: ScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[(R, Score)]]

    Return a range of members with associated scores in a sorted set, by score, with scores ordered from high to low.

    Return a range of members with associated scores in a sorted set, by score, with scores ordered from high to low.

    key

    sorted set key

    max

    score upper bound

    min

    score lower bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of descendingly ordered elements in the specified score range, or the empty set if key does not exist

    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Apart from the reversed ordering, ZREVRANGEBYSCORE is similar to ZRANGEBYSCORE. The elements having the same score are returned in reverse lexicographical order.

  41. def zRevRangeWithScores[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[LinkedHashSet[(R, Score)]]

    Returns a range of members in a sorted set, by index, with scores ordered from high to low.

    Returns a range of members in a sorted set, by index, with scores ordered from high to low.

    key

    sorted set key

    start

    start offset (inclusive)

    stop

    stop offset (inclusive)

    returns

    the set of descendingly ordered elements-score pairs in the specified range, or the empty set if key does not exist

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Apart from the reversed ordering, ZREVRANGE is similar to ZRANGE. The elements having the same score are returned in reverse lexicographical order.

  42. def zRevRank[W](key: String, member: W)(implicit arg0: Writer[W]): Future[Option[Long]]

    Determine the index of a member in a sorted set, with scores ordered from high to low.

    Determine the index of a member in a sorted set, with scores ordered from high to low.

    key

    sorted set key

    member

    the value

    returns

    the rank or index of the member, or None if the member is not in the set or the key does not exist

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  43. def zScan[R](key: String, cursor: Long, matchOpt: Option[String] = None, countOpt: Option[Int] = None)(implicit arg0: Reader[R]): Future[(Long, LinkedHashSet[(R, Score)])]

    Incrementally iterates the elements (value-score pairs) of a sorted set.

    Incrementally iterates the elements (value-score pairs) of a sorted set.

    cursor

    the offset

    matchOpt

    when defined, the command only returns elements matching the pattern

    countOpt

    when defined, provides a hint of how many elements should be returned

    returns

    a pair containing the next cursor as its first element and the sorted set of elements (value-score pairs) as its second element

    Since

    2.8.0

  44. def zScore[W](key: String, member: W)(implicit arg0: Writer[W]): Future[Option[Score]]

    Returns the score associated with the given member in a sorted set.

    Returns the score associated with the given member in a sorted set.

    key

    sorted set key

    member

    the value

    returns

    the score of member, or None if the latter is not in the sorted set or the key does not exist

    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  45. def zUnionStore(destKey: String, keys: Seq[String], aggregate: Aggregate = scredis.Aggregate.Sum): Future[Long]

    Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.

    Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.

    destKey

    sorted set key

    keys

    keys of sorted sets

    aggregate

    aggregation function (default is Sum)

    returns

    the number of elements in the resulting sorted set stored at destKey

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  46. def zUnionStoreWeighted(destKey: String, keysWeightPairs: Map[String, Double], aggregate: Aggregate = scredis.Aggregate.Sum): Future[Long]

    Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.

    Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.

    destKey

    sorted set key

    keysWeightPairs

    key to weight pairs

    aggregate

    aggregation function (default is Sum)

    returns

    the number of elements in the resulting sorted set stored at destKey

    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

Inherited from AnyRef

Inherited from Any

Ungrouped