Refine documentation of HRANDFIELD and HRANDFIELD … WITHVALUES.
The documentation is now more precise about the return value. Closes #2407
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -174,7 +174,7 @@ public interface RedisHashCommands {
|
||||
Map<byte[], byte[]> 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<byte[], byte[]> 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<byte[]> 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.
|
||||
|
||||
@@ -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<String, String> 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<String> 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.
|
||||
|
||||
@@ -89,7 +89,7 @@ public interface BoundHashOperations<H, HK, HV> extends BoundKeyOperations<H> {
|
||||
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<H, HK, HV> extends BoundKeyOperations<H> {
|
||||
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<H, HK, HV> extends BoundKeyOperations<H> {
|
||||
Map.Entry<HK, HV> 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<H, HK, HV> extends BoundKeyOperations<H> {
|
||||
List<HK> 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.
|
||||
|
||||
@@ -89,7 +89,7 @@ public interface HashOperations<H, HK, HV> {
|
||||
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<H, HK, HV> {
|
||||
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<H, HK, HV> {
|
||||
Map.Entry<HK, HV> 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<H, HK, HV> {
|
||||
List<HK> 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.
|
||||
|
||||
@@ -88,7 +88,7 @@ public interface ReactiveHashOperations<H, HK, HV> {
|
||||
Mono<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
|
||||
@@ -98,7 +98,7 @@ public interface ReactiveHashOperations<H, HK, HV> {
|
||||
Mono<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
|
||||
@@ -108,7 +108,7 @@ public interface ReactiveHashOperations<H, HK, HV> {
|
||||
Mono<Map.Entry<HK, HV>> 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.
|
||||
|
||||
Reference in New Issue
Block a user