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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable Object o)Compare theClusterNodeAddressagainst another object.@NotNull StringgetHost()intgetPort()inthashCode()@NotNull StringtoString()
-
-
-
Constructor Detail
-
ClusterNodeAddress
public ClusterNodeAddress(@NotNull String host, int port)
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 Detail
-
getPort
public int getPort()
- Returns:
- The port number.
- Since:
- 4.0.0, CE 2019.1
-
equals
public boolean equals(@Nullable Object o)
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
-
-