All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.redis.runtime.datasource.BlockingHyperLogLogCommandsImpl Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
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