Class BlockingTransactionalJsonCommandsImpl<K>

java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractTransactionalRedisCommandGroup
io.quarkus.redis.runtime.datasource.BlockingTransactionalJsonCommandsImpl<K>
All Implemented Interfaces:
TransactionalJsonCommands<K>, TransactionalRedisCommands

public class BlockingTransactionalJsonCommandsImpl<K> extends AbstractTransactionalRedisCommandGroup implements TransactionalJsonCommands<K>
  • Constructor Details

  • Method Details

    • jsonSet

      public <T> void jsonSet(K key, String path, T value)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json
      Specified by:
      jsonSet in interface TransactionalJsonCommands<K>
      Type Parameters:
      T - the type for the value
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      value - the value, encoded to JSON
    • jsonSet

      public void jsonSet(K key, String path, io.vertx.core.json.JsonObject json)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json
      Specified by:
      jsonSet in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      json - the JSON object to store, must not be null
    • jsonSet

      public void jsonSet(K key, String path, io.vertx.core.json.JsonObject json, JsonSetArgs args)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json
      Specified by:
      jsonSet in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      json - the JSON object to store, must not be null
      args - the extra arguments
    • jsonSet

      public void jsonSet(K key, String path, io.vertx.core.json.JsonArray json)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json
      Specified by:
      jsonSet in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      json - the JSON array to store, must not be null
    • jsonSet

      public void jsonSet(K key, String path, io.vertx.core.json.JsonArray json, JsonSetArgs args)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json
      Specified by:
      jsonSet in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      json - the JSON array to store, must not be null
      args - the extra arguments
    • jsonSet

      public <T> void jsonSet(K key, String path, T value, JsonSetArgs args)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json
      Specified by:
      jsonSet in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      value - the value to store, encoded to JSON.
      args - the extra arguments
    • jsonGet

      public <T> void jsonGet(K key, Class<T> clazz)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json

      This method uses the root path ($). It maps the retrieve JSON document to an object of type <T>.

      Specified by:
      jsonGet in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      clazz - the type of object to recreate from the JSON content
    • jsonGetObject

      public void jsonGetObject(K key)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json

      This method uses the root path ($). Unlike TransactionalJsonCommands.jsonGet(Object, Class), it returns a JsonObject.

      Specified by:
      jsonGetObject in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
    • jsonGetArray

      public void jsonGetArray(K key)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json

      This method uses the root path ($). Unlike TransactionalJsonCommands.jsonGet(Object, Class), it returns a JsonArray.

      Specified by:
      jsonGetArray in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
    • jsonGet

      public void jsonGet(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json

      Specified by:
      jsonGet in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
    • jsonGet

      public void jsonGet(K key, String... paths)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json

      Specified by:
      jsonGet in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      paths - the paths, must not be null. If no path are passed, this is equivalent to TransactionalJsonCommands.jsonGetObject(Object), if multiple paths are passed, the produced JSON object contains the result (as a json array) for each path.
    • jsonArrAppend

      public <T> void jsonArrAppend(K key, String path, T... values)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.ARRAPPEND. Summary: Append the json values into the array at path after the last element in it. Group: json

      Specified by:
      jsonArrAppend in interface TransactionalJsonCommands<K>
      Type Parameters:
      T - the type of value
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      values - the values to append, encoded to JSON
    • jsonArrIndex

      public <T> void jsonArrIndex(K key, String path, T value, int start, int end)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.ARRINDEX. Summary: Searches for the first occurrence of a scalar JSON value in an array. Group: json

      Specified by:
      jsonArrIndex in interface TransactionalJsonCommands<K>
      Type Parameters:
      T - the type of value
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      value - the value to be searched, encoded to JSON
      start - the start index
      end - the end index
    • jsonArrInsert

      public <T> void jsonArrInsert(K key, String path, int index, T... values)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.ARRINSERT. Summary: Inserts the json values into the array at path before the index (shifts to the right). Group: json

      Specified by:
      jsonArrInsert in interface TransactionalJsonCommands<K>
      Type Parameters:
      T - the type of value
      Parameters:
      key - the key, must not be null
      path - the path, must not be null
      index - the index. The index must be in the array's range. Inserting at index 0 prepends to the array. Negative index values start from the end of the array.
      values - the values to insert, encoded to JSON
    • jsonArrLen

      public void jsonArrLen(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.ARRLEN. Summary: Reports the length of the JSON Array at path in key. Group: json

      Specified by:
      jsonArrLen in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - the path, null means $
    • jsonArrPop

      public <T> void jsonArrPop(K key, Class<T> clazz, String path, int index)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.ARRPOP. Summary: Removes and returns an element from the index in the array. Group: json

      Specified by:
      jsonArrPop in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      clazz - the type of the popped object
      path - path the path, defaults to root if not provided.
      index - is the position in the array to start popping from (defaults to -1, meaning the last element). Out-of-range indexes round to their respective array ends.
    • jsonArrTrim

      public void jsonArrTrim(K key, String path, int start, int stop)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.ARRTRIM. Summary: Trims an array so that it contains only the specified inclusive range of elements. Group: json

      Specified by:
      jsonArrTrim in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, must not be null
      start - the start index
      stop - the stop index
    • jsonClear

      public void jsonClear(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.CLEAR. Summary: Clears container values (Arrays/Objects), and sets numeric values to 0. Group: json

      Specified by:
      jsonClear in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, path defaults to $ if not provided. Non-existing paths are ignored.
    • jsonDel

      public void jsonDel(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.DEL. Summary: Deletes a value. Group: json

      Specified by:
      jsonDel in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, path defaults to $ if not provided. Non-existing paths are ignored.
    • jsonMget

      public void jsonMget(String path, K... keys)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.MGET. Summary: Returns the values at path from multiple key arguments. Returns null for nonexistent keys and nonexistent paths. Group: json

      Specified by:
      jsonMget in interface TransactionalJsonCommands<K>
      Parameters:
      path - path the path
      keys - the keys, must not be null, must not contain null
    • jsonNumincrby

      public void jsonNumincrby(K key, String path, double value)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.NUMINCRBY. Summary: Increments the number value stored at path by number. Group: json

      Specified by:
      jsonNumincrby in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, path defaults to $ if not provided. Non-existing paths are ignored.
      value - the value to add
    • jsonObjKeys

      public void jsonObjKeys(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.OBJKEYS. Summary: Returns the keys in the object that's referenced by path. Group: json

      Specified by:
      jsonObjKeys in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, path defaults to $ if not provided.
    • jsonObjLen

      public void jsonObjLen(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.OBJLEN. Summary: Reports the number of keys in the JSON Object at path in key. Group: json

      Specified by:
      jsonObjLen in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, path defaults to $ if not provided.
    • jsonStrAppend

      public void jsonStrAppend(K key, String path, String value)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.STRAPPEND. Summary: Appends the json-string values to the string at path. Group: json

      Specified by:
      jsonStrAppend in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, path defaults to $ if not provided.
      value - the string to append, must not be null
    • jsonStrLen

      public void jsonStrLen(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.STRLEN. Summary: Reports the length of the JSON String at path in key. Group: json

      Specified by:
      jsonStrLen in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, path defaults to $ if not provided.
    • jsonToggle

      public void jsonToggle(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.TOGGLE. Summary: Toggle a boolean value stored at path. Group: json

      Specified by:
      jsonToggle in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, must not be null
    • jsonType

      public void jsonType(K key, String path)
      Description copied from interface: TransactionalJsonCommands
      Execute the command JSON.TYPE. Summary: Reports the type of JSON value at path. Group: json

      Specified by:
      jsonType in interface TransactionalJsonCommands<K>
      Parameters:
      key - the key, must not be null
      path - path the path, path defaults to $ if not provided.