Package io.airlift.node
Class NodeInfo
java.lang.Object
io.airlift.node.NodeInfo
-
Constructor Summary
ConstructorsConstructorDescriptionNodeInfo(NodeConfig config) NodeInfo(String environment, String pool, String nodeId, String internalAddress, InetAddress bindIp, String externalAddress, String location, String binarySpec, String configSpec, NodeConfig.AddressSource internalAddressSource) -
Method Summary
Modifier and TypeMethodDescriptionBinary this JavaVM is running.The IP address the server should use when binding a server socket.Configuration this JavaVM is running.The environment in which this server is running.The address to use when contacting this server from an external network.The unique id of this JavaVM instance.The internal network address the server should use when announcing its location to other machines.Location of this JavaVM.The unique id of the deployment slot in which this binary is running.getPool()The pool of which this server is a member.longThe time this server was started.toString()
-
Constructor Details
-
NodeInfo
-
NodeInfo
-
NodeInfo
public NodeInfo(String environment, String pool, String nodeId, String internalAddress, InetAddress bindIp, String externalAddress, String location, String binarySpec, String configSpec, NodeConfig.AddressSource internalAddressSource)
-
-
Method Details
-
getEnvironment
The environment in which this server is running. -
getPool
The pool of which this server is a member. -
getNodeId
The unique id of the deployment slot in which this binary is running. This id should represents the physical deployment location and should not change. -
getLocation
Location of this JavaVM. -
getBinarySpec
Binary this JavaVM is running. -
getConfigSpec
Configuration this JavaVM is running. -
getInstanceId
The unique id of this JavaVM instance. This id will change every time the vm is restarted. -
getInternalAddress
The internal network address the server should use when announcing its location to other machines. This address should available to all machines within the environment, but may not be globally routable. If this is not set, the following algorithm is used to choose the public address:- InetAddress.getLocalHost() if good IPv4
- First good IPv4 address of an up network interface
- First good IPv6 address of an up network interface
- InetAddress.getLocalHost()
-
getExternalAddress
The address to use when contacting this server from an external network. If possible, ip address should be globally routable. The address is returned as a string because the name may not be resolvable from the local machine.If this is not set, the internal address is used.
-
getBindIp
The IP address the server should use when binding a server socket.If this is not set, this will be the IPv4 any local address (e.g., 0.0.0.0).
-
getStartTime
public long getStartTime()The time this server was started. -
toString
-