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 boolean
equals(@Nullable Object o)
Compare theClusterNodeAddress
against another object.@NotNull String
getHost()
int
getPort()
int
hashCode()
@NotNull String
toString()
-
-
-
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 theClusterNodeAddress
against another object.- Overrides:
equals
in classObject
- Parameters:
o
- The other object.- Returns:
true
if the object is also aClusterNodeAddress
with the same host and port value.- Since:
- 4.0.0, CE 2019.1
-
-