Package org.apache.nifi.cluster.protocol
Class NodeIdentifier
java.lang.Object
org.apache.nifi.cluster.protocol.NodeIdentifier
A node identifier denoting the coordinates of a flow controller that is
connected to a cluster. Nodes provide an external public API interface and an
internal private interface for communicating with the cluster.
The external API interface and internal protocol each require an IP or
hostname as well as a port for communicating.
This class overrides hashCode and equals and considers two instances to be
equal if they have the equal IDs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
the IP or hostname to use for sending requests to the node's external interfaceprivate final int
the port to use use for sending requests to the node's external interface, this can be HTTP API port or HTTPS API port depending on whether //TODO: .private final String
the unique identifier for the nodeprivate final String
The IP or hostname to use for sending FlowFiles when load balancing a connectionprivate final int
the port to use for sending FlowFiles when load balancing a connectionprivate final String
the IP or hostname that external clients should use to communicate with this node via Site-to-Siteprivate final Integer
the port that external clients should use to communicate with this node via Site-to-Site HTTP protocol, this can be HTTP API port or HTTPS API port depending on whether siteToSiteSecure or not.private final Integer
the port that external clients should use to communicate with this node via Site-to-Site RAW Socket protocolprivate final Boolean
whether or not site-to-site communications with this node are secureprivate final String
the IP or hostname to use for sending requests to the node's internal interfaceprivate final int
the port to use for sending requests to the node's internal interface -
Constructor Summary
ConstructorsConstructorDescriptionThis constructor should not be used and exists solely for the use of JAXBNodeIdentifier
(String id, String apiAddress, int apiPort, String socketAddress, int socketPort, String loadBalanceAddress, int loadBalancePort, String siteToSiteAddress, Integer siteToSitePort, Integer siteToSiteHttpApiPort, boolean siteToSiteSecure) NodeIdentifier
(String id, String apiAddress, int apiPort, String socketAddress, int socketPort, String loadBalanceAddress, int loadBalancePort, String siteToSiteAddress, Integer siteToSitePort, Integer siteToSiteHttpApiPort, boolean siteToSiteSecure, Set<String> nodeIdentities) NodeIdentifier
(String id, String apiAddress, int apiPort, String socketAddress, int socketPort, String siteToSiteAddress, Integer siteToSitePort, Integer siteToSiteHttpApiPort, boolean siteToSiteSecure) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the id of two node identifiers for equality.int
getId()
int
int
int
hashCode()
boolean
boolean
logicallyEquals
(NodeIdentifier other) Compares API address/port and socket address/port for equality.toString()
private void
validatePort
(int port)
-
Field Details
-
id
the unique identifier for the node -
apiAddress
the IP or hostname to use for sending requests to the node's external interface -
apiPort
private final int apiPortthe port to use use for sending requests to the node's external interface, this can be HTTP API port or HTTPS API port depending on whether //TODO: . -
socketAddress
the IP or hostname to use for sending requests to the node's internal interface -
socketPort
private final int socketPortthe port to use for sending requests to the node's internal interface -
loadBalanceAddress
The IP or hostname to use for sending FlowFiles when load balancing a connection -
loadBalancePort
private final int loadBalancePortthe port to use for sending FlowFiles when load balancing a connection -
siteToSiteAddress
the IP or hostname that external clients should use to communicate with this node via Site-to-Site -
siteToSitePort
the port that external clients should use to communicate with this node via Site-to-Site RAW Socket protocol -
siteToSiteHttpApiPort
the port that external clients should use to communicate with this node via Site-to-Site HTTP protocol, this can be HTTP API port or HTTPS API port depending on whether siteToSiteSecure or not. -
siteToSiteSecure
whether or not site-to-site communications with this node are secure -
nodeIdentities
-
-
Constructor Details
-
NodeIdentifier
-
NodeIdentifier
-
NodeIdentifier
-
NodeIdentifier
public NodeIdentifier()This constructor should not be used and exists solely for the use of JAXB
-
-
Method Details
-
getId
-
getNodeIdentities
-
getApiAddress
-
getApiPort
public int getApiPort() -
getSocketAddress
-
getSocketPort
public int getSocketPort() -
getLoadBalanceAddress
-
getLoadBalancePort
public int getLoadBalancePort() -
validatePort
private void validatePort(int port) -
getSiteToSiteAddress
-
getSiteToSitePort
-
getSiteToSiteHttpApiPort
-
isSiteToSiteSecure
public boolean isSiteToSiteSecure() -
equals
Compares the id of two node identifiers for equality. -
logicallyEquals
Compares API address/port and socket address/port for equality. The id is not used for comparison.- Parameters:
other
- a node identifier- Returns:
- true if API address/port and socket address/port are equal; false otherwise
-
hashCode
public int hashCode() -
toString
-
getFullDescription
-