Class ReactiveTransactionalJsonCommandsImpl<K>
java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractTransactionalCommands
io.quarkus.redis.runtime.datasource.ReactiveTransactionalJsonCommandsImpl<K>
- All Implemented Interfaces:
ReactiveTransactionalJsonCommands<K>,ReactiveTransactionalRedisCommands
public class ReactiveTransactionalJsonCommandsImpl<K>
extends AbstractTransactionalCommands
implements ReactiveTransactionalJsonCommands<K>
-
Field Summary
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractTransactionalCommands
tx -
Constructor Summary
ConstructorsConstructorDescriptionReactiveTransactionalJsonCommandsImpl(ReactiveTransactionalRedisDataSource ds, ReactiveJsonCommandsImpl<K> reactive, TransactionHolder tx) -
Method Summary
Modifier and TypeMethodDescription<T> io.smallrye.mutiny.Uni<Void>jsonArrAppend(K key, String path, T... values) Execute the command JSON.ARRAPPEND.<T> io.smallrye.mutiny.Uni<Void>jsonArrIndex(K key, String path, T value, int start, int end) Execute the command JSON.ARRINDEX.<T> io.smallrye.mutiny.Uni<Void>jsonArrInsert(K key, String path, int index, T... values) Execute the command JSON.ARRINSERT.io.smallrye.mutiny.Uni<Void>jsonArrLen(K key, String path) Execute the command JSON.ARRLEN.<T> io.smallrye.mutiny.Uni<Void>jsonArrPop(K key, Class<T> clazz, String path, int index) Execute the command JSON.ARRPOP.io.smallrye.mutiny.Uni<Void>jsonArrTrim(K key, String path, int start, int stop) Execute the command JSON.ARRTRIM.io.smallrye.mutiny.Uni<Void>Execute the command JSON.CLEAR.io.smallrye.mutiny.Uni<Void>Execute the command JSON.DEL.<T> io.smallrye.mutiny.Uni<Void>Execute the command JSON.GET.io.smallrye.mutiny.Uni<Void>Execute the command JSON.GET.io.smallrye.mutiny.Uni<Void>Execute the command JSON.GET.io.smallrye.mutiny.Uni<Void>jsonGetArray(K key) Execute the command JSON.GET.io.smallrye.mutiny.Uni<Void>jsonGetObject(K key) Execute the command JSON.GET.io.smallrye.mutiny.Uni<Void>Execute the command JSON.MGET.io.smallrye.mutiny.Uni<Void>jsonNumincrby(K key, String path, double value) Execute the command JSON.NUMINCRBY.io.smallrye.mutiny.Uni<Void>jsonObjKeys(K key, String path) Execute the command JSON.OBJKEYS.io.smallrye.mutiny.Uni<Void>jsonObjLen(K key, String path) Execute the command JSON.OBJLEN.io.smallrye.mutiny.Uni<Void>Execute the command JSON.SET.io.smallrye.mutiny.Uni<Void>jsonSet(K key, String path, io.vertx.core.json.JsonArray json, JsonSetArgs args) Execute the command JSON.SET.io.smallrye.mutiny.Uni<Void>Execute the command JSON.SET.io.smallrye.mutiny.Uni<Void>jsonSet(K key, String path, io.vertx.core.json.JsonObject json, JsonSetArgs args) Execute the command JSON.SET.<T> io.smallrye.mutiny.Uni<Void>Execute the command JSON.SET.<T> io.smallrye.mutiny.Uni<Void>jsonSet(K key, String path, T value, JsonSetArgs args) Execute the command JSON.SET.io.smallrye.mutiny.Uni<Void>jsonStrAppend(K key, String path, String value) Execute the command JSON.STRAPPEND.io.smallrye.mutiny.Uni<Void>jsonStrLen(K key, String path) Execute the command JSON.STRLEN.io.smallrye.mutiny.Uni<Void>jsonToggle(K key, String path) Execute the command JSON.TOGGLE.io.smallrye.mutiny.Uni<Void>Execute the command JSON.TYPE.Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractTransactionalCommands
getDataSource, queuedOrDiscardMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.redis.datasource.json.ReactiveTransactionalJsonCommands
jsonArrIndex, jsonArrPop, jsonClear, jsonDel, jsonSet, jsonSet, jsonSetMethods inherited from interface io.quarkus.redis.datasource.ReactiveTransactionalRedisCommands
getDataSource
-
Constructor Details
-
ReactiveTransactionalJsonCommandsImpl
public ReactiveTransactionalJsonCommandsImpl(ReactiveTransactionalRedisDataSource ds, ReactiveJsonCommandsImpl<K> reactive, TransactionHolder tx)
-
-
Method Details
-
jsonSet
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Specified by:
jsonSetin interfaceReactiveTransactionalJsonCommands<K>- Type Parameters:
T- the type for the value- Parameters:
key- the key, must not benullpath- the path, must not benullvalue- the value, encoded to JSON- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonSet
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Specified by:
jsonSetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- the path, must not benulljson- the JSON object to store, must not benull- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonSet
public io.smallrye.mutiny.Uni<Void> jsonSet(K key, String path, io.vertx.core.json.JsonObject json, JsonSetArgs args) Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Specified by:
jsonSetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- the path, must not benulljson- the JSON object to store, must not benullargs- the extra arguments- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonSet
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Specified by:
jsonSetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- the path, must not benulljson- the JSON array to store, must not benull- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonSet
public io.smallrye.mutiny.Uni<Void> jsonSet(K key, String path, io.vertx.core.json.JsonArray json, JsonSetArgs args) Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Specified by:
jsonSetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- the path, must not benulljson- the JSON array to store, must not benullargs- the extra arguments- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonSet
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.SET. Summary: Sets the JSON value at path in key. Group: json- Specified by:
jsonSetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- the path, must not benullvalue- the value to store, encoded to JSON.args- the extra arguments- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonGet
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: jsonThis method uses the root path (
$). It maps the retrieve JSON document to an object of type<T>.- Specified by:
jsonGetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullclazz- the type of object to recreate from the JSON content- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonGetObject
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: jsonThis method uses the root path (
$). UnlikeReactiveTransactionalJsonCommands.jsonGet(Object, Class), it returns aJsonObject.- Specified by:
jsonGetObjectin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benull- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonGetArray
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: jsonThis method uses the root path (
$). UnlikeReactiveTransactionalJsonCommands.jsonGet(Object, Class), it returns aJsonArray.- Specified by:
jsonGetArrayin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benull- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonGet
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json- Specified by:
jsonGetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- the path, must not benull- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonGet
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.GET. Summary: Returns the value at path in JSON serialized form. Group: json- Specified by:
jsonGetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpaths- the paths, must not benull. If no path are passed, this is equivalent toReactiveTransactionalJsonCommands.jsonGetObject(Object), if multiple paths are passed, the produced JSON object contains the result (as a json array) for each path.- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonArrAppend
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.ARRAPPEND. Summary: Append the json values into the array at path after the last element in it. Group: json- Specified by:
jsonArrAppendin interfaceReactiveTransactionalJsonCommands<K>- Type Parameters:
T- the type of value- Parameters:
key- the key, must not benullpath- the path, must not benullvalues- the values to append, encoded to JSON- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonArrIndex
public <T> io.smallrye.mutiny.Uni<Void> jsonArrIndex(K key, String path, T value, int start, int end) Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.ARRINDEX. Summary: Searches for the first occurrence of a scalar JSON value in an array. Group: json- Specified by:
jsonArrIndexin interfaceReactiveTransactionalJsonCommands<K>- Type Parameters:
T- the type of value- Parameters:
key- the key, must not benullpath- the path, must not benullvalue- the value to be searched, encoded to JSONstart- the start indexend- the end index- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonArrInsert
Description copied from interface:ReactiveTransactionalJsonCommandsExecute 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:
jsonArrInsertin interfaceReactiveTransactionalJsonCommands<K>- Type Parameters:
T- the type of value- Parameters:
key- the key, must not benullpath- the path, must not benullindex- 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- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonArrLen
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.ARRLEN. Summary: Reports the length of the JSON Array at path in key. Group: json- Specified by:
jsonArrLenin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- the path,nullmeans$- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonArrPop
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.ARRPOP. Summary: Removes and returns an element from the index in the array. Group: json- Specified by:
jsonArrPopin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullclazz- the type of the popped objectpath- 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.- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonArrTrim
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.ARRTRIM. Summary: Trims an array so that it contains only the specified inclusive range of elements. Group: json- Specified by:
jsonArrTrimin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, must not benullstart- the start indexstop- the stop index- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonClear
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.CLEAR. Summary: Clears container values (Arrays/Objects), and sets numeric values to 0. Group: json- Specified by:
jsonClearin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, path defaults to$if not provided. Non-existing paths are ignored.- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonDel
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.DEL. Summary: Deletes a value. Group: json- Specified by:
jsonDelin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, path defaults to$if not provided. Non-existing paths are ignored.- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonMget
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.MGET. Summary: Returns the values at path from multiple key arguments. Returnsnullfor nonexistent keys and nonexistent paths. Group: json- Specified by:
jsonMgetin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
path- path the pathkeys- the keys, must not benull, must not containnull- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonNumincrby
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.NUMINCRBY. Summary: Increments the number value stored at path by number. Group: json- Specified by:
jsonNumincrbyin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, path defaults to$if not provided. Non-existing paths are ignored.value- the value to add- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonObjKeys
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.OBJKEYS. Summary: Returns the keys in the object that's referenced by path. Group: json- Specified by:
jsonObjKeysin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, path defaults to$if not provided.- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonObjLen
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.OBJLEN. Summary: Reports the number of keys in the JSON Object at path in key. Group: json- Specified by:
jsonObjLenin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, path defaults to$if not provided.- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonStrAppend
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.STRAPPEND. Summary: Appends the json-string values to the string at path. Group: json- Specified by:
jsonStrAppendin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, path defaults to$if not provided.value- the string to append, must not benull- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonStrLen
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.STRLEN. Summary: Reports the length of the JSON String at path in key. Group: json- Specified by:
jsonStrLenin interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, path defaults to$if not provided.- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonToggle
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.TOGGLE. Summary: Toggle a boolean value stored at path. Group: json- Specified by:
jsonTogglein interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, must not benull- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
jsonType
Description copied from interface:ReactiveTransactionalJsonCommandsExecute the command JSON.TYPE. Summary: Reports the type of JSON value at path. Group: json- Specified by:
jsonTypein interfaceReactiveTransactionalJsonCommands<K>- Parameters:
key- the key, must not benullpath- path the path, path defaults to$if not provided.- Returns:
- A
Uniemittingnullwhen the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-