Class ClusterNodeAddress
java.lang.Object
com.hivemq.extension.sdk.api.services.cluster.parameter.ClusterNodeAddress
public class ClusterNodeAddress extends Object
Represents a cluster node's address.
- Since:
- 4.0.0, CE 2019.1
-
Constructor Summary
Constructors Constructor Description ClusterNodeAddress(@NotNull String host, int port)Create the nodes address for the cluster. -
Method Summary
-
Constructor Details
-
ClusterNodeAddress
Create the nodes address for the cluster.- Parameters:
host- The hostname or IP address of the cluster node.port- The cluster bind-port of the cluster node.- Throws:
NullPointerException- If host is null.IllegalArgumentException- If port is not a valid port number (0-65535).- Since:
- 4.0.0, CE 2019.1
-
-
Method Details
-
getHost
- Returns:
- The host name.
- Since:
- 4.0.0, CE 2019.1
-
getPort
public int getPort()- Returns:
- The port number.
- Since:
- 4.0.0, CE 2019.1
-
equals
Compare theClusterNodeAddressagainst another object.- Overrides:
equalsin classObject- Parameters:
o- The other object.- Returns:
trueif the object is also aClusterNodeAddresswith the same host and port value.- Since:
- 4.0.0, CE 2019.1
-
hashCode
public int hashCode() -
toString
-