public class DruidNode extends Object
Constructor and Description |
---|
DruidNode(String serviceName,
String host,
Integer port)
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 |
---|---|
static String |
getDefaultHost() |
String |
getHost() |
String |
getHostAndPort()
Returns host and port together as something that can be used as part of a URI.
|
int |
getPort() |
String |
getServiceName() |
String |
toString() |
public DruidNode(String serviceName, String host, Integer port)
Copyright © 2011–2015. All rights reserved.