@@ -410,6 +410,23 @@ static <V> TypedTuple<V> of(V value, @Nullable Double score) {
410
410
* @return {@literal null} when used in pipeline / transaction.
411
411
* @since 2.4
412
412
* @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>
413
430
*/
414
431
@ Nullable
415
432
Long lexCount (K key , Range <String > range );
@@ -593,9 +610,25 @@ default TypedTuple<V> popMax(K key, Duration timeout) {
593
610
* @return {@literal null} when used in pipeline / transaction.
594
611
* @since 2.5
595
612
* @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>
596
629
*/
597
630
@ Nullable
598
- Long removeRangeByLex (K key , org . springframework . data . domain . Range <String > range );
631
+ Long removeRangeByLex (K key , Range <String > range );
599
632
600
633
/**
601
634
* 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
961
994
962
995
/**
963
996
* 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()}.
965
999
*
966
1000
* @param key must not be {@literal null}.
967
1001
* @param range must not be {@literal null}.
968
1002
* @return {@literal null} when used in pipeline / transaction.
969
1003
* @since 1.7
970
1004
* @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>
971
1022
*/
972
1023
@ 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 ) {
974
1025
return rangeByLex (key , range , Limit .unlimited ());
975
1026
}
976
1027
977
1028
/**
978
1029
* Get all elements {@literal n} elements, where {@literal n = } {@link Limit#getCount()}, starting at
979
1030
* {@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()}.
981
1033
*
982
1034
* @param key must not be {@literal null}
983
1035
* @param range must not be {@literal null}.
984
1036
* @param limit can be {@literal null}.
985
1037
* @return {@literal null} when used in pipeline / transaction.
986
1038
* @since 1.7
987
1039
* @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>
988
1060
*/
989
1061
@ 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 );
991
1063
992
1064
/**
993
1065
* 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()}.
995
1068
*
996
1069
* @param key must not be {@literal null}.
997
1070
* @param range must not be {@literal null}.
998
1071
* @return {@literal null} when used in pipeline / transaction.
999
1072
* @since 2.4
1000
1073
* @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>
1001
1091
*/
1002
1092
@ 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 ) {
1004
1094
return reverseRangeByLex (key , range , Limit .unlimited ());
1005
1095
}
1006
1096
1007
1097
/**
1008
1098
* Get all elements {@literal n} elements, where {@literal n = } {@link Limit#getCount()}, starting at
1009
1099
* {@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()}.
1011
1122
*
1012
1123
* @param key must not be {@literal null}
1013
1124
* @param range must not be {@literal null}.
@@ -1017,7 +1128,7 @@ default Set<V> reverseRangeByLex(K key, org.springframework.data.domain.Range<St
1017
1128
* @see <a href="https://redis.io/commands/zrevrangebylex">Redis Documentation: ZREVRANGEBYLEX</a>
1018
1129
*/
1019
1130
@ 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 );
1021
1132
1022
1133
/**
1023
1134
* @return never {@literal null}.
0 commit comments