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
Since:
2.6
Author:
Mark Paluch
See Also:
  • 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

      public ReactiveHashCommands.HRandFieldCommand count(long count)
      Applies the count. Constructs a new command instance with all previously configured properties. If the provided count argument is positive, return a list of distinct fields, capped either at count or the hash size. If 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.
      Parameters:
      count -
      Returns:
      a new ReactiveHashCommands.HRandFieldCommand with key applied.
    • getCount

      public long getCount()