io.quarkus.redis.runtime.datasource.BlockingHyperLogLogCommandsImpl 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 io.quarkus.redis.datasource.RedisDataSource;
import io.quarkus.redis.datasource.hyperloglog.HyperLogLogCommands;
import io.quarkus.redis.datasource.hyperloglog.ReactiveHyperLogLogCommands;
public class BlockingHyperLogLogCommandsImpl extends AbstractRedisCommandGroup implements HyperLogLogCommands {
private final ReactiveHyperLogLogCommands reactive;
public BlockingHyperLogLogCommandsImpl(RedisDataSource ds, ReactiveHyperLogLogCommands reactive, Duration timeout) {
super(ds, timeout);
this.reactive = reactive;
}
@Override
public boolean pfadd(K key, V... values) {
return reactive.pfadd(key, values)
.await().atMost(timeout);
}
@Override
public void pfmerge(K destkey, K... sourcekeys) {
reactive.pfmerge(destkey, sourcekeys)
.await().atMost(timeout);
}
@Override
public long pfcount(K... keys) {
return reactive.pfcount(keys)
.await().atMost(timeout);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy