}
setManagedMap.put(name, setConfigBuilder.getBeanDefinition());
}
public void handleMap(Node node) {
BeanDefinitionBuilder mapConfigBuilder = createBeanBuilder(MapConfig.class);
final AbstractBeanDefinition beanDefinition = mapConfigBuilder.getBeanDefinition();
final Node attName = node.getAttributes().getNamedItem("name");
final String name = getTextContent(attName);
mapConfigBuilder.addPropertyValue("name", name);
fillAttributeValues(node, mapConfigBuilder, "maxSize", "maxSizePolicy");
final BeanDefinitionBuilder maxSizeConfigBuilder = createBeanBuilder(MaxSizeConfig.class);
final AbstractBeanDefinition maxSizeConfigBeanDefinition = maxSizeConfigBuilder.getBeanDefinition();
mapConfigBuilder.addPropertyValue("maxSizeConfig", maxSizeConfigBeanDefinition);
final Node maxSizeNode = node.getAttributes().getNamedItem("max-size");
if (maxSizeNode != null) {
maxSizeConfigBuilder.addPropertyValue("size", getTextContent(maxSizeNode));
}
final Node maxSizePolicyNode = node.getAttributes().getNamedItem("max-size-policy");
if (maxSizePolicyNode != null) {
maxSizeConfigBuilder
.addPropertyValue(xmlToJavaName(cleanNodeName(maxSizePolicyNode)), MaxSizeConfig.MaxSizePolicy.valueOf(getTextContent(maxSizePolicyNode)));
}
for (org.w3c.dom.Node childNode : new IterableNodeList(node.getChildNodes(), Node.ELEMENT_NODE)) {
final String nodeName = cleanNodeName(childNode.getNodeName());
if ("map-store".equals(nodeName)) {
handleMapStoreConfig(childNode, mapConfigBuilder);
} else if ("near-cache".equals(nodeName)) {
handleNearCacheConfig(childNode, mapConfigBuilder);
} else if ("wan-replication-ref".equals(nodeName)) {
final BeanDefinitionBuilder wanReplicationRefBuilder = createBeanBuilder(WanReplicationRef.class);
final AbstractBeanDefinition wanReplicationRefBeanDefinition = wanReplicationRefBuilder
.getBeanDefinition();
fillValues(childNode, wanReplicationRefBuilder);
mapConfigBuilder.addPropertyValue("wanReplicationRef", wanReplicationRefBeanDefinition);
} else if ("indexes".equals(nodeName)) {
ManagedList indexes = new ManagedList();
for (Node indexNode : new IterableNodeList(childNode.getChildNodes(), Node.ELEMENT_NODE)) {
final BeanDefinitionBuilder indexConfBuilder = createBeanBuilder(MapIndexConfig.class);
fillAttributeValues(indexNode, indexConfBuilder);
indexes.add(indexConfBuilder.getBeanDefinition());
}
mapConfigBuilder.addPropertyValue("mapIndexConfigs", indexes);
} else if ("entry-listeners".equals(nodeName)) {
ManagedList listeners = parseListeners(childNode, EntryListenerConfig.class);
mapConfigBuilder.addPropertyValue("entryListenerConfigs", listeners);