/**
- * Copyright 2016 ZTE Corporation.
+ * Copyright 2016 ZTE, Inc. and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.openo.msb.api;
+package org.onap.msb.apiroute.api;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
-import java.util.Date;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import java.util.Objects;
public class Node implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(required = true)
private String port;
+ private String status="passing"; //实例健康检查状态
+
private int ttl=-1;
+ public String getStatus() {
+ return status;
+ }
-
+ public void setStatus(String status) {
+ this.status = status;
+ }
public String getIp() {
return ip;
this.ttl = ttl;
}
-
+ public Node(String ip,String port){
+ this.ip = ip;
+ this.port = port;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ Node node = (Node) o;
+ return Objects.equals(ttl, node.ttl) &&
+ Objects.equals(ip, node.ip) &&
+ Objects.equals(port, node.port) &&
+ Objects.equals(status, node.status);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(ip, port, status, ttl);
+ }
}