@@ -410,6 +410,23 @@ static <V> TypedTuple<V> of(V value, @Nullable Double score) {
410410 * @return {@literal null} when used in pipeline / transaction.
411411 * @since 2.4
412412 * @see <a href="https://redis.io/commands/zlexcount">Redis Documentation: ZLEXCOUNT</a>
413+ * @deprecated since 3.0. Please use #lexCount(Range) instead.
414+ */
415+ @ Nullable
416+ @ Deprecated (since = "3.0" , forRemoval = true )
417+ default Long lexCount (K key , org .springframework .data .redis .connection .RedisZSetCommands .Range range ) {
418+ return lexCount (key , range .toRange ());
419+ }
420+
421+ /**
422+ * Count number of elements within sorted set with value between {@link Range#getLowerBound()} and
423+ * {@link Range#getUpperBound()} applying lexicographical ordering.
424+ *
425+ * @param key must not be {@literal null}.
426+ * @param range must not be {@literal null}.
427+ * @return {@literal null} when used in pipeline / transaction.
428+ * @since 3.0
429+ * @see <a href="https://redis.io/commands/zlexcount">Redis Documentation: ZLEXCOUNT</a>
413430 */
414431 @ Nullable
415432 Long lexCount (K key , Range <String > range );
@@ -593,9 +610,25 @@ default TypedTuple<V> popMax(K key, Duration timeout) {
593610 * @return {@literal null} when used in pipeline / transaction.
594611 * @since 2.5
595612 * @see <a href="https://redis.io/commands/zremrangebylex">Redis Documentation: ZREMRANGEBYLEX</a>
613+ * @deprecated since 3.0. Please use {@link #removeRangeByLex(Object, Range)} instead;
614+ */
615+ @ Nullable
616+ @ Deprecated (since = "3.0" , forRemoval = true )
617+ default Long removeRangeByLex (K key , org .springframework .data .redis .connection .RedisZSetCommands .Range range ) {
618+ return removeRangeByLex (key , range .toRange ());
619+ }
620+
621+ /**
622+ * Remove elements in {@link Range} from sorted set with {@literal key}.
623+ *
624+ * @param key must not be {@literal null}.
625+ * @param range must not be {@literal null}.
626+ * @return {@literal null} when used in pipeline / transaction.
627+ * @since 3.0
628+ * @see <a href="https://redis.io/commands/zremrangebylex">Redis Documentation: ZREMRANGEBYLEX</a>
596629 */
597630 @ Nullable
598- Long removeRangeByLex (K key , org . springframework . data . domain . Range <String > range );
631+ Long removeRangeByLex (K key , Range <String > range );
599632
600633 /**
601634 * Remove elements with scores between {@code min} and {@code max} from sorted set with {@code key}.
@@ -961,53 +994,131 @@ default Long unionAndStore(K key, Collection<K> otherKeys, K destKey, Aggregate
961994
962995 /**
963996 * Get all elements with lexicographical ordering from {@literal ZSET} at {@code key} with a value between
964- * {@link Range#getMin()} and {@link Range#getMax()}.
997+ * {@link org.springframework.data.redis.connection.RedisZSetCommands.Range#getMin()} and
998+ * {@link org.springframework.data.redis.connection.RedisZSetCommands.Range#getMax()}.
965999 *
9661000 * @param key must not be {@literal null}.
9671001 * @param range must not be {@literal null}.
9681002 * @return {@literal null} when used in pipeline / transaction.
9691003 * @since 1.7
9701004 * @see <a href="https://redis.io/commands/zrangebylex">Redis Documentation: ZRANGEBYLEX</a>
1005+ * @deprecated since 3.0. Please use {@link #rangeByLex(Object, Range)} instead.
1006+ */
1007+ @ Nullable
1008+ @ Deprecated (since = "3.0" , forRemoval = true )
1009+ default Set <V > rangeByLex (K key , org .springframework .data .redis .connection .RedisZSetCommands .Range range ) {
1010+ return rangeByLex (key , range .toRange ());
1011+ }
1012+
1013+ /**
1014+ * Get all elements with lexicographical ordering from {@literal ZSET} at {@code key} with a value between
1015+ * {@link Range#getLowerBound()} and {@link Range#getUpperBound()}.
1016+ *
1017+ * @param key must not be {@literal null}.
1018+ * @param range must not be {@literal null}.
1019+ * @return {@literal null} when used in pipeline / transaction.
1020+ * @since 3.0
1021+ * @see <a href="https://redis.io/commands/zrangebylex">Redis Documentation: ZRANGEBYLEX</a>
9711022 */
9721023 @ Nullable
973- default Set <V > rangeByLex (K key , org . springframework . data . domain . Range <String > range ) {
1024+ default Set <V > rangeByLex (K key , Range <String > range ) {
9741025 return rangeByLex (key , range , Limit .unlimited ());
9751026 }
9761027
9771028 /**
9781029 * Get all elements {@literal n} elements, where {@literal n = } {@link Limit#getCount()}, starting at
9791030 * {@link Limit#getOffset()} with lexicographical ordering from {@literal ZSET} at {@code key} with a value between
980- * {@link Range#getMin()} and {@link Range#getMax()}.
1031+ * {@link org.springframework.data.redis.connection.RedisZSetCommands.Range#getMin()} and
1032+ * {@link org.springframework.data.redis.connection.RedisZSetCommands.Range#getMax()}.
9811033 *
9821034 * @param key must not be {@literal null}
9831035 * @param range must not be {@literal null}.
9841036 * @param limit can be {@literal null}.
9851037 * @return {@literal null} when used in pipeline / transaction.
9861038 * @since 1.7
9871039 * @see <a href="https://redis.io/commands/zrangebylex">Redis Documentation: ZRANGEBYLEX</a>
1040+ * @deprecated since 3.0. Please use {@link #rangeByLex(Object, Range, Limit)} instead.
1041+ */
1042+ @ Nullable
1043+ @ Deprecated (since = "3.0" , forRemoval = true )
1044+ default Set <V > rangeByLex (K key , org .springframework .data .redis .connection .RedisZSetCommands .Range range ,
1045+ Limit limit ) {
1046+ return rangeByLex (key , range .toRange (), limit );
1047+ }
1048+
1049+ /**
1050+ * Get all elements {@literal n} elements, where {@literal n = } {@link Limit#getCount()}, starting at
1051+ * {@link Limit#getOffset()} with lexicographical ordering from {@literal ZSET} at {@code key} with a value between
1052+ * {@link Range#getLowerBound()} and {@link Range#getUpperBound()}.
1053+ *
1054+ * @param key must not be {@literal null}
1055+ * @param range must not be {@literal null}.
1056+ * @param limit can be {@literal null}.
1057+ * @return {@literal null} when used in pipeline / transaction.
1058+ * @since 3.0
1059+ * @see <a href="https://redis.io/commands/zrangebylex">Redis Documentation: ZRANGEBYLEX</a>
9881060 */
9891061 @ Nullable
990- Set <V > rangeByLex (K key , org . springframework . data . domain . Range <String > range , Limit limit );
1062+ Set <V > rangeByLex (K key , Range <String > range , Limit limit );
9911063
9921064 /**
9931065 * Get all elements with reverse lexicographical ordering from {@literal ZSET} at {@code key} with a value between
994- * {@link Range#getMin()} and {@link Range#getMax()}.
1066+ * {@link org.springframework.data.redis.connection.RedisZSetCommands.Range#getMin()} and
1067+ * {@link org.springframework.data.redis.connection.RedisZSetCommands.Range#getMax()}.
9951068 *
9961069 * @param key must not be {@literal null}.
9971070 * @param range must not be {@literal null}.
9981071 * @return {@literal null} when used in pipeline / transaction.
9991072 * @since 2.4
10001073 * @see <a href="https://redis.io/commands/zrevrangebylex">Redis Documentation: ZREVRANGEBYLEX</a>
1074+ * @deprecated since 3.0. Please use {@link #reverseRangeByLex(Object, Range)}
1075+ */
1076+ @ Nullable
1077+ @ Deprecated (since = "3.0" , forRemoval = true )
1078+ default Set <V > reverseRangeByLex (K key , org .springframework .data .redis .connection .RedisZSetCommands .Range range ) {
1079+ return reverseRangeByLex (key , range .toRange ());
1080+ }
1081+
1082+ /**
1083+ * Get all elements with reverse lexicographical ordering from {@literal ZSET} at {@code key} with a value between
1084+ * {@link Range#getLowerBound()} and {@link Range#getUpperBound()}.
1085+ *
1086+ * @param key must not be {@literal null}.
1087+ * @param range must not be {@literal null}.
1088+ * @return {@literal null} when used in pipeline / transaction.
1089+ * @since 3.0
1090+ * @see <a href="https://redis.io/commands/zrevrangebylex">Redis Documentation: ZREVRANGEBYLEX</a>
10011091 */
10021092 @ Nullable
1003- default Set <V > reverseRangeByLex (K key , org . springframework . data . domain . Range <String > range ) {
1093+ default Set <V > reverseRangeByLex (K key , Range <String > range ) {
10041094 return reverseRangeByLex (key , range , Limit .unlimited ());
10051095 }
10061096
10071097 /**
10081098 * Get all elements {@literal n} elements, where {@literal n = } {@link Limit#getCount()}, starting at
10091099 * {@link Limit#getOffset()} with reverse lexicographical ordering from {@literal ZSET} at {@code key} with a value
1010- * between {@link Range#getMin()} and {@link Range#getMax()}.
1100+ * between {@link org.springframework.data.redis.connection.RedisZSetCommands.Range#getMin()} and
1101+ * {@link org.springframework.data.redis.connection.RedisZSetCommands.Range#getMax()}.
1102+ *
1103+ * @param key must not be {@literal null}
1104+ * @param range must not be {@literal null}.
1105+ * @param limit can be {@literal null}.
1106+ * @return {@literal null} when used in pipeline / transaction.
1107+ * @since 2.4
1108+ * @see <a href="https://redis.io/commands/zrevrangebylex">Redis Documentation: ZREVRANGEBYLEX</a>
1109+ * @deprecated since 3.0. Please use {@link #reverseRangeByLex(Object, Range, Limit)} instead.
1110+ */
1111+ @ Nullable
1112+ @ Deprecated (since = "3.0" , forRemoval = true )
1113+ default Set <V > reverseRangeByLex (K key , org .springframework .data .redis .connection .RedisZSetCommands .Range range ,
1114+ Limit limit ) {
1115+ return reverseRangeByLex (key , range .toRange (), limit );
1116+ }
1117+
1118+ /**
1119+ * Get all elements {@literal n} elements, where {@literal n = } {@link Limit#getCount()}, starting at
1120+ * {@link Limit#getOffset()} with reverse lexicographical ordering from {@literal ZSET} at {@code key} with a value
1121+ * between {@link Range#getLowerBound()} and {@link Range#getUpperBound()}.
10111122 *
10121123 * @param key must not be {@literal null}
10131124 * @param range must not be {@literal null}.
@@ -1017,7 +1128,7 @@ default Set<V> reverseRangeByLex(K key, org.springframework.data.domain.Range<St
10171128 * @see <a href="https://redis.io/commands/zrevrangebylex">Redis Documentation: ZREVRANGEBYLEX</a>
10181129 */
10191130 @ Nullable
1020- Set <V > reverseRangeByLex (K key , org . springframework . data . domain . Range <String > range , Limit limit );
1131+ Set <V > reverseRangeByLex (K key , Range <String > range , Limit limit );
10211132
10221133 /**
10231134 * @return never {@literal null}.
0 commit comments