Class BlockingStringCommandsImpl<K,V>

java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
io.quarkus.redis.runtime.datasource.BlockingStringCommandsImpl<K,V>
All Implemented Interfaces:
RedisCommands, StringCommands<K,V>, ValueCommands<K,V>

public class BlockingStringCommandsImpl<K,V> extends AbstractRedisCommandGroup implements StringCommands<K,V>, ValueCommands<K,V>
  • Constructor Details

  • Method Details

    • append

      public long append(K key, V value)
      Description copied from interface: StringCommands
      Execute the command APPEND. Summary: Append a value to a key Group: string Requires Redis 2.0.0
      Specified by:
      append in interface StringCommands<K,V>
      Specified by:
      append in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
      Returns:
      the length of the string after the append operation.
    • decr

      public long decr(K key)
      Description copied from interface: StringCommands
      Execute the command DECR. Summary: Decrement the integer value of a key by one Group: string Requires Redis 1.0.0
      Specified by:
      decr in interface StringCommands<K,V>
      Specified by:
      decr in interface ValueCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the value of key after the decrement
    • decrby

      public long decrby(K key, long amount)
      Description copied from interface: StringCommands
      Execute the command DECRBY. Summary: Decrement the integer value of a key by the given number Group: string Requires Redis 1.0.0
      Specified by:
      decrby in interface StringCommands<K,V>
      Specified by:
      decrby in interface ValueCommands<K,V>
      Parameters:
      key - the key
      amount - the amount, can be negative
      Returns:
      the value of key after the decrement
    • get

      public V get(K key)
      Description copied from interface: StringCommands
      Execute the command GET. Summary: Get the value of a key Group: string Requires Redis 1.0.0
      Specified by:
      get in interface StringCommands<K,V>
      Specified by:
      get in interface ValueCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the value of key, or null when key does not exist.
    • getdel

      public V getdel(K key)
      Description copied from interface: StringCommands
      Execute the command GETDEL. Summary: Get the value of a key and delete the key Group: string Requires Redis 6.2.0
      Specified by:
      getdel in interface StringCommands<K,V>
      Specified by:
      getdel in interface ValueCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the value of key, null when key does not exist, or an error if the key's value type isn't a string.
    • getex

      public V getex(K key, GetExArgs args)
      Description copied from interface: StringCommands
      Execute the command GETEX. Summary: Get the value of a key and optionally set its expiration Group: string Requires Redis 6.2.0
      Specified by:
      getex in interface StringCommands<K,V>
      Parameters:
      key - the key
      args - the getex command extra-arguments
      Returns:
      the value of key, or null when key does not exist.
    • getex

      public V getex(K key, GetExArgs args)
      Description copied from interface: ValueCommands
      Execute the command GETEX. Summary: Get the value of a key and optionally set its expiration Group: string Requires Redis 6.2.0
      Specified by:
      getex in interface ValueCommands<K,V>
      Parameters:
      key - the key
      args - the getex command extra-arguments
      Returns:
      the value of key, or null when key does not exist.
    • getrange

      public String getrange(K key, long start, long end)
      Description copied from interface: StringCommands
      Execute the command GETRANGE. Summary: Get a substring of the string stored at a key Group: string Requires Redis 2.4.0
      Specified by:
      getrange in interface StringCommands<K,V>
      Specified by:
      getrange in interface ValueCommands<K,V>
      Parameters:
      key - the key
      start - the start offset
      end - the end offset
      Returns:
      the sub-string
    • getset

      public V getset(K key, V value)
      Description copied from interface: StringCommands
      Execute the command GETSET. Summary: Set the string value of a key and return its old value Group: string Requires Redis 1.0.0
      Specified by:
      getset in interface StringCommands<K,V>
      Specified by:
      getset in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
      Returns:
      the old value stored at key, or null when key did not exist.
    • incr

      public long incr(K key)
      Description copied from interface: StringCommands
      Execute the command INCR. Summary: Increment the integer value of a key by one Group: string Requires Redis 1.0.0
      Specified by:
      incr in interface StringCommands<K,V>
      Specified by:
      incr in interface ValueCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the value of key after the increment
    • incrby

      public long incrby(K key, long amount)
      Description copied from interface: StringCommands
      Execute the command INCRBY. Summary: Increment the integer value of a key by the given amount Group: string Requires Redis 1.0.0
      Specified by:
      incrby in interface StringCommands<K,V>
      Specified by:
      incrby in interface ValueCommands<K,V>
      Parameters:
      key - the key
      amount - the amount, can be negative
      Returns:
      the value of key after the increment
    • incrbyfloat

      public double incrbyfloat(K key, double amount)
      Description copied from interface: StringCommands
      Execute the command INCRBYFLOAT. Summary: Increment the float value of a key by the given amount Group: string Requires Redis 2.6.0
      Specified by:
      incrbyfloat in interface StringCommands<K,V>
      Specified by:
      incrbyfloat in interface ValueCommands<K,V>
      Parameters:
      key - the key
      amount - the amount, can be negative
      Returns:
      the value of key after the increment.
    • lcs

      public String lcs(K key1, K key2)
      Description copied from interface: StringCommands
      Execute the command LCS. Summary: Find longest common substring Group: string Requires Redis 7.0.0
      Specified by:
      lcs in interface StringCommands<K,V>
      Specified by:
      lcs in interface ValueCommands<K,V>
      Parameters:
      key1 - the key
      key2 - the key
      Returns:
      the string representing the longest common substring is returned.
    • lcsLength

      public long lcsLength(K key1, K key2)
      Description copied from interface: StringCommands
      Execute the command LCS. Summary: Find longest common substring and return the length (using LEN) Group: string Requires Redis 7.0.0
      Specified by:
      lcsLength in interface StringCommands<K,V>
      Specified by:
      lcsLength in interface ValueCommands<K,V>
      Parameters:
      key1 - the key
      key2 - the key
      Returns:
      the length of the longest common substring.
    • mget

      public Map<K,V> mget(K... keys)
      Description copied from interface: StringCommands
      Execute the command MGET. Summary: Get the values of all the given keys Group: string Requires Redis 1.0.0
      Specified by:
      mget in interface StringCommands<K,V>
      Specified by:
      mget in interface ValueCommands<K,V>
      Parameters:
      keys - the keys
      Returns:
      list of values at the specified keys. If one of the passed key does not exist, the returned map contains a null value associated with the missing key.
    • mset

      public void mset(Map<K,V> map)
      Description copied from interface: StringCommands
      Execute the command MSET. Summary: Set multiple keys to multiple values Group: string Requires Redis 1.0.1
      Specified by:
      mset in interface StringCommands<K,V>
      Specified by:
      mset in interface ValueCommands<K,V>
      Parameters:
      map - the key/value map containing the items to store
    • msetnx

      public boolean msetnx(Map<K,V> map)
      Description copied from interface: StringCommands
      Execute the command MSETNX. Summary: Set multiple keys to multiple values, only if none of the keys exist Group: string Requires Redis 1.0.1
      Specified by:
      msetnx in interface StringCommands<K,V>
      Specified by:
      msetnx in interface ValueCommands<K,V>
      Parameters:
      map - the key/value map containing the items to store
      Returns:
      true the all the keys were set. false no key was set (at least one key already existed).
    • set

      public void set(K key, V value)
      Description copied from interface: StringCommands
      Execute the command SET. Summary: Set the string value of a key Group: string Requires Redis 1.0.0
      Specified by:
      set in interface StringCommands<K,V>
      Specified by:
      set in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
    • set

      public void set(K key, V value, SetArgs setArgs)
      Description copied from interface: StringCommands
      Execute the command SET. Summary: Set the string value of a key Group: string Requires Redis 1.0.0
      Specified by:
      set in interface StringCommands<K,V>
      Parameters:
      key - the key
      value - the value
      setArgs - the set command extra-arguments
    • set

      public void set(K key, V value, SetArgs setArgs)
      Description copied from interface: ValueCommands
      Execute the command SET. Summary: Set the string value of a key Group: string Requires Redis 1.0.0
      Specified by:
      set in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
      setArgs - the set command extra-arguments
    • setGet

      public V setGet(K key, V value)
      Description copied from interface: StringCommands
      Execute the command SET. Summary: Set the string value of a key, and return the previous value Group: string Requires Redis 1.0.0
      Specified by:
      setGet in interface StringCommands<K,V>
      Specified by:
      setGet in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
      Returns:
      the old value, null if not present
    • setGet

      public V setGet(K key, V value, SetArgs setArgs)
      Description copied from interface: StringCommands
      Execute the command SET. Summary: Set the string value of a key, and return the previous value Group: string Requires Redis 1.0.0
      Specified by:
      setGet in interface StringCommands<K,V>
      Parameters:
      key - the key
      value - the value
      setArgs - the set command extra-arguments
      Returns:
      the old value, null if not present
    • setGet

      public V setGet(K key, V value, SetArgs setArgs)
      Description copied from interface: ValueCommands
      Execute the command SET. Summary: Set the string value of a key, and return the previous value Group: string Requires Redis 1.0.0
      Specified by:
      setGet in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
      setArgs - the set command extra-arguments
      Returns:
      the old value, null if not present
    • setex

      public void setex(K key, long seconds, V value)
      Description copied from interface: StringCommands
      Execute the command SETEX. Summary: Set the value and expiration of a key Group: string Requires Redis 2.0.0
      Specified by:
      setex in interface StringCommands<K,V>
      Specified by:
      setex in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
    • psetex

      public void psetex(K key, long milliseconds, V value)
      Description copied from interface: StringCommands
      Execute the command PSETEX. Summary: Set the value and expiration in milliseconds of a key Group: string Requires Redis 2.6.0
      Specified by:
      psetex in interface StringCommands<K,V>
      Specified by:
      psetex in interface ValueCommands<K,V>
      Parameters:
      key - the key
      milliseconds - the duration in ms
      value - the value
    • setnx

      public boolean setnx(K key, V value)
      Description copied from interface: StringCommands
      Execute the command SETNX. Summary: Set the value of a key, only if the key does not exist Group: string Requires Redis 1.0.0
      Specified by:
      setnx in interface StringCommands<K,V>
      Specified by:
      setnx in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
      Returns:
      true the key was set false the key was not set
    • setrange

      public long setrange(K key, long offset, V value)
      Description copied from interface: StringCommands
      Execute the command SETRANGE. Summary: Overwrite part of a string at key starting at the specified offset Group: string Requires Redis 2.2.0
      Specified by:
      setrange in interface StringCommands<K,V>
      Specified by:
      setrange in interface ValueCommands<K,V>
      Parameters:
      key - the key
      value - the value
      Returns:
      the length of the string after it was modified by the command.
    • strlen

      public long strlen(K key)
      Description copied from interface: StringCommands
      Execute the command STRLEN. Summary: Get the length of the value stored in a key Group: string Requires Redis 2.2.0
      Specified by:
      strlen in interface StringCommands<K,V>
      Specified by:
      strlen in interface ValueCommands<K,V>
      Parameters:
      key - the key
      Returns:
      the length of the string at key, or 0 when key does not exist.