io.quarkus.redis.runtime.datasource.ReactiveHyperLogLogCommandsImpl 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 io.quarkus.redis.datasource.ReactiveRedisDataSource;
import io.quarkus.redis.datasource.hyperloglog.ReactiveHyperLogLogCommands;
import io.smallrye.mutiny.Uni;
import io.vertx.mutiny.redis.client.Response;
public class ReactiveHyperLogLogCommandsImpl extends AbstractHyperLogLogCommands
implements ReactiveHyperLogLogCommands {
private final ReactiveRedisDataSource reactive;
public ReactiveHyperLogLogCommandsImpl(ReactiveRedisDataSourceImpl redis, Type k, Type v) {
super(redis, k, v);
this.reactive = redis;
}
@Override
public ReactiveRedisDataSource getDataSource() {
return reactive;
}
@SafeVarargs
@Override
public final Uni pfadd(K key, V... values) {
return super._pfadd(key, values)
.map(Response::toBoolean);
}
@SafeVarargs
@Override
public final Uni pfmerge(K destination, K... sources) {
return super._pfmerge(destination, sources)
.replaceWithVoid();
}
@SafeVarargs
@Override
public final Uni pfcount(K... keys) {
return super._pfcount(keys)
.map(Response::toLong);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy