use of com.hazelcast.config.AliasedDiscoveryConfig in project hazelcast by hazelcast.
the class ClientDomConfigProcessor method handleAliasedDiscoveryStrategy.
private void handleAliasedDiscoveryStrategy(Node node, ClientNetworkConfig clientNetworkConfig, String tag) {
AliasedDiscoveryConfig config = ClientAliasedDiscoveryConfigUtils.getConfigByTag(clientNetworkConfig, tag);
NamedNodeMap atts = node.getAttributes();
for (int i = 0; i < atts.getLength(); i++) {
Node att = atts.item(i);
if (matches("enabled", lowerCaseInternal(att.getNodeName()))) {
config.setEnabled(getBooleanValue(getTextContent(att)));
} else if (matches(att.getNodeName(), "connection-timeout-seconds")) {
config.setProperty("connection-timeout-seconds", getTextContent(att));
}
}
for (Node n : childElements(node)) {
String key = n.getLocalName();
String value = getTextContent(n);
config.setProperty(key, value);
}
}
use of com.hazelcast.config.AliasedDiscoveryConfig in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handleAliasedDiscoveryStrategy.
private void handleAliasedDiscoveryStrategy(JoinConfig joinConfig, Node node, String tag) {
AliasedDiscoveryConfig aliasedDiscoveryConfig = getConfigByTag(joinConfig, tag);
updateConfig(aliasedDiscoveryConfig, node);
}
use of com.hazelcast.config.AliasedDiscoveryConfig in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handleAliasedDiscoveryStrategy.
private void handleAliasedDiscoveryStrategy(WanBatchPublisherConfig publisherConfig, Node node, String tag) {
AliasedDiscoveryConfig aliasedDiscoveryConfig = getConfigByTag(publisherConfig, tag);
updateConfig(aliasedDiscoveryConfig, node);
}
use of com.hazelcast.config.AliasedDiscoveryConfig in project hazelcast by hazelcast.
the class AliasedDiscoveryConfigDTOTest method testSerialization.
@Test
public void testSerialization() {
GcpConfig expected = new GcpConfig().setEnabled(true).setUsePublicIp(true).setProperty("key1", "value1").setProperty("key2", "value2");
AliasedDiscoveryConfig actual = cloneThroughJson(expected);
assertTrue("Expected: " + expected + ", got:" + actual, AliasedDiscoveryConfigsChecker.check(expected, actual));
}
use of com.hazelcast.config.AliasedDiscoveryConfig in project hazelcast by hazelcast.
the class AliasedDiscoveryConfigDTOTest method testDefault.
private static void testDefault(AliasedDiscoveryConfig expected) {
AliasedDiscoveryConfig actual = cloneThroughJson(expected);
assertTrue("Expected: " + expected + ", got:" + actual, AliasedDiscoveryConfigsChecker.check(expected, actual));
}
Aggregations