@@ -89,31 +89,31 @@ public interface HashOperations<H, HK, HV> {
89
89
Double increment (H key , HK hashKey , double delta );
90
90
91
91
/**
92
- * Return a random field from the hash value stored at {@code key}.
92
+ * Return a random hash key (aka field) from the hash value stored at {@code key}.
93
93
*
94
94
* @param key must not be {@literal null}.
95
95
* @return {@literal null} if key does not exist or when used in pipeline / transaction.
96
96
* @since 2.6
97
97
* @see <a href="https://redis.io/commands/hrandfield">Redis Documentation: HRANDFIELD</a>
98
98
*/
99
99
@ Nullable
100
- HK randomField (H key );
100
+ HK randomKey (H key );
101
101
102
102
/**
103
- * Return a random field from the hash value stored at {@code key}.
103
+ * Return a random entry from the hash value stored at {@code key}.
104
104
*
105
105
* @param key must not be {@literal null}.
106
106
* @return {@literal null} if key does not exist or when used in pipeline / transaction.
107
107
* @since 2.6
108
108
* @see <a href="https://redis.io/commands/hrandfield">Redis Documentation: HRANDFIELD</a>
109
109
*/
110
110
@ Nullable
111
- Map .Entry <HK , HV > randomValue (H key );
111
+ Map .Entry <HK , HV > randomEntry (H key );
112
112
113
113
/**
114
- * Return a random field from the hash value stored at {@code key}. If the provided {@code count} argument is
115
- * positive, return a list of distinct fields , capped either at {@code count} or the hash size. If {@code count} is
116
- * negative, the behavior changes and the command is allowed to return the same field multiple times. In this case,
114
+ * Return random hash keys (aka fields) from the hash value stored at {@code key}. If the provided {@code count} argument is
115
+ * positive, return a list of distinct hash keys , capped either at {@code count} or the hash size. If {@code count} is
116
+ * negative, the behavior changes and the command is allowed to return the same hash key multiple times. In this case,
117
117
* the number of returned fields is the absolute value of the specified count.
118
118
*
119
119
* @param key must not be {@literal null}.
@@ -123,10 +123,10 @@ public interface HashOperations<H, HK, HV> {
123
123
* @see <a href="https://redis.io/commands/hrandfield">Redis Documentation: HRANDFIELD</a>
124
124
*/
125
125
@ Nullable
126
- List <HK > randomFields (H key , long count );
126
+ List <HK > randomKeys (H key , long count );
127
127
128
128
/**
129
- * Return a random field from the hash value stored at {@code key}.
129
+ * Return a random entries from the hash value stored at {@code key}.
130
130
*
131
131
* @param key must not be {@literal null}.
132
132
* @param count number of fields to return. Must be positive.
@@ -135,7 +135,7 @@ public interface HashOperations<H, HK, HV> {
135
135
* @see <a href="https://redis.io/commands/hrandfield">Redis Documentation: HRANDFIELD</a>
136
136
*/
137
137
@ Nullable
138
- Map <HK , HV > randomValues (H key , long count );
138
+ Map <HK , HV > randomEntries (H key , long count );
139
139
140
140
/**
141
141
* Get key set (fields) of hash at {@code key}.
0 commit comments