Class ReactiveHashCommandsImpl<K,F,V>

All Implemented Interfaces:
ReactiveHashCommands<K,F,V>, ReactiveRedisCommands

public class ReactiveHashCommandsImpl<K,F,V> extends AbstractHashCommands<K,F,V> implements ReactiveHashCommands<K,F,V>
  • Constructor Details

  • Method Details

    • getDataSource

      public ReactiveRedisDataSource getDataSource()
      Specified by:
      getDataSource in interface ReactiveRedisCommands
      Returns:
      the data source.
    • hdel

      @SafeVarargs public final io.smallrye.mutiny.Uni<Integer> hdel(K key, F... fields)
      Description copied from interface: ReactiveHashCommands
      Execute the command HDEL. Summary: Delete one or more hash fields Group: hash Requires Redis 2.0.0
      Specified by:
      hdel in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      Returns:
      the number of fields that were removed from the hash, not including specified but non-existing fields.
    • hexists

      public io.smallrye.mutiny.Uni<Boolean> hexists(K key, F field)
      Description copied from interface: ReactiveHashCommands
      Execute the command HEXISTS. Summary: Determine if a hash field exists Group: hash Requires Redis 2.0.0
      Specified by:
      hexists in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      field - the value
      Returns:
      true the hash contains field. false the hash does not contain field, or the key does not exist.
    • hget

      public io.smallrye.mutiny.Uni<V> hget(K key, F field)
      Description copied from interface: ReactiveHashCommands
      Execute the command HGET. Summary: Get the value of a hash field Group: hash Requires Redis 2.0.0
      Specified by:
      hget in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      field - the value
      Returns:
      the value associated with field, or null when field is not present in the hash or the key does not exist.
    • hincrby

      public io.smallrye.mutiny.Uni<Long> hincrby(K key, F field, long amount)
      Description copied from interface: ReactiveHashCommands
      Execute the command HINCRBY. Summary: Increment the integer value of a hash field by the given number Group: hash Requires Redis 2.0.0
      Specified by:
      hincrby in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      field - the value
      Returns:
      the value at field after the increment operation.
    • hincrbyfloat

      public io.smallrye.mutiny.Uni<Double> hincrbyfloat(K key, F field, double amount)
      Description copied from interface: ReactiveHashCommands
      Execute the command HINCRBYFLOAT. Summary: Increment the float value of a hash field by the given amount Group: hash Requires Redis 2.6.0
      Specified by:
      hincrbyfloat in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      field - the value
      Returns:
      the value of field after the increment.
    • hgetall

      public io.smallrye.mutiny.Uni<Map<F,V>> hgetall(K key)
      Description copied from interface: ReactiveHashCommands
      Execute the command HGETALL. Summary: Get all the fields and values in a hash Group: hash Requires Redis 2.0.0
      Specified by:
      hgetall in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      Returns:
      the map fields -> values stored in the hash, or an empty map when key does not exist.
    • hkeys

      public io.smallrye.mutiny.Uni<List<F>> hkeys(K key)
      Description copied from interface: ReactiveHashCommands
      Execute the command HKEYS. Summary: Get all the fields in a hash Group: hash Requires Redis 2.0.0
      Specified by:
      hkeys in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      Returns:
      list of fields in the hash, or an empty list when key does not exist.
    • hlen

      public io.smallrye.mutiny.Uni<Long> hlen(K key)
      Description copied from interface: ReactiveHashCommands
      Execute the command HLEN. Summary: Get the number of fields in a hash Group: hash Requires Redis 2.0.0
      Specified by:
      hlen in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      Returns:
      number of fields in the hash, or 0 when key does not exist.
    • hmget

      @SafeVarargs public final io.smallrye.mutiny.Uni<Map<F,V>> hmget(K key, F... fields)
      Description copied from interface: ReactiveHashCommands
      Execute the command HMGET. Summary: Get the values of all the given hash fields Group: hash Requires Redis 2.0.0
      Specified by:
      hmget in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      fields - the fields
      Returns:
      list of values associated with the given fields, in the same order as they are requested. If a requested field does not exist, the returned map contains a null value for that field.
    • hmset

      public io.smallrye.mutiny.Uni<Void> hmset(K key, Map<F,V> map)
      Description copied from interface: ReactiveHashCommands
      Execute the command HMSET. Summary: Set multiple hash fields to multiple values Group: hash Requires Redis 2.0.0
      Specified by:
      hmset in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      map - the key/value map to set
      Returns:
      a Uni completed with null when the operation completes
    • hrandfield

      public io.smallrye.mutiny.Uni<F> hrandfield(K key)
      Description copied from interface: ReactiveHashCommands
      Execute the command HRANDFIELD. Summary: Get one or multiple random fields from a hash Group: hash Requires Redis 6.2.0
      Specified by:
      hrandfield in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      Returns:
      a random key from the hash, null if the key does not exist
    • hrandfield

      public io.smallrye.mutiny.Uni<List<F>> hrandfield(K key, long count)
      Description copied from interface: ReactiveHashCommands
      Execute the command HRANDFIELD. Summary: Get one or multiple random fields from a hash Group: hash Requires Redis 6.2.0
      Specified by:
      hrandfield in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      count - the number of random key to retrieve. If count is positive, the selected keys are distinct. If count is negative, the produced list can contain duplicated keys.
      Returns:
      the list of keys, empty if the key does not exist
    • hrandfieldWithValues

      public io.smallrye.mutiny.Uni<Map<F,V>> hrandfieldWithValues(K key, long count)
      Description copied from interface: ReactiveHashCommands
      Execute the command HRANDFIELD. Summary: Get one or multiple random fields and the associated values from a hash Group: hash Requires Redis 6.2.0
      Specified by:
      hrandfieldWithValues in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      count - the number of random key to retrieve. If count is positive, the selected keys are distinct. If count is negative, the produced list can contain duplicated keys. These duplicates are not included in the produced Map.
      Returns:
      the map containing the random keys and the associated values, empty if the key does not exist
    • hset

      public io.smallrye.mutiny.Uni<Boolean> hset(K key, F field, V value)
      Description copied from interface: ReactiveHashCommands
      Execute the command HSET. Summary: Set the string value of a hash field Group: hash Requires Redis 2.0.0
      Specified by:
      hset in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      field - the field
      value - the value
      Returns:
      true if the value was set
    • hset

      public io.smallrye.mutiny.Uni<Long> hset(K key, Map<F,V> map)
      Description copied from interface: ReactiveHashCommands
      Execute the command HSET. Summary: Set the string value of a hash field Group: hash Requires Redis 2.0.0
      Specified by:
      hset in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      map - the set of key -> value to add to the hash
      Returns:
      the number of fields that were added.
    • hsetnx

      public io.smallrye.mutiny.Uni<Boolean> hsetnx(K key, F field, V value)
      Description copied from interface: ReactiveHashCommands
      Execute the command HSETNX. Summary: Set the value of a hash field, only if the field does not exist Group: hash Requires Redis 2.0.0
      Specified by:
      hsetnx in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      field - the value
      value - the value
      Returns:
      true field is a new field in the hash and value was set. false field already exists in the hash and no operation was performed.
    • hstrlen

      public io.smallrye.mutiny.Uni<Long> hstrlen(K key, F field)
      Description copied from interface: ReactiveHashCommands
      Execute the command HSTRLEN. Summary: Get the length of the value of a hash field Group: hash Requires Redis 3.2.0
      Specified by:
      hstrlen in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      field - the value
      Returns:
      the string length of the value associated with field, or zero when field is not present in the hash or key does not exist at all.
    • hvals

      public io.smallrye.mutiny.Uni<List<V>> hvals(K key)
      Description copied from interface: ReactiveHashCommands
      Execute the command HVALS. Summary: Get all the values in a hash Group: hash Requires Redis 2.0.0
      Specified by:
      hvals in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      Returns:
      list of values in the hash, or an empty list when key does not exist.
    • hscan

      public ReactiveHashScanCursor<F,V> hscan(K key)
      Description copied from interface: ReactiveHashCommands
      Execute the command HSCAN. Summary: Incrementally iterate hash fields and associated values Group: hash Requires Redis 2.8.0
      Specified by:
      hscan in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      Returns:
      the cursor.
    • hscan

      public ReactiveHashScanCursor<F,V> hscan(K key, ScanArgs scanArgs)
      Description copied from interface: ReactiveHashCommands
      Execute the command HSCAN. Summary: Incrementally iterate hash fields and associated values Group: hash Requires Redis 2.8.0
      Specified by:
      hscan in interface ReactiveHashCommands<K,F,V>
      Parameters:
      key - the key
      scanArgs - the additional argument
      Returns:
      the cursor