use of com.hazelcast.config.PartitionGroupConfig.MemberGroupType in project hazelcast by hazelcast.
the class XmlConfigBuilder method handlePartitionGroup.
private void handlePartitionGroup(Node node) {
NamedNodeMap atts = node.getAttributes();
Node enabledNode = atts.getNamedItem("enabled");
boolean enabled = enabledNode != null ? getBooleanValue(getTextContent(enabledNode)) : false;
config.getPartitionGroupConfig().setEnabled(enabled);
Node groupTypeNode = atts.getNamedItem("group-type");
MemberGroupType groupType = groupTypeNode != null ? MemberGroupType.valueOf(upperCaseInternal(getTextContent(groupTypeNode))) : MemberGroupType.PER_MEMBER;
config.getPartitionGroupConfig().setGroupType(groupType);
for (Node child : childElements(node)) {
if ("member-group".equals(cleanNodeName(child))) {
handleMemberGroup(child);
}
}
}
use of com.hazelcast.config.PartitionGroupConfig.MemberGroupType in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handlePartitionGroup.
private void handlePartitionGroup(Node node) {
Node enabledNode = getNamedItemNode(node, "enabled");
boolean enabled = enabledNode != null && getBooleanValue(getTextContent(enabledNode));
config.getPartitionGroupConfig().setEnabled(enabled);
Node groupTypeNode = getNamedItemNode(node, "group-type");
MemberGroupType groupType = groupTypeNode != null ? PartitionGroupConfig.MemberGroupType.valueOf(upperCaseInternal(getTextContent(groupTypeNode))) : PartitionGroupConfig.MemberGroupType.PER_MEMBER;
config.getPartitionGroupConfig().setGroupType(groupType);
for (Node child : childElements(node)) {
if (matches("member-group", cleanNodeName(child))) {
handleMemberGroup(child, config);
}
}
}
Aggregations