Package org.apache.ignite.network
Class NetworkAddress
java.lang.Object
org.apache.ignite.network.NetworkAddress
Representation of a network address that includes a host name and a port.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic NetworkAddressParses aNetworkAddressfrom a string in the "host:port" format.static NetworkAddressfrom(InetSocketAddress addr) Creates aNetworkAddressfrom aInetSocketAddress.inthashCode()host()Returns the host name.intport()Returns the network port.toString()
-
Constructor Details
-
NetworkAddress
Constructor.- Parameters:
host- Host.port- Port.
-
-
Method Details
-
from
Parses aNetworkAddressfrom a string in the "host:port" format.- Parameters:
addrStr- String in "host:port" format.- Returns:
- Parsed address.
- Throws:
IllegalArgumentException- If the provided string does not match the required format.
-
from
Creates aNetworkAddressfrom aInetSocketAddress.- Parameters:
addr- Address.- Returns:
- Created network address.
-
host
Returns the host name.- Returns:
- Host name.
-
port
public int port()Returns the network port.- Returns:
- Port.
-
equals
-
hashCode
public int hashCode() -
toString
-