Package org.apache.druid.server
Class DruidNode
- java.lang.Object
-
- org.apache.druid.server.DruidNode
-
public class DruidNode extends Object
-
-
Constructor Summary
Constructors Constructor Description DruidNode(String serviceName, String host, boolean bindOnHost, Integer plaintextPort, Integer tlsPort, boolean enablePlaintextPort, boolean enableTlsPort)DruidNode(String serviceName, String host, boolean bindOnHost, 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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static StringgetDefaultHost()StringgetHost()StringgetHostAndPort()Returns host and port together as something that can be used as part of a URI.StringgetHostAndPortToUse()StringgetHostAndTlsPort()intgetPlaintextPort()intgetPortToUse()StringgetServiceName()StringgetServiceScheme()intgetTlsPort()URIgetUriToUse()inthashCode()booleanisBindOnHost()booleanisEnablePlaintextPort()booleanisEnableTlsPort()StringtoString()DruidNodewithService(String service)
-
-
-
Constructor Detail
-
DruidNode
public DruidNode(String serviceName, String host, boolean bindOnHost, Integer plaintextPort, Integer tlsPort, boolean enablePlaintextPort, boolean enableTlsPort)
-
DruidNode
public DruidNode(String serviceName, String host, boolean bindOnHost, 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
-
-
Method Detail
-
getServiceName
public String getServiceName()
-
getHost
public String getHost()
-
isBindOnHost
public boolean isBindOnHost()
-
getPlaintextPort
public int getPlaintextPort()
-
isEnablePlaintextPort
public boolean isEnablePlaintextPort()
-
isEnableTlsPort
public boolean isEnableTlsPort()
-
getTlsPort
public int getTlsPort()
-
getServiceScheme
public String getServiceScheme()
-
getHostAndPort
public String getHostAndPort()
Returns host and port together as something that can be used as part of a URI.
-
getHostAndTlsPort
public String getHostAndTlsPort()
-
getPortToUse
public int getPortToUse()
-
getHostAndPortToUse
public String getHostAndPortToUse()
-
getUriToUse
public URI getUriToUse()
-
getDefaultHost
public static String getDefaultHost()
-
-