Mercurial > hg > Database > Christie
view src/main/java/christie/topology/HostMessage.java @ 64:f884c1bd0d36
fix IncomingHosts and RecordTopology. and refactor.
author | akahori |
---|---|
date | Thu, 30 Aug 2018 10:55:37 +0900 |
parents | 8dfd93810041 |
children | 7abfe041b75c |
line wrap: on
line source
package christie.topology; import org.msgpack.annotation.Message; @Message public class HostMessage { public String hostName; public int port; public String connectionName; public String nodeName; // this is nodeName which have these IP and port. public String reverseName; public String remoteNodeName; public String cookie; // MD5 public boolean alive; public HostMessage() { } public HostMessage(String name, int port) { this.hostName = name; this.port = port; } public HostMessage(String name, int port, String connectionName, String reverseName) { this.hostName = name; this.port = port; this.connectionName = connectionName; this.reverseName = reverseName; } public boolean isAlive() { return alive; } public String toString() { return "HostMessage : name = " + hostName + ", port = " + Integer.toString(port) + " connectionName = " + connectionName + " absName = " + nodeName + "reverseName = " + reverseName + " remoteAbsName = " + remoteNodeName + " cokkie = " + cookie ; } }