Package org.apache.ignite.internal.util
Class HostAndPortRange
- java.lang.Object
-
- org.apache.ignite.internal.util.HostAndPortRange
-
- All Implemented Interfaces:
Serializable
public class HostAndPortRange extends Object implements Serializable
Represents address along with port range.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HostAndPortRange(String host, int port)Constructor.HostAndPortRange(String host, int portFrom, int portTo)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()Stringhost()static HostAndPortRangeparse(String addrStr, int dfltPortFrom, int dfltPortTo, String errMsgPrefix)Parse string into host and port pair.intportFrom()intportTo()StringtoString()
-
-
-
Method Detail
-
parse
public static HostAndPortRange parse(String addrStr, int dfltPortFrom, int dfltPortTo, String errMsgPrefix) throws IgniteCheckedException
Parse string into host and port pair.- Parameters:
addrStr- String.dfltPortFrom- Default port from.dfltPortTo- Default port to.errMsgPrefix- Error message prefix.- Returns:
- Result.
- Throws:
IgniteCheckedException- If failed.
-
host
public String host()
- Returns:
- Host.
-
portFrom
public int portFrom()
- Returns:
- Port from.
-
portTo
public int portTo()
- Returns:
- Port to.
-
-