io.quarkus.redis.runtime.datasource.BlockingCountMinCommandsImpl 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 java.util.List;
import java.util.Map;
import io.quarkus.redis.datasource.RedisDataSource;
import io.quarkus.redis.datasource.countmin.CountMinCommands;
import io.quarkus.redis.datasource.countmin.ReactiveCountMinCommands;
public class BlockingCountMinCommandsImpl extends AbstractRedisCommandGroup implements CountMinCommands {
private final ReactiveCountMinCommands reactive;
public BlockingCountMinCommandsImpl(RedisDataSource ds, ReactiveCountMinCommands reactive, Duration timeout) {
super(ds, timeout);
this.reactive = reactive;
}
@Override
public long cmsIncrBy(K key, V value, long increment) {
return reactive.cmsIncrBy(key, value, increment).await().atMost(timeout);
}
@Override
public Map cmsIncrBy(K key, Map couples) {
return reactive.cmsIncrBy(key, couples).await().atMost(timeout);
}
@Override
public void cmsInitByDim(K key, long width, long depth) {
reactive.cmsInitByDim(key, width, depth).await().atMost(timeout);
}
@Override
public void cmsInitByProb(K key, double error, double probability) {
reactive.cmsInitByProb(key, error, probability).await().atMost(timeout);
}
@Override
public long cmsQuery(K key, V item) {
return reactive.cmsQuery(key, item).await().atMost(timeout);
}
@Override
public List cmsQuery(K key, V... items) {
return reactive.cmsQuery(key, items).await().atMost(timeout);
}
@Override
public void cmsMerge(K dest, List src, List weight) {
reactive.cmsMerge(dest, src, weight).await().atMost(timeout);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy