package io.vertx.core.eventbus.impl.clustered;
import io.vertx.core.net.impl.ServerID;
import java.io.Serializable;
public class ClusterNodeInfo implements Serializable {
private static final long serialVersionUID = 1L;
public String nodeId;
public ServerID serverID;
public ClusterNodeInfo() {
}
public ClusterNodeInfo(String nodeId, ServerID serverID) {
this.nodeId = nodeId;
this.serverID = serverID;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ClusterNodeInfo that = (ClusterNodeInfo) o;
if (nodeId != null ? !nodeId.equals(that.nodeId) : that.nodeId != null) return false;
return serverID != null ? serverID.equals(that.serverID) : that.serverID == null;
}
@Override
public int hashCode() {
int result = nodeId != null ? nodeId.hashCode() : 0;
result = 31 * result + (serverID != null ? serverID.hashCode() : 0);
return result;
}
@Override
public String toString() {
return nodeId + ":" + serverID.toString();
}
}