io.vertx.redis.RedisOptionsConverter Maven / Gradle / Ivy
package io.vertx.redis;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
/**
* Converter for {@link io.vertx.redis.RedisOptions}.
* NOTE: This class has been automatically generated from the {@link io.vertx.redis.RedisOptions} original class using Vert.x codegen.
*/
public class RedisOptionsConverter {
public static void fromJson(Iterable> json, RedisOptions obj) {
for (java.util.Map.Entry member : json) {
switch (member.getKey()) {
case "address":
if (member.getValue() instanceof String) {
obj.setAddress((String)member.getValue());
}
break;
case "auth":
if (member.getValue() instanceof String) {
obj.setAuth((String)member.getValue());
}
break;
case "binary":
if (member.getValue() instanceof Boolean) {
obj.setBinary((Boolean)member.getValue());
}
break;
case "domainSocket":
if (member.getValue() instanceof Boolean) {
obj.setDomainSocket((Boolean)member.getValue());
}
break;
case "domainSocketAddress":
if (member.getValue() instanceof String) {
obj.setDomainSocketAddress((String)member.getValue());
}
break;
case "encoding":
if (member.getValue() instanceof String) {
obj.setEncoding((String)member.getValue());
}
break;
case "host":
if (member.getValue() instanceof String) {
obj.setHost((String)member.getValue());
}
break;
case "masterName":
if (member.getValue() instanceof String) {
obj.setMasterName((String)member.getValue());
}
break;
case "port":
if (member.getValue() instanceof Number) {
obj.setPort(((Number)member.getValue()).intValue());
}
break;
case "select":
if (member.getValue() instanceof Number) {
obj.setSelect(((Number)member.getValue()).intValue());
}
break;
case "sentinels":
if (member.getValue() instanceof JsonArray) {
java.util.ArrayList list = new java.util.ArrayList<>();
((Iterable
© 2015 - 2025 Weber Informatics LLC | Privacy Policy