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 e10482fff..092601d6d 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java @@ -288,7 +288,8 @@ public interface ReactiveHashCommands { } /** - * Get values for given {@literal fields} from hash at {@literal key}. + * Get values for given {@literal fields} from hash at {@literal key}. Values are in the order of the requested keys. + * Absent field values are represented using {@code null} in the resulting {@link List}. * * @param key must not be {@literal null}. * @param fields must not be {@literal null}. @@ -304,7 +305,8 @@ public interface ReactiveHashCommands { } /** - * Get values for given {@literal fields} from hash at {@literal key}. + * Get values for given {@literal fields} from hash at {@literal key}. Values are in the order of the requested keys. + * Absent field values are represented using {@code null} in the resulting {@link List}. * * @param commands must not be {@literal null}. * @return diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java index c6e349aa3..59b14d26b 100644 --- a/src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java @@ -349,7 +349,8 @@ public interface ReactiveStringCommands { Flux> getSet(Publisher commands); /** - * Get multiple values in one batch. + * Get multiple values in one batch. Values are in the order of the requested keys. Absent field values are + * represented using {@code null} in the resulting {@link List}. * * @param keys must not be {@literal null}. * @return @@ -363,7 +364,8 @@ public interface ReactiveStringCommands { } /** - * Get multiple values at for {@literal keysets} in batches. + * Get multiple values at for {@literal keysets} in batches. Values are in the order of the requested keys. Absent + * field values are represented using {@code null} in the resulting {@link List}. * * @param keysets must not be {@literal null}. * @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 b304330c9..89a52f720 100644 --- a/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java @@ -68,11 +68,12 @@ public interface RedisHashCommands { byte[] hGet(byte[] key, byte[] field); /** - * Get values for given {@code fields} from hash at {@code key}. + * Get values for given {@code fields} from hash at {@code key}. Values are in the order of the requested keys Absent + * field values are represented using {@code null} in the resulting {@link List}. * * @param key must not be {@literal null}. * @param fields must not be {@literal empty}. - * @return empty {@link List} if key or fields do not exists. {@literal null} when used in pipeline / transaction. + * @return empty {@link List} if key does not exist. {@literal null} when used in pipeline / transaction. * @see Redis Documentation: HMGET */ @Nullable diff --git a/src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java index 0614eed76..7207d89b2 100644 --- a/src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java +++ b/src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java @@ -85,10 +85,11 @@ public interface RedisStringCommands { byte[] getSet(byte[] key, byte[] value); /** - * Get multiple {@code keys}. Values are returned in the order of the requested keys. + * Get multiple {@code keys}. Values are in the order of the requested keys Absent field values are represented using + * {@code null} in the resulting {@link List}. * * @param keys must not be {@literal null}. - * @return empty {@link List} if keys do not exist or when used in pipeline / transaction. + * @return {@code null} when used in pipeline / transaction. * @see Redis Documentation: MGET */ @Nullable 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 7c341f776..a3f3c3dd3 100644 --- a/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java +++ b/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java @@ -437,7 +437,7 @@ public interface StringRedisConnection extends RedisConnection { String getSet(String key, String value); /** - * Get multiple {@code keys}. Values are returned in the order of the requested keys. + * Get multiple {@code keys}. Values are in the order of the requested keys. * * @param keys must not be {@literal null}. * @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 1053c10be..2b1a4e201 100644 --- a/src/main/java/org/springframework/data/redis/core/BoundHashOperations.java +++ b/src/main/java/org/springframework/data/redis/core/BoundHashOperations.java @@ -60,7 +60,8 @@ public interface BoundHashOperations extends BoundKeyOperations { HV get(Object member); /** - * Get values for given {@code keys} from the hash at the bound key. + * Get values for given {@code keys} from the hash at the bound key. Values are in the order of the requested keys + * Absent field values are represented using {@code null} in the resulting {@link List}. * * @param keys must not be {@literal null}. * @return {@literal null} 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 34cf08055..0c1d8958d 100644 --- a/src/main/java/org/springframework/data/redis/core/HashOperations.java +++ b/src/main/java/org/springframework/data/redis/core/HashOperations.java @@ -60,7 +60,8 @@ public interface HashOperations { HV get(H key, Object hashKey); /** - * Get values for given {@code hashKeys} from hash at {@code key}. + * Get values for given {@code hashKeys} from hash at {@code key}. Values are in the order of the requested keys + * Absent field values are represented using {@code null} in the resulting {@link List}. * * @param key must not be {@literal null}. * @param hashKeys must not be {@literal null}. 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 25fedf38c..9b3f6d01a 100644 --- a/src/main/java/org/springframework/data/redis/core/ReactiveHashOperations.java +++ b/src/main/java/org/springframework/data/redis/core/ReactiveHashOperations.java @@ -59,7 +59,8 @@ public interface ReactiveHashOperations { Mono get(H key, Object hashKey); /** - * Get values for given {@code hashKeys} from hash at {@code key}. + * Get values for given {@code hashKeys} from hash at {@code key}. Values are in the order of the requested keys. + * Absent field values are represented using {@code null} in the resulting {@link List}. * * @param key must not be {@literal null}. * @param hashKeys must not be {@literal null}. @@ -122,10 +123,10 @@ public interface ReactiveHashOperations { Flux randomKeys(H key, long count); /** - * Return random entries from the hash stored at {@code key}. If the provided {@code count} argument is - * positive, return a list of distinct entries, 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 entry multiple times. In this case, - * the number of returned fields is the absolute value of the specified count. + * Return random entries from the hash stored at {@code key}. If the provided {@code count} argument is positive, + * return a list of distinct entries, 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 entry 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/ReactiveValueOperations.java b/src/main/java/org/springframework/data/redis/core/ReactiveValueOperations.java index 7f39473f8..af2db3b4c 100644 --- a/src/main/java/org/springframework/data/redis/core/ReactiveValueOperations.java +++ b/src/main/java/org/springframework/data/redis/core/ReactiveValueOperations.java @@ -155,7 +155,8 @@ public interface ReactiveValueOperations { Mono getAndSet(K key, V value); /** - * Get multiple {@code keys}. Values are returned in the order of the requested keys. + * Get multiple {@code keys}. Values are in the order of the requested keys. Absent field values are represented using + * {@code null} in the resulting {@link List}. * * @param keys must not be {@literal null}. * @see Redis Documentation: MGET diff --git a/src/main/java/org/springframework/data/redis/core/ValueOperations.java b/src/main/java/org/springframework/data/redis/core/ValueOperations.java index c83129cf3..8a31192b9 100644 --- a/src/main/java/org/springframework/data/redis/core/ValueOperations.java +++ b/src/main/java/org/springframework/data/redis/core/ValueOperations.java @@ -263,7 +263,8 @@ public interface ValueOperations { V getAndSet(K key, V value); /** - * Get multiple {@code keys}. Values are returned in the order of the requested keys. + * Get multiple {@code keys}. Values are in the order of the requested keys Absent field values are represented using + * {@code null} in the resulting {@link List}. * * @param keys must not be {@literal null}. * @return {@literal null} when used in pipeline / transaction.