Search in sources :

Example 1 with AliasedDiscoveryConfig

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);
    }
}
Also used : AliasedDiscoveryConfig(com.hazelcast.config.AliasedDiscoveryConfig) NamedNodeMap(org.w3c.dom.NamedNodeMap) Node(org.w3c.dom.Node)

Example 2 with AliasedDiscoveryConfig

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);
}
Also used : AliasedDiscoveryConfig(com.hazelcast.config.AliasedDiscoveryConfig)

Example 3 with AliasedDiscoveryConfig

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);
}
Also used : AliasedDiscoveryConfig(com.hazelcast.config.AliasedDiscoveryConfig)

Example 4 with AliasedDiscoveryConfig

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));
}
Also used : AliasedDiscoveryConfig(com.hazelcast.config.AliasedDiscoveryConfig) GcpConfig(com.hazelcast.config.GcpConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 5 with AliasedDiscoveryConfig

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));
}
Also used : AliasedDiscoveryConfig(com.hazelcast.config.AliasedDiscoveryConfig)

Aggregations

AliasedDiscoveryConfig (com.hazelcast.config.AliasedDiscoveryConfig)5 GcpConfig (com.hazelcast.config.GcpConfig)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1 NamedNodeMap (org.w3c.dom.NamedNodeMap)1 Node (org.w3c.dom.Node)1