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 TypeMethodDescriptionboolean
static NetworkAddress
Parses aNetworkAddress
from a string in the "host:port" format.static NetworkAddress
from
(InetSocketAddress addr) Creates aNetworkAddress
from aInetSocketAddress
.int
hashCode()
host()
Returns the host name.int
port()
Returns the network port.toString()
-
Constructor Details
-
NetworkAddress
Constructor.- Parameters:
host
- Host.port
- Port.
-
-
Method Details
-
from
Parses aNetworkAddress
from 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 aNetworkAddress
from 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
-