/** * Initializes the <code>Destination</code> with the properties. * If subclasses override, they must call <code>super.initialize()</code>. * * @param id The id of the destination. * @param properties Properties for the destination. */ public void initialize(String id, ConfigMap properties) { super.initialize(id, properties); if (properties == null || properties.size() == 0) return; ConfigMap network = properties.getPropertyAsMap(NetworkSettings.NETWORK_ELEMENT, null); if (network != null) { ConfigMap clusterInfo = network.getPropertyAsMap(ClusterSettings.CLUSTER_ELEMENT, null); if (clusterInfo != null) { // Mark these as used so we do not get warnings about them. network.allowProperty(ClusterSettings.CLUSTER_ELEMENT); clusterInfo.allowProperty(ClusterSettings.REF_ATTR); clusterInfo.allowProperty(ClusterSettings.SHARED_BACKEND_ATTR); String clusterId = clusterInfo.getPropertyAsString(ClusterSettings.REF_ATTR, null); String coordinatorPolicy = clusterInfo.getPropertyAsString(ClusterSettings.SHARED_BACKEND_ATTR, null); if (coordinatorPolicy != null) networkSettings.setSharedBackend(Boolean.valueOf(coordinatorPolicy).booleanValue()); networkSettings.setClusterId(clusterId); } } }
String coordinatorPolicy = clusterInfo.getPropertyAsString(ClusterSettings.SHARED_BACKEND_ATTR, null); if (coordinatorPolicy != null) networkSettings.setSharedBackend(Boolean.valueOf(coordinatorPolicy));
String coordinatorPolicy = clusterInfo.getPropertyAsString(ClusterSettings.SHARED_BACKEND_ATTR, null); if (coordinatorPolicy != null) networkSettings.setSharedBackend(Boolean.valueOf(coordinatorPolicy));