Search in sources :

Example 1 with AutoDetectionConfig

use of com.hazelcast.config.AutoDetectionConfig in project hazelcast by hazelcast.

the class ClientDomConfigProcessor method handleAutoDetection.

protected void handleAutoDetection(Node node, ClientNetworkConfig clientNetworkConfig) {
    AutoDetectionConfig discoveryConfig = clientNetworkConfig.getAutoDetectionConfig();
    NamedNodeMap atts = node.getAttributes();
    for (int i = 0; i < atts.getLength(); i++) {
        Node att = atts.item(i);
        if (matches("enabled", lowerCaseInternal(att.getNodeName()))) {
            discoveryConfig.setEnabled(getBooleanValue(getTextContent(att)));
        }
    }
}
Also used : NamedNodeMap(org.w3c.dom.NamedNodeMap) Node(org.w3c.dom.Node) AutoDetectionConfig(com.hazelcast.config.AutoDetectionConfig)

Example 2 with AutoDetectionConfig

use of com.hazelcast.config.AutoDetectionConfig in project hazelcast by hazelcast.

the class MemberDomConfigProcessor method handleAutoDetection.

private void handleAutoDetection(Node node, boolean advancedNetworkConfig) {
    JoinConfig join = joinConfig(advancedNetworkConfig);
    AutoDetectionConfig autoDetectionConfig = join.getAutoDetectionConfig();
    NamedNodeMap attributes = node.getAttributes();
    for (int a = 0; a < attributes.getLength(); a++) {
        Node att = attributes.item(a);
        if (matches("enabled", lowerCaseInternal(att.getNodeName()))) {
            autoDetectionConfig.setEnabled(getBooleanValue(getTextContent(att)));
        }
    }
}
Also used : NamedNodeMap(org.w3c.dom.NamedNodeMap) Node(org.w3c.dom.Node) JoinConfig(com.hazelcast.config.JoinConfig) AutoDetectionConfig(com.hazelcast.config.AutoDetectionConfig)

Aggregations

AutoDetectionConfig (com.hazelcast.config.AutoDetectionConfig)2 NamedNodeMap (org.w3c.dom.NamedNodeMap)2 Node (org.w3c.dom.Node)2 JoinConfig (com.hazelcast.config.JoinConfig)1