io.quarkus.redis.runtime.datasource.ReactiveCountMinCommandsImpl 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.lang.reflect.Type;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import io.quarkus.redis.datasource.ReactiveRedisCommands;
import io.quarkus.redis.datasource.ReactiveRedisDataSource;
import io.quarkus.redis.datasource.countmin.ReactiveCountMinCommands;
import io.smallrye.mutiny.Uni;
import io.vertx.mutiny.redis.client.Response;
public class ReactiveCountMinCommandsImpl extends AbstractCountMinCommands
implements ReactiveCountMinCommands, ReactiveRedisCommands {
private final ReactiveRedisDataSource reactive;
public ReactiveCountMinCommandsImpl(ReactiveRedisDataSourceImpl redis, Type k, Type v) {
super(redis, k, v);
this.reactive = redis;
}
@Override
public ReactiveRedisDataSource getDataSource() {
return reactive;
}
@Override
public Uni cmsIncrBy(K key, V value, long increment) {
return super._cmsIncrBy(key, value, increment)
.map(r -> r.get(0).toLong());
}
@Override
public Uni
© 2015 - 2025 Weber Informatics LLC | Privacy Policy