io.quarkus.redis.runtime.datasource.BlockingAutoSuggestCommandsImpl 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 io.quarkus.redis.datasource.RedisDataSource;
import io.quarkus.redis.datasource.autosuggest.AutoSuggestCommands;
import io.quarkus.redis.datasource.autosuggest.GetArgs;
import io.quarkus.redis.datasource.autosuggest.ReactiveAutoSuggestCommands;
import io.quarkus.redis.datasource.autosuggest.Suggestion;
public class BlockingAutoSuggestCommandsImpl extends AbstractRedisCommandGroup implements AutoSuggestCommands {
private final ReactiveAutoSuggestCommands reactive;
public BlockingAutoSuggestCommandsImpl(RedisDataSource ds, ReactiveAutoSuggestCommands reactive, Duration timeout) {
super(ds, timeout);
this.reactive = reactive;
}
@Override
public long ftSugAdd(K key, String string, double score, boolean increment) {
return reactive.ftSugAdd(key, string, score, increment).await().atMost(timeout);
}
@Override
public boolean ftSugDel(K key, String string) {
return reactive.ftSugDel(key, string).await().atMost(timeout);
}
@Override
public List ftSugGet(K key, String prefix) {
return reactive.ftSugGet(key, prefix).await().atMost(timeout);
}
@Override
public List ftSugGet(K key, String prefix, GetArgs args) {
return reactive.ftSugGet(key, prefix, args).await().atMost(timeout);
}
@Override
public long ftSugLen(K key) {
return reactive.ftSugLen(key).await().atMost(timeout);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy