diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java index 340e36ebe..3a3567d1e 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java @@ -563,7 +563,7 @@ public interface ReactiveHashCommands { } /** - * Return a random field from the hash value stored at {@code key}. + * Return a random field from the hash stored at {@code key}. * * @param key must not be {@literal null}. * @return @@ -578,7 +578,7 @@ public interface ReactiveHashCommands { } /** - * Return a random field from the hash value stored at {@code key}. + * Return a random field from the hash along with its value stored at {@code key}. * * @param key must not be {@literal null}. * @return @@ -594,10 +594,10 @@ public interface ReactiveHashCommands { } /** - * Return a random field from the hash value stored at {@code key}. If the provided {@code count} argument is - * positive, return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is - * negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, - * the number of returned fields is the absolute value of the specified count. + * Return a random field from the hash stored at {@code key}. If the provided {@code count} argument is positive, + * return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is negative, + * the behavior changes and the command is allowed to return the same field multiple times. In this case, the number + * of returned fields is the absolute value of the specified count. * * @param key must not be {@literal null}. * @param count number of fields to return. @@ -613,10 +613,10 @@ public interface ReactiveHashCommands { } /** - * Return a random field from the hash value stored at {@code key}. If the provided {@code count} argument is - * positive, return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is - * negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, - * the number of returned fields is the absolute value of the specified count. + * Return a random field from the hash along with its value stored at {@code key}. If the provided {@code count} + * argument is positive, return a list of distinct fields, capped either at {@code count} or the hash size. If + * {@code count} is negative, the behavior changes and the command is allowed to return the same field multiple times. + * In this case, the number of returned fields is the absolute value of the specified count. * * @param key must not be {@literal null}. * @param count number of fields to return. diff --git a/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java index d2896b75c..b304330c9 100644 --- a/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java @@ -174,7 +174,7 @@ public interface RedisHashCommands { Map hGetAll(byte[] key); /** - * Return a random field from the hash value stored at {@code key}. + * Return a random field from the hash stored at {@code key}. * * @param key must not be {@literal null}. * @return {@literal null} if key does not exist or when used in pipeline / transaction. @@ -185,7 +185,7 @@ public interface RedisHashCommands { byte[] hRandField(byte[] key); /** - * Return a random field from the hash value stored at {@code key}. + * Return a random field from the hash along with its value stored at {@code key}. * * @param key must not be {@literal null}. * @return {@literal null} if key does not exist or when used in pipeline / transaction. @@ -196,10 +196,10 @@ public interface RedisHashCommands { Map.Entry hRandFieldWithValues(byte[] key); /** - * Return a random field from the hash value stored at {@code key}. If the provided {@code count} argument is - * positive, return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is - * negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, - * the number of returned fields is the absolute value of the specified count. + * Return a random field from the hash stored at {@code key}. If the provided {@code count} argument is positive, + * return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is negative, + * the behavior changes and the command is allowed to return the same field multiple times. In this case, the number + * of returned fields is the absolute value of the specified count. * * @param key must not be {@literal null}. * @param count number of fields to return. @@ -211,10 +211,10 @@ public interface RedisHashCommands { List hRandField(byte[] key, long count); /** - * Return a random field from the hash value stored at {@code key}. If the provided {@code count} argument is - * positive, return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is - * negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, - * the number of returned fields is the absolute value of the specified count. + * Return a random field from the hash along with its value stored at {@code key}. If the provided {@code count} + * argument is positive, return a list of distinct fields, capped either at {@code count} or the hash size. If + * {@code count} is negative, the behavior changes and the command is allowed to return the same field multiple times. + * In this case, the number of returned fields is the absolute value of the specified count. * * @param key must not be {@literal null}. * @param count number of fields to return. diff --git a/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java index ad52e833d..fbe869249 100644 --- a/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java +++ b/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java @@ -2067,7 +2067,7 @@ public interface StringRedisConnection extends RedisConnection { Double hIncrBy(String key, String field, double delta); /** - * Return a random field from the hash value stored at {@code key}. + * Return a random field from the hash stored at {@code key}. * * @param key must not be {@literal null}. * @return {@literal null} if key does not exist or when used in pipeline / transaction. @@ -2078,7 +2078,7 @@ public interface StringRedisConnection extends RedisConnection { String hRandField(String key); /** - * Return a random field from the hash value stored at {@code key}. + * Return a random field from the hash along with its value stored at {@code key}. * * @param key must not be {@literal null}. * @return {@literal null} if key does not exist or when used in pipeline / transaction. @@ -2089,10 +2089,10 @@ public interface StringRedisConnection extends RedisConnection { Map.Entry hRandFieldWithValues(String key); /** - * Return a random field from the hash value stored at {@code key}. If the provided {@code count} argument is - * positive, return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is - * negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, - * the number of returned fields is the absolute value of the specified count. + * Return a random field from the hash stored at {@code key}. If the provided {@code count} argument is positive, + * return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is negative, + * the behavior changes and the command is allowed to return the same field multiple times. In this case, the number + * of returned fields is the absolute value of the specified count. * * @param key must not be {@literal null}. * @param count number of fields to return. @@ -2104,10 +2104,10 @@ public interface StringRedisConnection extends RedisConnection { List hRandField(String key, long count); /** - * Return a random field from the hash value stored at {@code key}. If the provided {@code count} argument is - * positive, return a list of distinct fields, capped either at {@code count} or the hash size. If {@code count} is - * negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, - * the number of returned fields is the absolute value of the specified count. + * Return a random field from the hash along with its value stored at {@code key}. If the provided {@code count} + * argument is positive, return a list of distinct fields, capped either at {@code count} or the hash size. If + * {@code count} is negative, the behavior changes and the command is allowed to return the same field multiple times. + * In this case, the number of returned fields is the absolute value of the specified count. * * @param key must not be {@literal null}. * @param count number of fields to return. diff --git a/src/main/java/org/springframework/data/redis/core/BoundHashOperations.java b/src/main/java/org/springframework/data/redis/core/BoundHashOperations.java index 843e082bc..3705b87ba 100644 --- a/src/main/java/org/springframework/data/redis/core/BoundHashOperations.java +++ b/src/main/java/org/springframework/data/redis/core/BoundHashOperations.java @@ -89,7 +89,7 @@ public interface BoundHashOperations extends BoundKeyOperations { Double increment(HK key, double delta); /** - * Return a random key (aka field) from the hash value stored at the bound key. + * Return a random key (aka field) from the hash stored at the bound key. * * @return {@literal null} if the hash does not exist or when used in pipeline / transaction. * @since 2.6 @@ -99,7 +99,7 @@ public interface BoundHashOperations extends BoundKeyOperations { HK randomKey(); /** - * Return a random entry from the hash value stored at the bound key. + * Return a random entry from the hash stored at the bound key. * * @return {@literal null} if key does not exist or when used in pipeline / transaction. * @since 2.6 @@ -109,10 +109,10 @@ public interface BoundHashOperations extends BoundKeyOperations { Map.Entry randomEntry(); /** - * Return a random keys (aka fields) from the hash value stored at the bound key. If the provided {@code count} argument is + * Return a random keys (aka fields) from the hash stored at the bound key. If the provided {@code count} argument is * positive, return a list of distinct keys, capped either at {@code count} or the hash size. If {@code count} is - * negative, the behavior changes and the command is allowed to return the same key multiple times. In this case, - * the number of returned keys is the absolute value of the specified count. + * negative, the behavior changes and the command is allowed to return the same key multiple times. In this case, the + * number of returned keys is the absolute value of the specified count. * * @param count number of keys to return. * @return {@literal null} if key does not exist or when used in pipeline / transaction. @@ -123,7 +123,7 @@ public interface BoundHashOperations extends BoundKeyOperations { List randomKeys(long count); /** - * Return a random entry from the hash value stored at the bound key. + * Return a random entry from the hash stored at the bound key. * * @param count number of entries to return. Must be positive. * @return {@literal null} if the hash does not exist or when used in pipeline / transaction. diff --git a/src/main/java/org/springframework/data/redis/core/HashOperations.java b/src/main/java/org/springframework/data/redis/core/HashOperations.java index ba3b5fdd7..8917b99c3 100644 --- a/src/main/java/org/springframework/data/redis/core/HashOperations.java +++ b/src/main/java/org/springframework/data/redis/core/HashOperations.java @@ -89,7 +89,7 @@ public interface HashOperations { Double increment(H key, HK hashKey, double delta); /** - * Return a random hash key (aka field) from the hash value stored at {@code key}. + * Return a random hash key (aka field) from the hash stored at {@code key}. * * @param key must not be {@literal null}. * @return {@literal null} if key does not exist or when used in pipeline / transaction. @@ -100,7 +100,7 @@ public interface HashOperations { HK randomKey(H key); /** - * Return a random entry from the hash value stored at {@code key}. + * Return a random entry from the hash stored at {@code key}. * * @param key must not be {@literal null}. * @return {@literal null} if key does not exist or when used in pipeline / transaction. @@ -111,7 +111,7 @@ public interface HashOperations { Map.Entry randomEntry(H key); /** - * Return random hash keys (aka fields) from the hash value stored at {@code key}. If the provided {@code count} argument is + * Return random hash keys (aka fields) from the hash stored at {@code key}. If the provided {@code count} argument is * positive, return a list of distinct hash keys, capped either at {@code count} or the hash size. If {@code count} is * negative, the behavior changes and the command is allowed to return the same hash key multiple times. In this case, * the number of returned fields is the absolute value of the specified count. @@ -126,7 +126,7 @@ public interface HashOperations { List randomKeys(H key, long count); /** - * Return a random entries from the hash value stored at {@code key}. + * Return a random entries from the hash stored at {@code key}. * * @param key must not be {@literal null}. * @param count number of fields to return. Must be positive. diff --git a/src/main/java/org/springframework/data/redis/core/ReactiveHashOperations.java b/src/main/java/org/springframework/data/redis/core/ReactiveHashOperations.java index 500fd9a91..25fedf38c 100644 --- a/src/main/java/org/springframework/data/redis/core/ReactiveHashOperations.java +++ b/src/main/java/org/springframework/data/redis/core/ReactiveHashOperations.java @@ -88,7 +88,7 @@ public interface ReactiveHashOperations { Mono increment(H key, HK hashKey, double delta); /** - * Return a random hash key (aka field) from the hash value stored at {@code key}. + * Return a random hash key (aka field) from the hash stored at {@code key}. * * @param key must not be {@literal null}. * @return @@ -98,7 +98,7 @@ public interface ReactiveHashOperations { Mono randomKey(H key); /** - * Return a random entry from the hash value stored at {@code key}. + * Return a random entry from the hash stored at {@code key}. * * @param key must not be {@literal null}. * @return @@ -108,7 +108,7 @@ public interface ReactiveHashOperations { Mono> randomEntry(H key); /** - * Return random hash keys (aka fields) from the hash value stored at {@code key}. If the provided {@code count} argument is + * Return random hash keys (aka fields) from the hash stored at {@code key}. If the provided {@code count} argument is * positive, return a list of distinct hash keys, capped either at {@code count} or the hash size. If {@code count} is * negative, the behavior changes and the command is allowed to return the same hash key multiple times. In this case, * the number of returned fields is the absolute value of the specified count.