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.longgetCount()key(ByteBuffer key) Applies the hash key.Methods inherited from class org.springframework.data.redis.connection.ReactiveRedisConnection.KeyCommand
getKeyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.HRandFieldCommandwith key applied.
-
count
Applies the count. Constructs a new command instance with all previously configured properties. If the providedcountargument is positive, return a list of distinct fields, capped either atcountor the hash size. Ifcountis 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.HRandFieldCommandwith key applied.
-
getCount
public long getCount()
-