public class DruidNode extends Object
Constructor and Description |
---|
DruidNode(String serviceName,
String host,
Integer plaintextPort,
Integer tlsPort,
boolean enablePlaintextPort,
boolean enableTlsPort) |
DruidNode(String serviceName,
String host,
Integer plaintextPort,
Integer port,
Integer tlsPort,
Boolean enablePlaintextPort,
boolean enableTlsPort)
host = null , port = null -> host = _default_, port = -1
host = "abc:123", port = null -> host = abc, port = 123
host = "abc:fff", port = null -> throw IAE (invalid ipv6 host)
host = "2001:db8:85a3::8a2e:370:7334", port = null -> host = 2001:db8:85a3::8a2e:370:7334, port = _auto_
host = "[2001:db8:85a3::8a2e:370:7334]", port = null -> host = 2001:db8:85a3::8a2e:370:7334, port = _auto_
host = "abc" , port = null -> host = abc, port = _auto_
host = "abc" , port = 123 -> host = abc, port = 123
host = "abc:123 , port = 123 -> host = abc, port = 123
host = "abc:123 , port = 456 -> throw IAE (conflicting port)
host = "abc:fff , port = 456 -> throw IAE (invalid ipv6 host)
host = "[2001:db8:85a3::8a2e:370:7334]:123", port = null -> host = 2001:db8:85a3::8a2e:370:7334, port = 123
host = "[2001:db8:85a3::8a2e:370:7334]", port = 123 -> host = 2001:db8:85a3::8a2e:370:7334, port = 123
host = "2001:db8:85a3::8a2e:370:7334", port = 123 -> host = 2001:db8:85a3::8a2e:370:7334, port = 123
host = null , port = 123 -> host = _default_, port = 123
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static String |
getDefaultHost() |
String |
getHost() |
String |
getHostAndPort()
Returns host and port together as something that can be used as part of a URI.
|
String |
getHostAndPortToUse() |
String |
getHostAndTlsPort() |
int |
getPlaintextPort() |
int |
getPortToUse() |
String |
getServiceName() |
String |
getServiceScheme() |
int |
getTlsPort() |
int |
hashCode() |
boolean |
isEnablePlaintextPort() |
boolean |
isEnableTlsPort() |
String |
toString() |
DruidNode |
withService(String service) |
public DruidNode(String serviceName, String host, Integer plaintextPort, Integer tlsPort, boolean enablePlaintextPort, boolean enableTlsPort)
public DruidNode(String serviceName, String host, Integer plaintextPort, Integer port, Integer tlsPort, Boolean enablePlaintextPort, boolean enableTlsPort)
public String getServiceName()
public String getHost()
public int getPlaintextPort()
public boolean isEnablePlaintextPort()
public boolean isEnableTlsPort()
public int getTlsPort()
public String getServiceScheme()
public String getHostAndPort()
public String getHostAndTlsPort()
public int getPortToUse()
public String getHostAndPortToUse()
public static String getDefaultHost()
Copyright © 2011–2018. All rights reserved.