@@ -625,11 +625,77 @@ public Response<Long> hset(String key, Map<String, String> hash) {
625
625
return appendCommand (commandObjects .hset (key , hash ));
626
626
}
627
627
628
+ /**
629
+ * Sets the specified field in the hash stored at key to the specified value with additional parameters,
630
+ * and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
631
+ * This command can overwrite any existing fields in the hash.
632
+ * If key does not exist, a new key holding a hash is created.
633
+ *
634
+ * @param key the key of the hash
635
+ * @param params additional parameters for the HSETEX command
636
+ * @param field the field in the hash to set
637
+ * @param value the value to set in the specified field
638
+ * @return 0 if no fields were set, 1 if all the fields were set
639
+ *
640
+ * @see HSetExParams
641
+ */
642
+ @ Override
643
+ public Response <Long > hsetex (String key , HSetExParams params , String field , String value ) {
644
+ return appendCommand (commandObjects .hsetex (key , params , field , value ));
645
+ }
646
+
647
+ /**
648
+ * Sets the specified fields in the hash stored at key to the specified values with additional parameters,
649
+ * and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
650
+ * This command can overwrite any existing fields in the hash.
651
+ * If key does not exist, a new key holding a hash is created.
652
+ *
653
+ * @param key the key of the hash
654
+ * @param params the parameters for the HSetEx command
655
+ * @param hash the map containing field-value pairs to set in the hash
656
+ * @return 0 if no fields were set, 1 if all the fields were set
657
+ *
658
+ * @see HSetExParams
659
+ */
660
+ @ Override
661
+ public Response <Long > hsetex (String key , HSetExParams params , Map <String , String > hash ) {
662
+ return appendCommand (commandObjects .hsetex (key , params , hash ));
663
+ }
664
+
628
665
@ Override
629
666
public Response <String > hget (String key , String field ) {
630
667
return appendCommand (commandObjects .hget (key , field ));
631
668
}
632
669
670
+ /**
671
+ * Retrieves the values associated with the specified fields in a hash stored at the given key
672
+ * and optionally sets their expiration. Use `HGetExParams` object to specify expiration parameters.
673
+ *
674
+ * @param key the key of the hash
675
+ * @param params additional parameters for the HGETEX command
676
+ * @param fields the fields whose values are to be retrieved
677
+ * @return a list of the value associated with each field or nil if the field doesn’t exist.
678
+ *
679
+ * @see HGetExParams
680
+ */
681
+ @ Override
682
+ public Response <List <String >> hgetex (String key , HGetExParams params , String ... fields ) {
683
+ return appendCommand (commandObjects .hgetex (key , params , fields ));
684
+ }
685
+
686
+ /**
687
+ * Retrieves the values associated with the specified fields in the hash stored at the given key
688
+ * and then deletes those fields from the hash.
689
+ *
690
+ * @param key the key of the hash
691
+ * @param fields the fields whose values are to be retrieved and then deleted
692
+ * @return a list of values associated with the specified fields before they were deleted
693
+ */
694
+ @ Override
695
+ public Response <List <String >> hgetdel (String key , String ... fields ) {
696
+ return appendCommand (commandObjects .hgetdel (key , fields ));
697
+ }
698
+
633
699
@ Override
634
700
public Response <Long > hsetnx (String key , String field , String value ) {
635
701
return appendCommand (commandObjects .hsetnx (key , field , value ));
@@ -1971,10 +2037,76 @@ public Response<Long> hset(byte[] key, Map<byte[], byte[]> hash) {
1971
2037
return appendCommand (commandObjects .hset (key , hash ));
1972
2038
}
1973
2039
2040
+ /**
2041
+ * Sets the specified field in the hash stored at key to the specified value with additional parameters,
2042
+ * and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
2043
+ * This command can overwrite any existing fields in the hash.
2044
+ * If key does not exist, a new key holding a hash is created.
2045
+ *
2046
+ * @param key the key of the hash
2047
+ * @param params the parameters for the HSetEx command
2048
+ * @param field the field in the hash to set
2049
+ * @param value the value to set in the specified field
2050
+ * @return 0 if no fields were set, 1 if all the fields were set
2051
+ *
2052
+ * @see HSetExParams
2053
+ */
2054
+ @ Override
2055
+ public Response <Long > hsetex (byte [] key , HSetExParams params , byte [] field , byte [] value ) {
2056
+ return appendCommand (commandObjects .hsetex (key , params , field , value ));
2057
+ }
2058
+
2059
+ /**
2060
+ * Sets the specified fields in the hash stored at key to the specified values with additional parameters,
2061
+ * and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
2062
+ * This command can overwrite any existing fields in the hash.
2063
+ * If key does not exist, a new key holding a hash is created.
2064
+ *
2065
+ * @param key the key of the hash
2066
+ * @param params the parameters for the HSetEx command
2067
+ * @param hash the map containing field-value pairs to set in the hash
2068
+ * @return 0 if no fields were set, 1 if all the fields were set
2069
+ *
2070
+ * @see HSetExParams
2071
+ */
2072
+ @ Override
2073
+ public Response <Long > hsetex (byte [] key , HSetExParams params , Map <byte [], byte []> hash ) {
2074
+ return appendCommand (commandObjects .hsetex (key , params , hash ));
2075
+ }
2076
+
1974
2077
@ Override
1975
2078
public Response <byte []> hget (byte [] key , byte [] field ) {
1976
2079
return appendCommand (commandObjects .hget (key , field ));
1977
2080
}
2081
+
2082
+ /**
2083
+ * Retrieves the values associated with the specified fields in a hash stored at the given key
2084
+ * and optionally sets their expiration. Use `HGetExParams` object to specify expiration parameters.
2085
+ *
2086
+ * @param key the key of the hash
2087
+ * @param params additional parameters for the HGETEX command
2088
+ * @param fields the fields whose values are to be retrieved
2089
+ * @return a list of the value associated with each field or nil if the field doesn’t exist.
2090
+ *
2091
+ * @see HGetExParams
2092
+ */
2093
+ @ Override
2094
+ public Response <List <byte []>> hgetex (byte [] key , HGetExParams params , byte []... fields ) {
2095
+ return appendCommand (commandObjects .hgetex (key , params , fields ));
2096
+ }
2097
+
2098
+ /**
2099
+ * Retrieves the values associated with the specified fields in the hash stored at the given key
2100
+ * and then deletes those fields from the hash.
2101
+ *
2102
+ * @param key the key of the hash
2103
+ * @param fields the fields whose values are to be retrieved and then deleted
2104
+ * @return a list of values associated with the specified fields before they were deleted
2105
+ */
2106
+ @ Override
2107
+ public Response <List <byte []>> hgetdel (byte [] key , byte []... fields ) {
2108
+ return appendCommand (commandObjects .hgetdel (key , fields ));
2109
+ }
1978
2110
1979
2111
@ Override
1980
2112
public Response <Long > hsetnx (byte [] key , byte [] field , byte [] value ) {
0 commit comments