Interface TransactionalSortedSetCommands<K,V>

All Superinterfaces:
TransactionalRedisCommands
All Known Implementing Classes:
BlockingTransactionalSortedSetCommandsImpl

public interface TransactionalSortedSetCommands<K,V> extends TransactionalRedisCommands
  • Method Details

    • zadd

      void zadd(K key, double score, V member)
      Execute the command ZADD. Summary: Add one or more members to a sorted set, or update its score if it already exists Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      score - the score
      member - the member
    • zadd

      void zadd(K key, Map<V,Double> items)
      Execute the command ZADD. Summary: Add one or more members to a sorted set, or update its score if it already exists Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      items - the map of score/value to be added
    • zadd

      void zadd(K key, ScoredValue<V>... items)
      Execute the command ZADD. Summary: Add one or more members to a sorted set, or update its score if it already exists Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      items - the pairs of value/score to be added
    • zadd

      void zadd(K key, ZAddArgs zAddArgs, double score, V member)
      Execute the command ZADD. Summary: Add one or more members to a sorted set, or update its score if it already exists Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      zAddArgs - the extra parameter
      score - the score
      member - the member
    • zadd

      void zadd(K key, ZAddArgs zAddArgs, Map<V,Double> items)
      Execute the command ZADD. Summary: Add one or more members to a sorted set, or update its score if it already exists Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      zAddArgs - the extra parameter
      items - the map of value/score to be added
    • zadd

      void zadd(K key, ZAddArgs zAddArgs, ScoredValue<V>... items)
      Execute the command ZADD. Summary: Add one or more members to a sorted set, or update its score if it already exists Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      zAddArgs - the extra parameter
      items - the pairs of score/value to be added
    • zaddincr

      void zaddincr(K key, double score, V member)
      Execute the command ZADD. Summary: Add one or more members to a sorted set, or update its score if it already exists applying the INCR option Group: sorted-set Requires Redis 1.2.0

      This variant of ZADD acts like ZINCRBY. Only one score-element pair can be specified in this mode.

      Parameters:
      key - the key.
      score - the increment.
      member - the member.
    • zaddincr

      void zaddincr(K key, ZAddArgs zAddArgs, double score, V member)
      Execute the command ZADD. Summary: Add one or more members to a sorted set, or update its score if it already exists applying the INCR option Group: sorted-set Requires Redis 1.2.0

      This variant of ZADD acts like ZINCRBY. Only one score-element pair can be specified in this mode.

      Parameters:
      key - the key.
      score - the increment.
      member - the member.
    • zcard

      void zcard(K key)
      Execute the command ZCARD. Summary: Get the number of members in a sorted set Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
    • zcount

      void zcount(K key, ScoreRange<Double> range)
      Execute the command ZCOUNT. Summary: Count the members in a sorted set with scores within the given values Group: sorted-set Requires Redis 2.0.0
      Parameters:
      key - the key
      range - the range
    • zdiff

      void zdiff(K... keys)
      Execute the command ZDIFF. Summary: Subtract multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      keys - the keys
    • zdiffWithScores

      void zdiffWithScores(K... keys)
      Execute the command ZDIFF. Summary: Subtract multiple sorted sets, and returns the list of keys with their scores Group: sorted-set Requires Redis 6.2.0
      Parameters:
      keys - the keys
    • zdiffstore

      void zdiffstore(K destination, K... keys)
      Execute the command ZDIFFSTORE. Summary: Subtract multiple sorted sets and store the resulting sorted set in a new key Group: sorted-set Requires Redis 6.2.0
      Parameters:
      destination - the destination key
      keys - the keys to compare
    • zincrby

      void zincrby(K key, double increment, V member)
      Execute the command ZINCRBY. Summary: Increment the score of a member in a sorted set Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
    • zinter

      void zinter(ZAggregateArgs arguments, K... keys)
      Execute the command ZINTER. Summary: Intersect multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      arguments - the ZINTER command extra-arguments
      keys - the keys
    • zinter

      void zinter(K... keys)
      Execute the command ZINTER. Summary: Intersect multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      keys - the keys
    • zinterWithScores

      void zinterWithScores(ZAggregateArgs arguments, K... keys)
      Execute the command ZINTER. Summary: Intersect multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      arguments - the ZINTER command extra-arguments
      keys - the keys
    • zinterWithScores

      void zinterWithScores(K... keys)
      Execute the command ZINTER. Summary: Intersect multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      keys - the keys
    • zintercard

      void zintercard(K... keys)
      Execute the command ZINTERCARD. Summary: Intersect multiple sorted sets and return the cardinality of the result Group: sorted-set Requires Redis 7.0.0
      Parameters:
      keys - the keys
    • zintercard

      void zintercard(long limit, K... keys)
      Execute the command ZINTERCARD. Summary: Intersect multiple sorted sets and return the cardinality of the result Group: sorted-set Requires Redis 7.0.0
      Parameters:
      limit - if the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.
      keys - the keys
    • zinterstore

      void zinterstore(K destination, ZAggregateArgs arguments, K... keys)
      Execute the command ZINTERSTORE. Summary: Intersect multiple sorted sets and store the resulting sorted set in a new key Group: sorted-set Requires Redis 2.0.0
      Parameters:
      destination - the destination key
      arguments - the ZINTERSTORE command extra-arguments
      keys - the keys of the sorted set to analyze
    • zinterstore

      void zinterstore(K destination, K... keys)
      Execute the command ZINTERSTORE. Summary: Intersect multiple sorted sets and store the resulting sorted set in a new key Group: sorted-set Requires Redis 2.0.0
      Parameters:
      destination - the destination key
      keys - the keys of the sorted set to analyze
    • zlexcount

      void zlexcount(K key, Range<String> range)
      Execute the command ZLEXCOUNT. Summary: Count the number of members in a sorted set between a given lexicographical range Group: sorted-set Requires Redis 2.8.9
      Parameters:
      key - the key
      range - the range
    • zmpopMin

      void zmpopMin(K... keys)
      Execute the command ZMPOP. Summary: Remove and return members with scores in a sorted set Group: sorted-set Requires Redis 7.0.0

      The elements popped are those with the lowest scores from the first non-empty sorted set.

      Parameters:
      keys - the keys
    • zmpopMin

      void zmpopMin(int count, K... keys)
      Execute the command ZMPOP. Summary: Remove and return members with scores in a sorted set Group: sorted-set Requires Redis 7.0.0

      The elements popped are those with the lowest scores from the first non-empty sorted set.

      Parameters:
      count - the max number of element to pop
      keys - the keys
    • zmpopMax

      void zmpopMax(K... keys)
      Execute the command ZMPOP. Summary: Remove and return members with scores in a sorted set Group: sorted-set Requires Redis 7.0.0

      The elements with the highest scores to be popped.

      Parameters:
      keys - the keys
    • zmpopMax

      void zmpopMax(int count, K... keys)
      Execute the command ZMPOP. Summary: Remove and return members with scores in a sorted set Group: sorted-set Requires Redis 7.0.0

      The elements with the highest scores to be popped.

      Parameters:
      count - the max number of element to pop
      keys - the keys
    • bzmpopMin

      void bzmpopMin(Duration timeout, K... keys)
      Execute the command BZMPOP. Summary: Remove and return members with scores in a sorted set or block until one is available. Group: sorted-set Requires Redis 7.0.0

      The elements popped are those with the lowest scores from the first non-empty sorted set.

      Parameters:
      timeout - the timeout
      keys - the keys
    • bzmpopMin

      void bzmpopMin(Duration timeout, int count, K... keys)
      Execute the command BZMPOP. Summary: Remove and return members with scores in a sorted set or block until one is available. Group: sorted-set Requires Redis 7.0.0

      The elements popped are those with the lowest scores from the first non-empty sorted set.

      Parameters:
      timeout - the timeout
      count - the max number of element to pop
      keys - the keys
    • bzmpopMax

      void bzmpopMax(Duration timeout, K... keys)
      Execute the command BZMPOP. Summary: Remove and return members with scores in a sorted set or block until one is available. Group: sorted-set Requires Redis 7.0.0

      The elements with the highest scores to be popped.

      Parameters:
      timeout - the timeout
      keys - the keys
    • bzmpopMax

      void bzmpopMax(Duration timeout, int count, K... keys)
      Execute the command BZMPOP. Summary: Remove and return members with scores in a sorted set or block until one is available. Group: sorted-set Requires Redis 7.0.0

      The elements with the highest scores to be popped.

      Parameters:
      timeout - the timeout
      count - the max number of element to pop
      keys - the keys
    • zmscore

      void zmscore(K key, V... members)
      Execute the command ZMSCORE. Summary: Get the score associated with the given members in a sorted set Group: sorted-set Requires Redis 6.2.0
      Parameters:
      key - the key
      members - the members
    • zpopmax

      void zpopmax(K key)
      Execute the command ZPOPMAX. Summary: Remove and return members with the highest scores in a sorted set Group: sorted-set Requires Redis 5.0.0
      Parameters:
      key - the key
    • zpopmax

      void zpopmax(K key, int count)
      Execute the command ZPOPMAX. Summary: Remove and return members with the highest scores in a sorted set Group: sorted-set Requires Redis 5.0.0
      Parameters:
      key - the key
    • zpopmin

      void zpopmin(K key)
      Execute the command ZPOPMIN. Summary: Remove and return members with the lowest scores in a sorted set Group: sorted-set Requires Redis 5.0.0
      Parameters:
      key - the key
    • zpopmin

      void zpopmin(K key, int count)
      Execute the command ZPOPMIN. Summary: Remove and return members with the lowest scores in a sorted set Group: sorted-set Requires Redis 5.0.0
      Parameters:
      key - the key
    • zrandmember

      void zrandmember(K key)
      Execute the command ZRANDMEMBER. Summary: Get one or multiple random elements from a sorted set Group: sorted-set Requires Redis 6.2.0
      Parameters:
      key - the key
    • zrandmember

      void zrandmember(K key, int count)
      Execute the command ZRANDMEMBER. Summary: Get one or multiple random elements from a sorted set Group: sorted-set Requires Redis 6.2.0
      Parameters:
      key - the key
      count - the number of member to select
    • zrandmemberWithScores

      void zrandmemberWithScores(K key)
      Execute the command ZRANDMEMBER. Summary: Get one or multiple random elements from a sorted set Group: sorted-set Requires Redis 6.2.0
      Parameters:
      key - the key
    • zrandmemberWithScores

      void zrandmemberWithScores(K key, int count)
      Execute the command ZRANDMEMBER. Summary: Get one or multiple random elements from a sorted set Group: sorted-set Requires Redis 6.2.0
      Parameters:
      key - the key
      count - the number of member to select
    • bzpopmin

      void bzpopmin(Duration timeout, K... keys)
      Execute the command BZPOPMIN. Summary: Remove and return the member with the lowest score from one or more sorted sets, or block until one is available Group: sorted-set Requires Redis 5.0.0
      Parameters:
      timeout - the max timeout
      keys - the keys
    • bzpopmax

      void bzpopmax(Duration timeout, K... keys)
      Execute the command BZPOPMAX. Summary: Remove and return the member with the highest score from one or more sorted sets, or block until one is available Group: sorted-set Requires Redis 5.0.0
    • zrange

      void zrange(K key, long start, long stop, ZRangeArgs args)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set Group: sorted-set Requires Redis 1.2.0

      This method extracts a range my rank/index in the stream.

      Parameters:
      key - the key
      start - the start position
      stop - the stop position
      args - the extra ZRANGE parameters
    • zrangeWithScores

      void zrangeWithScores(K key, long start, long stop, ZRangeArgs args)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      start - the start position
      stop - the stop position
      args - the extra ZRANGE parameters
    • zrange

      void zrange(K key, long start, long stop)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set Group: sorted-set Requires Redis 1.2.0

      This method extracts a range my rank/index in the stream.

      Parameters:
      key - the key
      start - the start position
      stop - the stop position
    • zrangeWithScores

      void zrangeWithScores(K key, long start, long stop)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      start - the start position
      stop - the stop position
    • zrangebylex

      void zrangebylex(K key, Range<String> range, ZRangeArgs args)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set using lexicographical ranges Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      range - the range
      args - the extra ZRANGE parameters
    • zrangebylex

      void zrangebylex(K key, Range<String> range)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set using lexicographical ranges Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      range - the range
    • zrangebyscore

      void zrangebyscore(K key, ScoreRange<Double> range, ZRangeArgs args)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set using score ranges Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      range - the range
      args - the extra ZRANGE parameters
    • zrangebyscoreWithScores

      void zrangebyscoreWithScores(K key, ScoreRange<Double> range, ZRangeArgs args)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set using lexicographical ranges Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      range - the range
      args - the extra ZRANGE parameters
    • zrangebyscore

      void zrangebyscore(K key, ScoreRange<Double> range)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set using score ranges Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      range - the range
    • zrangebyscoreWithScores

      void zrangebyscoreWithScores(K key, ScoreRange<Double> range)
      Execute the command ZRANGE. Summary: Return a range of members in a sorted set using score ranges Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      range - the range
    • zrangestore

      void zrangestore(K dst, K src, long min, long max, ZRangeArgs args)
      Execute the command ZRANGESTORE. Summary: Store a range (by rank) of members from sorted set into another key Group: sorted-set Requires Redis 6.2.0
      Parameters:
      dst - the key
      src - the key
      min - the lower bound of the range
      max - the upper bound of the range
      args - the ZRANGESTORE command extra-arguments
    • zrangestore

      void zrangestore(K dst, K src, long min, long max)
      Execute the command ZRANGESTORE. Summary: Store a range (by rank) of members from sorted set into another key Group: sorted-set Requires Redis 6.2.0
      Parameters:
      dst - the key
      src - the key
      min - the lower bound of the range
      max - the upper bound of the range
    • zrangestorebylex

      void zrangestorebylex(K dst, K src, Range<String> range, ZRangeArgs args)
      Execute the command ZRANGESTORE. Summary: Store a range (by lexicographical order) of members from sorted set into another key Group: sorted-set Requires Redis 6.2.0
      Parameters:
      dst - the key
      src - the key
      range - the range
      args - the ZRANGESTORE command extra-arguments
    • zrangestorebylex

      void zrangestorebylex(K dst, K src, Range<String> range)
      Execute the command ZRANGESTORE. Summary: Store a range (by lexicographical order) of members from sorted set into another key Group: sorted-set Requires Redis 6.2.0
      Parameters:
      dst - the key
      src - the key
      range - the range
    • zrangestorebyscore

      void zrangestorebyscore(K dst, K src, ScoreRange<Double> range, ZRangeArgs args)
      Execute the command ZRANGESTORE. Summary: Store a range (by score order) of members from sorted set into another key Group: sorted-set Requires Redis 6.2.0
      Parameters:
      dst - the key
      src - the key
      range - the range
      args - the ZRANGESTORE command extra-arguments
    • zrangestorebyscore

      void zrangestorebyscore(K dst, K src, ScoreRange<Double> range)
      Execute the command ZRANGESTORE. Summary: Store a range (by score order) of members from sorted set into another key Group: sorted-set Requires Redis 6.2.0
      Parameters:
      dst - the key
      src - the key
      range - the range
    • zrank

      void zrank(K key, V member)
      Execute the command ZRANK. Summary: Determine the index of a member in a sorted set Group: sorted-set Requires Redis 2.0.0
      Parameters:
      key - the key
    • zrem

      void zrem(K key, V... members)
      Execute the command ZREM. Summary: Remove one or more members from a sorted set Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      members - the members to remove
    • zremrangebylex

      void zremrangebylex(K key, Range<String> range)
      Execute the command ZREMRANGEBYLEX. Summary: Remove all members in a sorted set between the given lexicographical range Group: sorted-set Requires Redis 2.8.9
      Parameters:
      key - the key
      range - the range
    • zremrangebyrank

      void zremrangebyrank(K key, long start, long stop)
      Execute the command ZREMRANGEBYRANK. Summary: Remove all members in a sorted set within the given indexes Group: sorted-set Requires Redis 2.0.0
      Parameters:
      key - the key
      start - the lower bound of the range
      stop - the upper bound of the range
    • zremrangebyscore

      void zremrangebyscore(K key, ScoreRange<Double> range)
      Execute the command ZREMRANGEBYSCORE. Summary: Remove all members in a sorted set within the given scores Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      range - the range
    • zrevrank

      void zrevrank(K key, V member)
      Execute the command ZREVRANK. Summary: Determine the index of a member in a sorted set, with scores ordered from high to low Group: sorted-set Requires Redis 2.0.0
      Parameters:
      key - the key
    • zscore

      void zscore(K key, V member)
      Execute the command ZSCORE. Summary: Get the score associated with the given member in a sorted set Group: sorted-set Requires Redis 1.2.0
      Parameters:
      key - the key
      member - the member
    • zunion

      void zunion(ZAggregateArgs args, K... keys)
      Execute the command ZUNION. Summary: Add multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      args - the ZUNION command extra-arguments
      keys - the keys
    • zunion

      void zunion(K... keys)
      Execute the command ZUNION. Summary: Add multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      keys - the keys
    • zunionWithScores

      void zunionWithScores(ZAggregateArgs args, K... keys)
      Execute the command ZUNION. Summary: Add multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      args - the ZUNION command extra-arguments
      keys - the keys
    • zunionWithScores

      void zunionWithScores(K... keys)
      Execute the command ZUNION. Summary: Add multiple sorted sets Group: sorted-set Requires Redis 6.2.0
      Parameters:
      keys - the keys
    • zunionstore

      void zunionstore(K destination, ZAggregateArgs args, K... keys)
      Execute the command ZUNIONSTORE. Summary: Add multiple sorted sets and store the resulting sorted set in a new key Group: sorted-set Requires Redis 2.0.0
      Parameters:
      destination - the destination key
      args - the zunionstore command extra-arguments
      keys - the keys
    • zunionstore

      void zunionstore(K destination, K... keys)
      Execute the command ZUNIONSTORE. Summary: Add multiple sorted sets and store the resulting sorted set in a new key Group: sorted-set Requires Redis 2.0.0
      Parameters:
      destination - the destination key
      keys - the keys