io.quarkus.redis.runtime.datasource.AbstractHyperLogLogCommands 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 static io.quarkus.redis.runtime.datasource.Validation.notNullOrEmpty;
import static io.smallrye.mutiny.helpers.ParameterValidation.doesNotContainNull;
import static io.smallrye.mutiny.helpers.ParameterValidation.nonNull;
import java.lang.reflect.Type;
import io.smallrye.mutiny.Uni;
import io.vertx.mutiny.redis.client.Command;
import io.vertx.mutiny.redis.client.Response;
class AbstractHyperLogLogCommands extends AbstractRedisCommands {
AbstractHyperLogLogCommands(RedisCommandExecutor api, Type k, Type v) {
super(api, new Marshaller(k, v));
}
Uni _pfadd(K key, V... values) {
nonNull(key, "key");
notNullOrEmpty(values, "values");
doesNotContainNull(values, "values");
RedisCommand cmd = RedisCommand.of(Command.PFADD)
.put(marshaller.encode(key))
.putAll(marshaller.encode(values));
return execute(cmd);
}
Uni _pfmerge(K destination, K... sources) {
nonNull(destination, "destination");
notNullOrEmpty(sources, "sources");
doesNotContainNull(sources, "sources");
RedisCommand cmd = RedisCommand.of(Command.PFMERGE)
.put(marshaller.encode(destination))
.putAll(marshaller.encode(sources));
return execute(cmd);
}
Uni _pfcount(K... keys) {
notNullOrEmpty(keys, "keys");
doesNotContainNull(keys, "keys");
return execute(RedisCommand.of(Command.PFCOUNT).put(marshaller.encode(keys)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy