Interface ZSetOperations<K,V>


@NullUnmarked public interface ZSetOperations<K,V>
Redis ZSet/sorted set specific operations.
Author:
Costin Leau, Christoph Strobl, Mark Paluch, Rosty Kerei, Wongoo (望哥), Andrey Shlykov, Shyngys Sapraliyev, Gunha Hwang
  • Method Details

    • add

      Boolean add(@NonNull K key, @NonNull V value, double score)
      Add value to a sorted set at key, or update its score if it already exists.
      Parameters:
      key - must not be null.
      value - the value.
      score - the score.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • addIfAbsent

      Boolean addIfAbsent(@NonNull K key, @NonNull V value, double score)
      Add value to a sorted set at key if it does not already exists.
      Parameters:
      key - must not be null.
      value - the value.
      score - the score.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.5
      See Also:
    • add

      Long add(@NonNull K key, @NonNull Set<@NonNull ZSetOperations.TypedTuple<V>> tuples)
      Add tuples to a sorted set at key, or update its score if it already exists.
      Parameters:
      key - must not be null.
      tuples - must not be null.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • addIfAbsent

      Long addIfAbsent(@NonNull K key, @NonNull Set<@NonNull ZSetOperations.TypedTuple<V>> tuples)
      Add tuples to a sorted set at key if it does not already exists.
      Parameters:
      key - must not be null.
      tuples - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.5
      See Also:
    • remove

      Long remove(@NonNull K key, @NonNull Object @NonNull ... values)
      Remove values from sorted set. Return number of removed elements.
      Parameters:
      key - must not be null.
      values - must not be null.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • incrementScore

      Double incrementScore(@NonNull K key, @NonNull V value, double delta)
      Increment the score of element with value in sorted set by increment.
      Parameters:
      key - must not be null.
      value - the value.
      delta - the delta to add. Can be negative.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • randomMember

      V randomMember(@NonNull K key)
      Get random element from set at key.
      Parameters:
      key - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • distinctRandomMembers

      Set<V> distinctRandomMembers(@NonNull K key, long count)
      Get count distinct random elements from set at key.
      Parameters:
      key - must not be null.
      count - number of members to return.
      Returns:
      empty Set if key does not exist.
      Throws:
      IllegalArgumentException - if count is negative.
      Since:
      2.6
      See Also:
    • randomMembers

      List<V> randomMembers(@NonNull K key, long count)
      Get count random elements from set at key.
      Parameters:
      key - must not be null.
      count - number of members to return.
      Returns:
      empty List if key does not exist or null when used in pipeline / transaction.
      Throws:
      IllegalArgumentException - if count is negative.
      Since:
      2.6
      See Also:
    • randomMemberWithScore

      ZSetOperations.TypedTuple<V> randomMemberWithScore(@NonNull K key)
      Get random element with its score from set at key.
      Parameters:
      key - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • distinctRandomMembersWithScore

      Set<@NonNull ZSetOperations.TypedTuple<V>> distinctRandomMembersWithScore(@NonNull K key, long count)
      Get count distinct random elements with their score from set at key.
      Parameters:
      key - must not be null.
      count - number of members to return.
      Returns:
      empty Set if key does not exist.
      Throws:
      IllegalArgumentException - if count is negative.
      Since:
      2.6
      See Also:
    • randomMembersWithScore

      List<ZSetOperations.TypedTuple<V>> randomMembersWithScore(@NonNull K key, long count)
      Get count random elements with their score from set at key.
      Parameters:
      key - must not be null.
      count - number of members to return.
      Returns:
      empty List if key does not exist or null when used in pipeline / transaction.
      Throws:
      IllegalArgumentException - if count is negative.
      Since:
      2.6
      See Also:
    • rank

      Long rank(@NonNull K key, @NonNull Object value)
      Determine the index of element with value in a sorted set.
      Parameters:
      key - must not be null.
      value - the value.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • reverseRank

      Long reverseRank(@NonNull K key, @NonNull Object value)
      Determine the index of element with value in a sorted set when scored high to low.
      Parameters:
      key - must not be null.
      value - the value.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • range

      Set<V> range(@NonNull K key, long start, long end)
      Get elements between start and end from sorted set.
      Parameters:
      key - must not be null.
      start -
      end -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • rangeWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> rangeWithScores(@NonNull K key, long start, long end)
      Get set of Tuples between start and end from sorted set.
      Parameters:
      key - must not be null.
      start -
      end -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • rangeByScore

      Set<V> rangeByScore(@NonNull K key, double min, double max)
      Get elements where score is between min and max from sorted set.
      Parameters:
      key - must not be null.
      min -
      max -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • rangeByScoreWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> rangeByScoreWithScores(@NonNull K key, double min, double max)
      Get set of Tuples where score is between min and max from sorted set.
      Parameters:
      key - must not be null.
      min -
      max -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • rangeByScore

      Set<V> rangeByScore(@NonNull K key, double min, double max, long offset, long count)
      Get elements in range from start to end where score is between min and max from sorted set.
      Parameters:
      key - must not be null.
      min -
      max -
      offset -
      count -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • rangeByScoreWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> rangeByScoreWithScores(@NonNull K key, double min, double max, long offset, long count)
      Get set of Tuples in range from start to end where score is between min and max from sorted set.
      Parameters:
      key -
      min -
      max -
      offset -
      count -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • reverseRange

      Set<V> reverseRange(@NonNull K key, long start, long end)
      Get elements in range from start to end from sorted set ordered from high to low.
      Parameters:
      key - must not be null.
      start -
      end -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • reverseRangeWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> reverseRangeWithScores(@NonNull K key, long start, long end)
      Get set of Tuples in range from start to end from sorted set ordered from high to low.
      Parameters:
      key - must not be null.
      start -
      end -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • reverseRangeByScore

      Set<V> reverseRangeByScore(@NonNull K key, double min, double max)
      Get elements where score is between min and max from sorted set ordered from high to low.
      Parameters:
      key - must not be null.
      min -
      max -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • reverseRangeByScoreWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> reverseRangeByScoreWithScores(@NonNull K key, double min, double max)
      Get set of Tuple where score is between min and max from sorted set ordered from high to low.
      Parameters:
      key - must not be null.
      min -
      max -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • reverseRangeByScore

      Set<V> reverseRangeByScore(@NonNull K key, double min, double max, long offset, long count)
      Get elements in range from start to end where score is between min and max from sorted set ordered high -> low.
      Parameters:
      key - must not be null.
      min -
      max -
      offset -
      count -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • reverseRangeByScoreWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> reverseRangeByScoreWithScores(@NonNull K key, double min, double max, long offset, long count)
      Get set of Tuple in range from start to end where score is between min and max from sorted set ordered high -> low.
      Parameters:
      key - must not be null.
      min -
      max -
      offset -
      count -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • count

      Long count(@NonNull K key, double min, double max)
      Count number of elements within sorted set with scores between min and max.
      Parameters:
      key - must not be null.
      min -
      max -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • lexCount

      Long lexCount(@NonNull K key, @NonNull Range<String> range)
      Count number of elements within sorted set with value between Range.getLowerBound() and Range.getUpperBound() applying lexicographical ordering.
      Parameters:
      key - must not be null.
      range - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • popMin

      ZSetOperations.TypedTuple<V> popMin(@NonNull K key)
      Remove and return the value with its score having the lowest score from sorted set at key.
      Parameters:
      key - must not be null.
      Returns:
      null when the sorted set is empty or used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • popMin

      Set<@NonNull ZSetOperations.TypedTuple<V>> popMin(@NonNull K key, long count)
      Remove and return count values with their score having the lowest score from sorted set at key.
      Parameters:
      key - must not be null.
      count - number of elements to pop.
      Returns:
      null when the sorted set is empty or used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • popMin

      ZSetOperations.TypedTuple<V> popMin(@NonNull K key, long timeout, @NonNull TimeUnit unit)
      Remove and return the value with its score having the lowest score from sorted set at key.
      Blocks connection until element available or timeout reached.
      Parameters:
      key - must not be null.
      timeout -
      unit - must not be null.
      Returns:
      can be null.
      Since:
      2.6
      See Also:
    • popMin

      default ZSetOperations.TypedTuple<@NonNull V> popMin(@NonNull K key, @NonNull Duration timeout)
      Remove and return the value with its score having the lowest score from sorted set at key.
      Blocks connection until element available or timeout reached.
      Parameters:
      key - must not be null.
      timeout - must not be null.
      Returns:
      can be null.
      Throws:
      IllegalArgumentException - if the timeout is null or negative.
      Since:
      2.6
      See Also:
    • popMax

      ZSetOperations.TypedTuple<V> popMax(@NonNull K key)
      Remove and return the value with its score having the highest score from sorted set at key.
      Parameters:
      key - must not be null.
      Returns:
      null when the sorted set is empty or used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • popMax

      Set<ZSetOperations.TypedTuple<V>> popMax(@NonNull K key, long count)
      Remove and return count values with their score having the highest score from sorted set at key.
      Parameters:
      key - must not be null.
      count - number of elements to pop.
      Returns:
      null when the sorted set is empty or used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • popMax

      ZSetOperations.TypedTuple<V> popMax(@NonNull K key, long timeout, @NonNull TimeUnit unit)
      Remove and return the value with its score having the highest score from sorted set at key.
      Blocks connection until element available or timeout reached.
      Parameters:
      key - must not be null.
      timeout -
      unit - must not be null.
      Returns:
      can be null.
      Since:
      2.6
      See Also:
    • popMax

      default ZSetOperations.TypedTuple<V> popMax(@NonNull K key, @NonNull Duration timeout)
      Remove and return the value with its score having the highest score from sorted set at key.
      Blocks connection until element available or timeout reached.
      Parameters:
      key - must not be null.
      timeout - must not be null.
      Returns:
      can be null.
      Throws:
      IllegalArgumentException - if the timeout is null or negative.
      Since:
      2.6
      See Also:
    • size

      Long size(@NonNull K key)
      Returns the number of elements of the sorted set stored with given key.
      Parameters:
      key -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • zCard

      Long zCard(@NonNull K key)
      Get the size of sorted set with key.
      Parameters:
      key - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      1.3
      See Also:
    • score

      Double score(@NonNull K key, Object value)
      Get the score of element with value from sorted set with key key.
      Parameters:
      key - must not be null.
      value - the value.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • score

      List<Double> score(@NonNull K key, Object... o)
      Get the scores of elements with values from sorted set with key key.
      Parameters:
      key - must not be null.
      o - the values.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • removeRange

      Long removeRange(@NonNull K key, long start, long end)
      Remove elements in range between start and end from sorted set with key.
      Parameters:
      key - must not be null.
      start -
      end -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • removeRangeByLex

      Long removeRangeByLex(@NonNull K key, @NonNull Range<String> range)
      Remove elements in Range from sorted set with key.
      Parameters:
      key - must not be null.
      range - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • removeRangeByScore

      Long removeRangeByScore(@NonNull K key, double min, double max)
      Remove elements with scores between min and max from sorted set with key.
      Parameters:
      key - must not be null.
      min -
      max -
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • difference

      default Set<V> difference(@NonNull K key, @NonNull K otherKey)
      Diff sorted sets.
      Parameters:
      key - must not be null.
      otherKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • difference

      Set<V> difference(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys)
      Diff sorted sets.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • differenceWithScores

      default Set<@NonNull ZSetOperations.TypedTuple<V>> differenceWithScores(@NonNull K key, @NonNull K otherKey)
      Diff sorted sets.
      Parameters:
      key - must not be null.
      otherKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • differenceWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> differenceWithScores(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys)
      Diff sorted sets.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • differenceAndStore

      Long differenceAndStore(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull K destKey)
      Diff sorted sets and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      destKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • intersect

      default Set<V> intersect(@NonNull K key, @NonNull K otherKey)
      Intersect sorted sets.
      Parameters:
      key - must not be null.
      otherKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • intersect

      Set<V> intersect(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys)
      Intersect sorted sets.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • intersectWithScores

      default Set<@NonNull ZSetOperations.TypedTuple<V>> intersectWithScores(@NonNull K key, @NonNull K otherKey)
      Intersect sorted sets.
      Parameters:
      key - must not be null.
      otherKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • intersectWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> intersectWithScores(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys)
      Intersect sorted sets.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • intersectWithScores

      default Set<ZSetOperations.TypedTuple<V>> intersectWithScores(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull Aggregate aggregate)
      Intersect sorted sets at key and otherKeys .
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      aggregate - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • intersectWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> intersectWithScores(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull Aggregate aggregate, @NonNull Weights weights)
      Intersect sorted sets.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      aggregate - must not be null.
      weights - must not be null.
      Returns:
      Since:
      2.6
      See Also:
    • intersectAndStore

      Long intersectAndStore(@NonNull K key, @NonNull K otherKey, @NonNull K destKey)
      Intersect sorted sets at key and otherKey and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKey - must not be null.
      destKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • intersectAndStore

      Long intersectAndStore(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull K destKey)
      Intersect sorted sets at key and otherKeys and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      destKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • intersectAndStore

      default Long intersectAndStore(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull K destKey, @NonNull Aggregate aggregate)
      Intersect sorted sets at key and otherKeys and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      destKey - must not be null.
      aggregate - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.1
      See Also:
    • intersectAndStore

      Long intersectAndStore(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull K destKey, @NonNull Aggregate aggregate, @NonNull Weights weights)
      Intersect sorted sets at key and otherKeys and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      destKey - must not be null.
      aggregate - must not be null.
      weights - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.1
      See Also:
    • union

      default Set<V> union(@NonNull K key, @NonNull K otherKey)
      Union sorted sets.
      Parameters:
      key - must not be null.
      otherKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • union

      Set<V> union(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys)
      Union sorted sets.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • unionWithScores

      default Set<@NonNull ZSetOperations.TypedTuple<V>> unionWithScores(@NonNull K key, @NonNull K otherKey)
      Union sorted sets.
      Parameters:
      key - must not be null.
      otherKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • unionWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> unionWithScores(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys)
      Union sorted sets.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • unionWithScores

      default Set<@NonNull ZSetOperations.TypedTuple<V>> unionWithScores(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull Aggregate aggregate)
      Union sorted sets at key and otherKeys .
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      aggregate - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • unionWithScores

      Set<@NonNull ZSetOperations.TypedTuple<V>> unionWithScores(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull Aggregate aggregate, @NonNull Weights weights)
      Union sorted sets.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      aggregate - must not be null.
      weights - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.6
      See Also:
    • unionAndStore

      Long unionAndStore(@NonNull K key, @NonNull K otherKey, @NonNull K destKey)
      Union sorted sets at key and otherKeys and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKey - must not be null.
      destKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • unionAndStore

      Long unionAndStore(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull K destKey)
      Union sorted sets at key and otherKeys and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      destKey - must not be null.
      Returns:
      null when used in pipeline / transaction.
      See Also:
    • unionAndStore

      default Long unionAndStore(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull K destKey, @NonNull Aggregate aggregate)
      Union sorted sets at key and otherKeys and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      destKey - must not be null.
      aggregate - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.1
      See Also:
    • unionAndStore

      Long unionAndStore(@NonNull K key, @NonNull Collection<@NonNull K> otherKeys, @NonNull K destKey, @NonNull Aggregate aggregate, @NonNull Weights weights)
      Union sorted sets at key and otherKeys and store result in destination destKey.
      Parameters:
      key - must not be null.
      otherKeys - must not be null.
      destKey - must not be null.
      aggregate - must not be null.
      weights - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.1
      See Also:
    • scan

      @NonNull Cursor<@NonNull ZSetOperations.TypedTuple<V>> scan(@NonNull K key, @Nullable ScanOptions options)
      Use a Cursor to iterate over entries zset at key.
      Important: Call CloseableIterator.close() when done to avoid resource leaks.
      Parameters:
      key -
      options - can be null.
      Returns:
      the result cursor providing access to the scan result. Must be closed once fully processed (e.g. through a try-with-resources clause).
      Since:
      1.4
      See Also:
    • rangeByLex

      default Set<V> rangeByLex(@NonNull K key, @NonNull Range<String> range)
      Get all elements with lexicographical ordering from ZSET at key with a value between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      key - must not be null.
      range - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • rangeByLex

      Set<V> rangeByLex(@NonNull K key, @NonNull Range<String> range, @NonNull Limit limit)
      Get all elements n elements, where n = Limit.getCount(), starting at Limit.getOffset() with lexicographical ordering from ZSET at key with a value between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      key - must not be null
      range - must not be null.
      limit - can be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • reverseRangeByLex

      default Set<V> reverseRangeByLex(@NonNull K key, @NonNull Range<String> range)
      Get all elements with reverse lexicographical ordering from ZSET at key with a value between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      key - must not be null.
      range - must not be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • reverseRangeByLex

      Set<V> reverseRangeByLex(@NonNull K key, @NonNull Range<String> range, @NonNull Limit limit)
      Get all elements n elements, where n = Limit.getCount(), starting at Limit.getOffset() with reverse lexicographical ordering from ZSET at key with a value between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      key - must not be null.
      range - must not be null.
      limit - can be null.
      Returns:
      null when used in pipeline / transaction.
      Since:
      2.4
      See Also:
    • rangeAndStoreByLex

      default Long rangeAndStoreByLex(@NonNull K srcKey, @NonNull K dstKey, @NonNull Range<String> range)
      Store all elements at dstKey with lexicographical ordering from ZSET at srcKey with a value between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      srcKey - must not be null.
      dstKey - must not be null.
      range - must not be null.
      Returns:
      the number of stored elements or null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • rangeAndStoreByLex

      Long rangeAndStoreByLex(@NonNull K srcKey, @NonNull K dstKey, @NonNull Range<String> range, @NonNull Limit limit)
      Store n elements at dstKey, where n = Limit.getCount(), starting at Limit.getOffset() with lexicographical ordering from ZSET at srcKey with a value between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      srcKey - must not be null.
      dstKey - must not be null.
      range - must not be null.
      limit - must not be null.
      Returns:
      the number of stored elements or null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • reverseRangeAndStoreByLex

      default Long reverseRangeAndStoreByLex(@NonNull K srcKey, @NonNull K dstKey, @NonNull Range<String> range)
      Store all elements at dstKey with reverse lexicographical ordering from ZSET at srcKey with a value between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      srcKey - must not be null.
      dstKey - must not be null.
      range - must not be null.
      Returns:
      the number of stored elements or null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • reverseRangeAndStoreByLex

      Long reverseRangeAndStoreByLex(@NonNull K srcKey, @NonNull K dstKey, @NonNull Range<String> range, @NonNull Limit limit)
      Store n elements at dstKey, where n = Limit.getCount(), starting at Limit.getOffset() with reverse lexicographical ordering from ZSET at srcKey with a value between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      srcKey - must not be null.
      dstKey - must not be null.
      range - must not be null.
      limit - must not be null.
      Returns:
      the number of stored elements or null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • rangeAndStoreByScore

      default Long rangeAndStoreByScore(@NonNull K srcKey, @NonNull K dstKey, @NonNull Range<? extends Number> range)
      Store all elements at dstKey with ordering by score from ZSET at srcKey with a score between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      srcKey - must not be null.
      dstKey - must not be null.
      range - must not be null.
      Returns:
      the number of stored elements or null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • rangeAndStoreByScore

      Long rangeAndStoreByScore(@NonNull K srcKey, @NonNull K dstKey, @NonNull Range<? extends Number> range, @NonNull Limit limit)
      Store n elements at dstKey, where n = Limit.getCount(), starting at Limit.getOffset() with ordering by score from ZSET at srcKey with a score between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      srcKey - must not be null.
      dstKey - must not be null.
      range - must not be null.
      limit - must not be null.
      Returns:
      the number of stored elements or null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • reverseRangeAndStoreByScore

      default Long reverseRangeAndStoreByScore(@NonNull K srcKey, @NonNull K dstKey, @NonNull Range<? extends Number> range)
      Store all elements at dstKey with reverse ordering by score from ZSET at srcKey with a score between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      srcKey - must not be null.
      dstKey - must not be null.
      range - must not be null.
      Returns:
      the number of stored elements or null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • reverseRangeAndStoreByScore

      Long reverseRangeAndStoreByScore(@NonNull K srcKey, @NonNull K dstKey, @NonNull Range<? extends Number> range, @NonNull Limit limit)
      Store n elements at dstKey, where n = Limit.getCount(), starting at Limit.getOffset() with reverse ordering by score from ZSET at srcKey with a score between Range.getLowerBound() and Range.getUpperBound().
      Parameters:
      srcKey - must not be null.
      dstKey - must not be null.
      range - must not be null.
      limit - must not be null.
      Returns:
      the number of stored elements or null when used in pipeline / transaction.
      Since:
      3.0
      See Also:
    • getOperations

      @NonNull RedisOperations<K,V> getOperations()
      Returns:
      the underlying RedisOperations used to execute commands.