@Test public void testSerialize() throws Exception { String actual = JacksonUtils.toJson(cluster); System.out.println(actual); assertTrue(actual.contains("\"defaultPort\":80")); assertTrue(actual.contains("\"defIPPort\":8080")); assertTrue(actual.contains("\"healthChecker\":{\"type\":\"TCP\"}")); assertTrue(actual.contains("\"metadata\":{}")); assertTrue(actual.contains("\"defCkport\":80")); assertTrue(actual.contains("\"name\":\"nacos-cluster-1\"")); assertTrue(actual.contains("\"defaultCheckPort\":80")); assertTrue(actual.contains("\"serviceName\":\"nacos.service.1\"")); assertTrue(actual.contains("\"useIPPort4Check\":true")); assertTrue(actual.contains("\"sitegroup\":\"\"")); assertTrue(actual.contains("\"empty\":true")); assertFalse(actual.contains("\"service\"")); }
public boolean contains(Instance ip) { return persistentInstances.contains(ip) || ephemeralInstances.contains(ip); }
Cluster extends com.alibaba.nacos.api.naming.pojo.Cluster implements Cloneable { public boolean contains(Instance ip) { return persistentInstances.contains(ip) || ephemeralInstances.contains(ip); } }
Cluster extends com.alibaba.nacos.api.naming.pojo.Cluster implements Cloneable { public boolean contains(Instance ip) { return persistentInstances.contains(ip) || ephemeralInstances.contains(ip); } Cluster();  Cluster(String clusterName, Service service); }
Cluster extends com.alibaba.nacos.api.naming.pojo.Cluster implements Cloneable { public boolean contains(Instance ip) { return persistentInstances.contains(ip) || ephemeralInstances.contains(ip); } Cluster();  Cluster(String clusterName, Service service); @SuppressWarnings("checkstyle:abbreviationaswordinname") int getDefIPPort(); @SuppressWarnings("checkstyle:abbreviationaswordinname") void setDefIPPort(int defIpPort); List<Instance> allIPs(); List<Instance> allIPs(boolean ephemeral); void init(); void destroy(); @JsonIgnore HealthCheckTask getHealthCheckTask(); Service getService(); void setService(Service service); @Deprecated @Override void setServiceName(String serviceName); @Override String getServiceName(); @Override Cluster clone(); boolean isEmpty(); void updateIps(List<Instance> ips, boolean ephemeral); @Override int hashCode(); @Override boolean equals(Object obj); int getDefCkport(); void setDefCkport(int defCkport); void update(Cluster cluster); String getSitegroup(); void setSitegroup(String sitegroup); boolean contains(Instance ip); void validate(); }
Cluster extends com.alibaba.nacos.api.naming.pojo.Cluster implements Cloneable { public boolean contains(Instance ip) { return persistentInstances.contains(ip) || ephemeralInstances.contains(ip); } Cluster();  Cluster(String clusterName, Service service); @SuppressWarnings("checkstyle:abbreviationaswordinname") int getDefIPPort(); @SuppressWarnings("checkstyle:abbreviationaswordinname") void setDefIPPort(int defIpPort); List<Instance> allIPs(); List<Instance> allIPs(boolean ephemeral); void init(); void destroy(); @JsonIgnore HealthCheckTask getHealthCheckTask(); Service getService(); void setService(Service service); @Deprecated @Override void setServiceName(String serviceName); @Override String getServiceName(); @Override Cluster clone(); boolean isEmpty(); void updateIps(List<Instance> ips, boolean ephemeral); @Override int hashCode(); @Override boolean equals(Object obj); int getDefCkport(); void setDefCkport(int defCkport); void update(Cluster cluster); String getSitegroup(); void setSitegroup(String sitegroup); boolean contains(Instance ip); void validate();  }