io.quarkus.redis.runtime.datasource.ReactiveTransactionalHyperLogLogCommandsImpl 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 io.quarkus.redis.datasource.hyperloglog.ReactiveTransactionalHyperLogLogCommands;
import io.quarkus.redis.datasource.transactions.ReactiveTransactionalRedisDataSource;
import io.smallrye.mutiny.Uni;
import io.vertx.mutiny.redis.client.Response;
public class ReactiveTransactionalHyperLogLogCommandsImpl extends AbstractTransactionalCommands
implements ReactiveTransactionalHyperLogLogCommands {
private final ReactiveHyperLogLogCommandsImpl reactive;
public ReactiveTransactionalHyperLogLogCommandsImpl(ReactiveTransactionalRedisDataSource ds,
ReactiveHyperLogLogCommandsImpl reactive, TransactionHolder tx) {
super(ds, tx);
this.reactive = reactive;
}
@Override
public Uni pfadd(K key, V... values) {
this.tx.enqueue(Response::toBoolean);
return this.reactive._pfadd(key, values).invoke(this::queuedOrDiscard).replaceWithVoid();
}
@Override
public Uni pfmerge(K destkey, K... sourcekeys) {
this.tx.enqueue(resp -> null);
return this.reactive._pfmerge(destkey, sourcekeys).invoke(this::queuedOrDiscard).replaceWithVoid();
}
@Override
public Uni pfcount(K... keys) {
this.tx.enqueue(Response::toLong);
return this.reactive._pfcount(keys).invoke(this::queuedOrDiscard).replaceWithVoid();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy