private String generateDiscoveryUriList() { String clusterPort = null; Property gmsPortProp = cluster.getProperty("GMS_LISTENER_PORT"); if (gmsPortProp == null || gmsPortProp.getValue() == null ||
props = cluster.getProperty(); for (Property prop : props) { String name = prop.getName().trim();
Property prop = cluster.getProperty("gms-bind-interface-address"); if (prop != null && prop.getValue() != null) { cluster.setGmsBindInterfaceAddress(prop.getValue()); List<Property> props = cluster.getProperty(); props.remove(prop); } else { gmsListenerPort.setName("GMS_LISTENER_PORT"); gmsListenerPort.setValue(String.format("${GMS_LISTENER_PORT-%s}", cluster.getName())); cluster.getProperty().add(gmsListenerPort); return cluster;
Property gmsListenerPort = instance.getProperty("GMS_LISTENER_PORT"); boolean needToAddGmsListenerPort = false; if (gmsListenerPort == null) { Property discoveryUriListProp = instance.getProperty("GMS_DISCOVERY_URI_LIST"); String discoveryUriList = discoveryUriListProp != null ? discoveryUriListProp.getValue() : null; if (discoveryUriList != null && DEFAULT_BROADCAST.equals(broadcastProtocol)) { instance.getProperty().add(gmsListenerPort); discoveryUriListProp.setName("GMS_DISCOVERY_URI_LIST"); discoveryUriListProp.setValue(GENERATE); instance.getProperty().add(discoveryUriListProp); instance.getProperty().add(gmsListenerPort); instance.getProperty().add(gmsListenerPort);
if (ourCluster.getProperty("GMS_DISCOVERY_URI_LIST") != null && "generate".equals( ourCluster.getProperty("GMS_DISCOVERY_URI_LIST").getValue())) {
gmsListenerPort.setName("GMS_LISTENER_PORT"); gmsListenerPort.setValue(String.format("${GMS_LISTENER_PORT-%s}", instanceName)); instance.getProperty().add(gmsListenerPort);