java.lang.Comparable
public class ServerInfo
extends java.lang.Object
implements java.lang.Comparable
Constructor | Description |
---|---|
ServerInfo() |
Initializes new instance of ServerInfo.
|
ServerInfo(java.lang.String name) |
Initializes a new instance of ServerInfo.
|
ServerInfo(java.lang.String name,
int port) |
Initializes a new instance of ServerInfo.
|
ServerInfo​(java.lang.String name,
int port, boolean isloadbalancer) |
Initializes a new instance of ServerInfo.
|
ServerInfo(java.net.InetAddress ip) |
Initializes new instance of ServerInfo.
|
ServerInfo​(java.net.InetAddress ip,
int port, boolean isloadbalancer) |
Initializes new instance of ServerInfo.
|
ServerInfo(java.net.InetAddress ip,
int port) |
Initializes new instance of ServerInfo.
|
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(java.lang.Object obj) |
Compares the ServerInfo on the basis of priority.
|
boolean |
equals(java.lang.Object obj) |
Compares two ServerInfo instances.
|
java.net.InetAddress |
getIP() |
Gets the IP Address of the server node where cache is running.
|
java.lang.String |
getName() |
Gets the name of the server node where cache is running.
|
int |
getPort() |
Gets the port for client to connect to the server node.
|
void |
setIP(java.lang.String value) |
Sets the IPAddress of the server node where cache is running.
|
void |
setIP(java.net.InetAddress value) |
Sets the IP Address of the server node where cache is running.
|
void |
setName(java.lang.String value) |
Gets the name of the server node where cache is running.
|
void |
setPort(int value) |
Sets the port for client to connect to the server node.
|
java.lang.String |
toString() |
Converts the value of this instance to its equivalent string representation.
|
public ServerInfo(java.lang.String name)
name
- Specifies name of the server node where cache is running.public ServerInfo(java.lang.String name, int port)
name
- Specifies name of the server node where cache is running.port
- Specifies port for client to connect to the server node.public ServerInfo​(java.lang.String name, int port, boolean isloadbalancer)
name
- Specifies name of the server node where cache is running.port
- Specifies port for client to connect to the server node.isloadbalancer
- Specifies whether the server is a load balancer.public ServerInfo(java.net.InetAddress ip)
ip
- Specifies InetAddress
of the server node where cache is running.public ServerInfo(java.net.InetAddress ip, int port)
ip
- Specifies InetAddress
of the server node where cache is running.port
- Specifies port for client to connect to the server node.public ServerInfo​(java.net.InetAddress ip, int port, boolen isloadbalancer)
ip
- Specifies InetAddress
of the server node where cache is running.port
- Specifies port for client to connect to the server node.isloadbalancer
- Specifies whether the server is a load balancer.public ServerInfo()
public final int getPort()
public final void setPort(int value)
value
- The port for client to connect to the server node.public void setIsLoadBalancer​(boolean value)
value
- True if the machine is a load balancer.public void getIsLoadBalancer​(boolean value)
value
- True if the machine is a load balancer.public final java.lang.String getName()
public final void setName(java.lang.String value)
value
- The name of the server node where cache is running.public final java.net.InetAddress getIP()
public final void setIP(java.net.InetAddress value)
value
- The IP Address of the server node where cache is running.public final void setIP(java.lang.String value)
value
- The IPAddress of the server node where cache is running in form of a string.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The server info object to compare.public java.lang.String toString()
toString
in class java.lang.Object
public final int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- The server info object to compare.