Class ReactiveHashCommands.HRandFieldCommand
java.lang.Object
org.springframework.data.redis.connection.ReactiveRedisConnection.KeyCommand
org.springframework.data.redis.connection.ReactiveHashCommands.HRandFieldCommand
- All Implemented Interfaces:
ReactiveRedisConnection.Command
- Enclosing interface:
- ReactiveHashCommands
public static class ReactiveHashCommands.HRandFieldCommand
extends ReactiveRedisConnection.KeyCommand
HRANDFIELD
ReactiveRedisConnection.Command
.- Since:
- 2.6
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncount
(long count) Applies the count.long
getCount()
key
(ByteBuffer key) Applies the hash key.Methods inherited from class org.springframework.data.redis.connection.ReactiveRedisConnection.KeyCommand
getKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.redis.connection.ReactiveRedisConnection.Command
getName
-
Method Details
-
key
Applies the hash key. Constructs a new command instance with all previously configured properties.- Parameters:
key
- must not be null.- Returns:
- a new
ReactiveHashCommands.HRandFieldCommand
with key applied.
-
count
Applies the count. Constructs a new command instance with all previously configured properties. If the providedcount
argument is positive, return a list of distinct fields, capped either atcount
or the hash size. Ifcount
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.- Parameters:
count
-- Returns:
- a new
ReactiveHashCommands.HRandFieldCommand
with key applied.
-
getCount
public long getCount()
-