Interface ReactiveValueOperations<K,V>


public interface ReactiveValueOperations<K,V>
Reactive Redis operations for simple (or in Redis terminology 'string') values.

Streams of methods returning Mono<K> or Flux<M> are terminated with InvalidDataAccessApiUsageException when RedisElementReader.read(ByteBuffer) returns null for a particular element as Reactive Streams prohibit the usage of null values.

Since:
2.0
Author:
Mark Paluch, Jiahe Cai
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<Long>
    append(K key, String value)
    Append a value to key.
    reactor.core.publisher.Mono<List<Long>>
    Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a given key.
    reactor.core.publisher.Mono<Long>
    decrement(K key)
    Decrements the number stored at key by one.
    reactor.core.publisher.Mono<Long>
    decrement(K key, long delta)
    Decrements the number stored at key by delta.
    reactor.core.publisher.Mono<Boolean>
    delete(K key)
    Removes the given key.
    reactor.core.publisher.Mono<V>
    get(Object key)
    Get the value of key.
    reactor.core.publisher.Mono<String>
    get(K key, long start, long end)
    Get a substring of value of key between begin and end.
    reactor.core.publisher.Mono<V>
    Return the value at key and delete the key.
    reactor.core.publisher.Mono<V>
    getAndExpire(K key, Duration timeout)
    Return the value at key and expire the key by applying timeout.
    reactor.core.publisher.Mono<V>
    Return the value at key and persist the key.
    reactor.core.publisher.Mono<V>
    getAndSet(K key, V value)
    Set value of key and return its old value.
    reactor.core.publisher.Mono<Boolean>
    getBit(K key, long offset)
    « Get the bit value at offset of value at key.
    reactor.core.publisher.Mono<Long>
    increment(K key)
    Increments the number stored at key by one.
    reactor.core.publisher.Mono<Double>
    increment(K key, double delta)
    Increment the string representing a floating point number stored at key by delta.
    reactor.core.publisher.Mono<Long>
    increment(K key, long delta)
    Increments the number stored at key by delta.
    reactor.core.publisher.Mono<List<V>>
    Get multiple keys.
    reactor.core.publisher.Mono<Boolean>
    multiSet(Map<? extends K,? extends V> map)
    Set multiple keys to multiple values using key-value pairs provided in tuple.
    reactor.core.publisher.Mono<Boolean>
    multiSetIfAbsent(Map<? extends K,? extends V> map)
    Set multiple keys to multiple values using key-value pairs provided in tuple only if the provided key does not exist.
    reactor.core.publisher.Mono<Boolean>
    set(K key, V value)
    Set value for key.
    reactor.core.publisher.Mono<Long>
    set(K key, V value, long offset)
    Overwrite parts of key starting at the specified offset with given value.
    reactor.core.publisher.Mono<Boolean>
    set(K key, V value, Duration timeout)
    Set the value and expiration timeout for key.
    reactor.core.publisher.Mono<Boolean>
    setBit(K key, long offset, boolean value)
    Sets the bit at offset in value stored at key.
    reactor.core.publisher.Mono<Boolean>
    setIfAbsent(K key, V value)
    Set key to hold the string value if key is absent.
    reactor.core.publisher.Mono<Boolean>
    setIfAbsent(K key, V value, Duration timeout)
    Set key to hold the string value and expiration timeout if key is absent.
    reactor.core.publisher.Mono<Boolean>
    setIfPresent(K key, V value)
    Set key to hold the string value if key is present.
    reactor.core.publisher.Mono<Boolean>
    setIfPresent(K key, V value, Duration timeout)
    Set key to hold the string value and expiration timeout if key is present.
    reactor.core.publisher.Mono<Long>
    size(K key)
    Get the length of the value stored at key.
  • Method Details

    • set

      reactor.core.publisher.Mono<Boolean> set(K key, V value)
      Set value for key.
      Parameters:
      key - must not be null.
      value -
      See Also:
    • set

      reactor.core.publisher.Mono<Boolean> set(K key, V value, Duration timeout)
      Set the value and expiration timeout for key.
      Parameters:
      key - must not be null.
      value -
      timeout - must not be null.
      See Also:
    • setIfAbsent

      reactor.core.publisher.Mono<Boolean> setIfAbsent(K key, V value)
      Set key to hold the string value if key is absent.
      Parameters:
      key - must not be null.
      value -
      See Also:
    • setIfAbsent

      reactor.core.publisher.Mono<Boolean> setIfAbsent(K key, V value, Duration timeout)
      Set key to hold the string value and expiration timeout if key is absent.
      Parameters:
      key - must not be null.
      value -
      timeout - must not be null.
      Since:
      2.1
      See Also:
    • setIfPresent

      reactor.core.publisher.Mono<Boolean> setIfPresent(K key, V value)
      Set key to hold the string value if key is present.
      Parameters:
      key - must not be null.
      value -
      See Also:
    • setIfPresent

      reactor.core.publisher.Mono<Boolean> setIfPresent(K key, V value, Duration timeout)
      Set key to hold the string value and expiration timeout if key is present.
      Parameters:
      key - must not be null.
      value -
      timeout - must not be null.
      Since:
      2.1
      See Also:
    • multiSet

      reactor.core.publisher.Mono<Boolean> multiSet(Map<? extends K,? extends V> map)
      Set multiple keys to multiple values using key-value pairs provided in tuple.
      Parameters:
      map - must not be null.
      See Also:
    • multiSetIfAbsent

      reactor.core.publisher.Mono<Boolean> multiSetIfAbsent(Map<? extends K,? extends V> map)
      Set multiple keys to multiple values using key-value pairs provided in tuple only if the provided key does not exist.
      Parameters:
      map - must not be null.
      See Also:
    • get

      reactor.core.publisher.Mono<V> get(Object key)
      Get the value of key.
      Parameters:
      key - must not be null.
      See Also:
    • getAndDelete

      reactor.core.publisher.Mono<V> getAndDelete(K key)
      Return the value at key and delete the key.
      Parameters:
      key - must not be null.
      Since:
      2.6
      See Also:
    • getAndExpire

      reactor.core.publisher.Mono<V> getAndExpire(K key, Duration timeout)
      Return the value at key and expire the key by applying timeout.
      Parameters:
      key - must not be null.
      timeout - must not be null.
      Since:
      2.6
      See Also:
    • getAndPersist

      reactor.core.publisher.Mono<V> getAndPersist(K key)
      Return the value at key and persist the key. This operation removes any TTL that is associated with key.
      Parameters:
      key - must not be null.
      Since:
      2.6
      See Also:
    • getAndSet

      reactor.core.publisher.Mono<V> getAndSet(K key, V value)
      Set value of key and return its old value.
      Parameters:
      key - must not be null.
      See Also:
    • multiGet

      reactor.core.publisher.Mono<List<V>> multiGet(Collection<K> keys)
      Get multiple keys. Values are in the order of the requested keys. Absent field values are represented using null in the resulting List.
      Parameters:
      keys - must not be null.
      See Also:
    • increment

      reactor.core.publisher.Mono<Long> increment(K key)
      Increments the number stored at key by one.
      Parameters:
      key - must not be null.
      Since:
      2.1
      See Also:
    • increment

      reactor.core.publisher.Mono<Long> increment(K key, long delta)
      Increments the number stored at key by delta.
      Parameters:
      key - must not be null.
      delta -
      Since:
      2.1
      See Also:
    • increment

      reactor.core.publisher.Mono<Double> increment(K key, double delta)
      Increment the string representing a floating point number stored at key by delta.
      Parameters:
      key - must not be null.
      delta -
      Since:
      2.1
      See Also:
    • decrement

      reactor.core.publisher.Mono<Long> decrement(K key)
      Decrements the number stored at key by one.
      Parameters:
      key - must not be null.
      Since:
      2.1
      See Also:
    • decrement

      reactor.core.publisher.Mono<Long> decrement(K key, long delta)
      Decrements the number stored at key by delta.
      Parameters:
      key - must not be null.
      delta -
      Since:
      2.1
      See Also:
    • append

      reactor.core.publisher.Mono<Long> append(K key, String value)
      Append a value to key.
      Parameters:
      key - must not be null.
      value -
      See Also:
    • get

      reactor.core.publisher.Mono<String> get(K key, long start, long end)
      Get a substring of value of key between begin and end.
      Parameters:
      key - must not be null.
      start -
      end -
      See Also:
    • set

      reactor.core.publisher.Mono<Long> set(K key, V value, long offset)
      Overwrite parts of key starting at the specified offset with given value.
      Parameters:
      key - must not be null.
      value -
      offset -
      See Also:
    • size

      reactor.core.publisher.Mono<Long> size(K key)
      Get the length of the value stored at key.
      Parameters:
      key - must not be null.
      See Also:
    • setBit

      reactor.core.publisher.Mono<Boolean> setBit(K key, long offset, boolean value)
      Sets the bit at offset in value stored at key.
      Parameters:
      key - must not be null.
      offset -
      value -
      See Also:
    • getBit

      reactor.core.publisher.Mono<Boolean> getBit(K key, long offset)
      « Get the bit value at offset of value at key.
      Parameters:
      key - must not be null.
      offset -
      See Also:
    • bitField

      reactor.core.publisher.Mono<List<Long>> bitField(K key, BitFieldSubCommands command)
      Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a given key.
      Parameters:
      key - must not be null.
      command - must not be null.
      Returns:
      Since:
      2.1
    • delete

      reactor.core.publisher.Mono<Boolean> delete(K key)
      Removes the given key.
      Parameters:
      key - must not be null.