Refine HMGET and MGET documentation.

Closes #2309
This commit is contained in:
Mark Paluch
2022-09-22 09:40:45 +02:00
parent a0bcf01a7f
commit bc983feac2
10 changed files with 29 additions and 18 deletions

View File

@@ -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

View File

@@ -349,7 +349,8 @@ public interface ReactiveStringCommands {
Flux<ByteBufferResponse<SetCommand>> getSet(Publisher<SetCommand> 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

View File

@@ -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 <a href="https://redis.io/commands/hmget">Redis Documentation: HMGET</a>
*/
@Nullable

View File

@@ -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 <a href="https://redis.io/commands/mget">Redis Documentation: MGET</a>
*/
@Nullable

View File

@@ -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

View File

@@ -60,7 +60,8 @@ public interface BoundHashOperations<H, HK, HV> extends BoundKeyOperations<H> {
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.

View File

@@ -60,7 +60,8 @@ public interface HashOperations<H, HK, HV> {
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}.

View File

@@ -59,7 +59,8 @@ public interface ReactiveHashOperations<H, HK, HV> {
Mono<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}.
@@ -122,10 +123,10 @@ public interface ReactiveHashOperations<H, HK, HV> {
Flux<HK> 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.

View File

@@ -155,7 +155,8 @@ public interface ReactiveValueOperations<K, V> {
Mono<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}.
* @see <a href="https://redis.io/commands/mget">Redis Documentation: MGET</a>

View File

@@ -263,7 +263,8 @@ public interface ValueOperations<K, V> {
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.