io.quarkus.redis.runtime.datasource.BlockingJsonCommandsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-redis-client Show documentation
Show all versions of quarkus-redis-client Show documentation
Connect to Redis in either imperative or reactive style
package io.quarkus.redis.runtime.datasource;
import java.time.Duration;
import java.util.List;
import io.quarkus.redis.datasource.RedisDataSource;
import io.quarkus.redis.datasource.json.JsonCommands;
import io.quarkus.redis.datasource.json.JsonSetArgs;
import io.quarkus.redis.datasource.json.ReactiveJsonCommands;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
public class BlockingJsonCommandsImpl extends AbstractRedisCommandGroup implements JsonCommands {
private final ReactiveJsonCommands reactive;
public BlockingJsonCommandsImpl(RedisDataSource ds, ReactiveJsonCommands reactive, Duration timeout) {
super(ds, timeout);
this.reactive = reactive;
}
@Override
public void jsonSet(K key, String path, T value) {
reactive.jsonSet(key, path, value)
.await().atMost(timeout);
}
@Override
public void jsonSet(K key, String path, JsonObject json) {
reactive.jsonSet(key, path, json)
.await().atMost(timeout);
}
@Override
public void jsonSet(K key, String path, JsonObject json, JsonSetArgs args) {
reactive.jsonSet(key, path, json, args)
.await().atMost(timeout);
}
@Override
public void jsonSet(K key, String path, JsonArray json) {
reactive.jsonSet(key, path, json)
.await().atMost(timeout);
}
@Override
public void jsonSet(K key, String path, JsonArray json, JsonSetArgs args) {
reactive.jsonSet(key, path, json, args)
.await().atMost(timeout);
}
@Override
public void jsonSet(K key, String path, T value, JsonSetArgs args) {
reactive.jsonSet(key, path, value, args)
.await().atMost(timeout);
}
@Override
public T jsonGet(K key, Class clazz) {
return reactive.jsonGet(key, clazz)
.await().atMost(timeout);
}
@Override
public JsonObject jsonGetObject(K key) {
return reactive.jsonGetObject(key)
.await().atMost(timeout);
}
@Override
public JsonArray jsonGetArray(K key) {
return reactive.jsonGetArray(key)
.await().atMost(timeout);
}
@Override
public JsonArray jsonGet(K key, String path) {
return reactive.jsonGet(key, path)
.await().atMost(timeout);
}
@Override
public JsonObject jsonGet(K key, String... paths) {
return reactive.jsonGet(key, paths)
.await().atMost(timeout);
}
@Override
public List jsonArrAppend(K key, String path, T... values) {
return reactive.jsonArrAppend(key, path, values)
.await().atMost(timeout);
}
@Override
public List jsonArrIndex(K key, String path, T value, int start, int end) {
return reactive.jsonArrIndex(key, path, value, start, end)
.await().atMost(timeout);
}
@Override
public List jsonArrIndex(K key, String path, T value) {
return reactive.jsonArrIndex(key, path, value)
.await().atMost(timeout);
}
@Override
public List jsonArrInsert(K key, String path, int index, T... values) {
return reactive.jsonArrInsert(key, path, index, values)
.await().atMost(timeout);
}
@Override
public List jsonArrLen(K key, String path) {
return reactive.jsonArrLen(key, path)
.await().atMost(timeout);
}
@Override
public List jsonArrPop(K key, Class clazz, String path, int index) {
return reactive.jsonArrPop(key, clazz, path, index)
.await().atMost(timeout);
}
@Override
public List jsonArrTrim(K key, String path, int start, int stop) {
return reactive.jsonArrTrim(key, path, start, stop)
.await().atMost(timeout);
}
@Override
public int jsonClear(K key, String path) {
return reactive.jsonClear(key, path)
.await().atMost(timeout);
}
@Override
public int jsonDel(K key, String path) {
return reactive.jsonDel(key, path)
.await().atMost(timeout);
}
@Override
public List jsonMget(String path, K... keys) {
return reactive.jsonMget(path, keys)
.await().atMost(timeout);
}
@Override
public void jsonNumincrby(K key, String path, double value) {
reactive.jsonNumincrby(key, path, value)
.await().atMost(timeout);
}
@Override
public List> jsonObjKeys(K key, String path) {
return reactive.jsonObjKeys(key, path)
.await().atMost(timeout);
}
@Override
public List jsonObjLen(K key, String path) {
return reactive.jsonObjLen(key, path)
.await().atMost(timeout);
}
@Override
public List jsonStrAppend(K key, String path, String value) {
return reactive.jsonStrAppend(key, path, value)
.await().atMost(timeout);
}
@Override
public List jsonStrLen(K key, String path) {
return reactive.jsonStrLen(key, path)
.await().atMost(timeout);
}
@Override
public List jsonToggle(K key, String path) {
return reactive.jsonToggle(key, path)
.await().atMost(timeout);
}
@Override
public List jsonType(K key, String path) {
return reactive.jsonType(key, path)
.await().atMost(timeout);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy