new ChunkParser().parse(nestedElement, bd, parserContext, stepName); } else if(name.equals(PARTITION_ELEMENT)) { new PartitionParser(stepName, allowStartIfCompleteValue).parse(nestedElement, bd, parserContext, stepName);
public void parse(Element element, AbstractBeanDefinition bd, ParserContext parserContext, String stepName) { BeanDefinitionRegistry registry = parserContext.getRegistry(); MutablePropertyValues factoryBeanProperties = bd.getPropertyValues(); AbstractBeanDefinition partitionHandlerDefinition = BeanDefinitionBuilder.genericBeanDefinition(JsrPartitionHandler.class) .getBeanDefinition(); MutablePropertyValues properties = partitionHandlerDefinition.getPropertyValues(); properties.addPropertyValue(PARTITION_CONTEXT_PROPERTY, new RuntimeBeanReference("batchPropertyContext")); properties.addPropertyValue("jobRepository", new RuntimeBeanReference("jobRepository")); properties.addPropertyValue("allowStartIfComplete", allowStartIfComplete); parseMapperElement(element, parserContext, properties); parsePartitionPlan(element, parserContext, stepName, properties); parseAnalyzerElement(element, parserContext, properties); parseReducerElement(element, parserContext, factoryBeanProperties); parseCollectorElement(element, parserContext, factoryBeanProperties, properties); String partitionHandlerBeanName = name + ".partitionHandler"; registry.registerBeanDefinition(partitionHandlerBeanName, partitionHandlerDefinition); factoryBeanProperties.add("partitionHandler", new RuntimeBeanReference(partitionHandlerBeanName)); }
private void parseCollectorElement(Element element, ParserContext parserContext, MutablePropertyValues factoryBeanProperties, MutablePropertyValues properties) { Element collectorElement = DomUtils.getChildElementByTagName(element, COLLECTOR_ELEMENT); if(collectorElement != null) { // Only needed if a collector is used registerCollectorAnalyzerQueue(parserContext); properties.add(PARTITION_QUEUE_PROPERTY, new RuntimeBeanReference(name + "PartitionQueue")); properties.add(PARTITION_LOCK_PROPERTY, new RuntimeBeanReference(name + "PartitionLock")); factoryBeanProperties.add("partitionQueue", new RuntimeBeanReference(name + "PartitionQueue")); factoryBeanProperties.add("partitionLock", new RuntimeBeanReference(name + "PartitionLock")); String collectorName = collectorElement.getAttribute(REF); factoryBeanProperties.add(LISTENERS_PROPERTY, new RuntimeBeanReference(collectorName)); new PropertyParser(collectorName, parserContext, BatchArtifactType.STEP_ARTIFACT, name).parseProperties(collectorElement); } }
public void parse(Element element, AbstractBeanDefinition bd, ParserContext parserContext, String stepName) { BeanDefinitionRegistry registry = parserContext.getRegistry(); MutablePropertyValues factoryBeanProperties = bd.getPropertyValues(); AbstractBeanDefinition partitionHandlerDefinition = BeanDefinitionBuilder.genericBeanDefinition(JsrPartitionHandler.class) .getBeanDefinition(); MutablePropertyValues properties = partitionHandlerDefinition.getPropertyValues(); properties.addPropertyValue(PARTITION_CONTEXT_PROPERTY, new RuntimeBeanReference("batchPropertyContext")); properties.addPropertyValue("jobRepository", new RuntimeBeanReference("jobRepository")); properties.addPropertyValue("allowStartIfComplete", allowStartIfComplete); paserMapperElement(element, parserContext, properties); parsePartitionPlan(element, parserContext, stepName, properties); parseAnalyzerElement(element, parserContext, properties); parseReducerElement(element, parserContext, factoryBeanProperties); parseCollectorElement(element, parserContext, factoryBeanProperties, properties); String partitionHandlerBeanName = name + ".partitionHandler"; registry.registerBeanDefinition(partitionHandlerBeanName, partitionHandlerDefinition); factoryBeanProperties.add("partitionHandler", new RuntimeBeanReference(partitionHandlerBeanName)); }
public void parse(Element element, AbstractBeanDefinition bd, ParserContext parserContext, String stepName) { BeanDefinitionRegistry registry = parserContext.getRegistry(); MutablePropertyValues factoryBeanProperties = bd.getPropertyValues(); AbstractBeanDefinition partitionHandlerDefinition = BeanDefinitionBuilder.genericBeanDefinition(JsrPartitionHandler.class) .getBeanDefinition(); MutablePropertyValues properties = partitionHandlerDefinition.getPropertyValues(); properties.addPropertyValue(PARTITION_CONTEXT_PROPERTY, new RuntimeBeanReference("batchPropertyContext")); properties.addPropertyValue("jobRepository", new RuntimeBeanReference("jobRepository")); properties.addPropertyValue("allowStartIfComplete", allowStartIfComplete); parseMapperElement(element, parserContext, properties); parsePartitionPlan(element, parserContext, stepName, properties); parseAnalyzerElement(element, parserContext, properties); parseReducerElement(element, parserContext, factoryBeanProperties); parseCollectorElement(element, parserContext, factoryBeanProperties, properties); String partitionHandlerBeanName = name + ".partitionHandler"; registry.registerBeanDefinition(partitionHandlerBeanName, partitionHandlerDefinition); factoryBeanProperties.add("partitionHandler", new RuntimeBeanReference(partitionHandlerBeanName)); }
new ChunkParser().parse(nestedElement, bd, parserContext, stepName); } else if(name.equals(PARTITION_ELEMENT)) { new PartitionParser(stepName, allowStartIfCompleteValue).parse(nestedElement, bd, parserContext, stepName);
private void parseCollectorElement(Element element, ParserContext parserContext, MutablePropertyValues factoryBeanProperties, MutablePropertyValues properties) { Element collectorElement = DomUtils.getChildElementByTagName(element, COLLECTOR_ELEMENT); if(collectorElement != null) { // Only needed if a collector is used registerCollectorAnalyzerQueue(parserContext); properties.add(PARTITION_QUEUE_PROPERTY, new RuntimeBeanReference(name + "PartitionQueue")); properties.add(PARTITION_LOCK_PROPERTY, new RuntimeBeanReference(name + "PartitionLock")); factoryBeanProperties.add("partitionQueue", new RuntimeBeanReference(name + "PartitionQueue")); factoryBeanProperties.add("partitionLock", new RuntimeBeanReference(name + "PartitionLock")); String collectorName = collectorElement.getAttribute(REF); factoryBeanProperties.add(LISTENERS_PROPERTY, new RuntimeBeanReference(collectorName)); new PropertyParser(collectorName, parserContext, BatchArtifactType.STEP_ARTIFACT, name).parseProperties(collectorElement); } }
public void parse(Element element, AbstractBeanDefinition bd, ParserContext parserContext, String stepName) { BeanDefinitionRegistry registry = parserContext.getRegistry(); MutablePropertyValues factoryBeanProperties = bd.getPropertyValues(); AbstractBeanDefinition partitionHandlerDefinition = BeanDefinitionBuilder.genericBeanDefinition(JsrPartitionHandler.class) .getBeanDefinition(); MutablePropertyValues properties = partitionHandlerDefinition.getPropertyValues(); properties.addPropertyValue(PARTITION_CONTEXT_PROPERTY, new RuntimeBeanReference("batchPropertyContext")); properties.addPropertyValue("jobRepository", new RuntimeBeanReference("jobRepository")); properties.addPropertyValue("allowStartIfComplete", allowStartIfComplete); parseMapperElement(element, parserContext, properties); parsePartitionPlan(element, parserContext, stepName, properties); parseAnalyzerElement(element, parserContext, properties); parseReducerElement(element, parserContext, factoryBeanProperties); parseCollectorElement(element, parserContext, factoryBeanProperties, properties); String partitionHandlerBeanName = name + ".partitionHandler"; registry.registerBeanDefinition(partitionHandlerBeanName, partitionHandlerDefinition); factoryBeanProperties.add("partitionHandler", new RuntimeBeanReference(partitionHandlerBeanName)); }
new ChunkParser().parse(nestedElement, bd, parserContext, stepName); } else if(name.equals(PARTITION_ELEMENT)) { new PartitionParser(stepName, allowStartIfCompleteValue).parse(nestedElement, bd, parserContext, stepName);
private void parseCollectorElement(Element element, ParserContext parserContext, MutablePropertyValues factoryBeanProperties, MutablePropertyValues properties) { Element collectorElement = DomUtils.getChildElementByTagName(element, COLLECTOR_ELEMENT); if(collectorElement != null) { // Only needed if a collector is used registerCollectorAnalyzerQueue(parserContext); properties.add(PARTITION_QUEUE_PROPERTY, new RuntimeBeanReference(name + "PartitionQueue")); properties.add(PARTITION_LOCK_PROPERTY, new RuntimeBeanReference(name + "PartitionLock")); factoryBeanProperties.add("partitionQueue", new RuntimeBeanReference(name + "PartitionQueue")); factoryBeanProperties.add("partitionLock", new RuntimeBeanReference(name + "PartitionLock")); String collectorName = collectorElement.getAttribute(REF); factoryBeanProperties.add(LISTENERS_PROPERTY, new RuntimeBeanReference(collectorName)); new PropertyParser(collectorName, parserContext, BatchArtifactType.STEP_ARTIFACT, name).parseProperties(collectorElement); } }
new ChunkParser().parse(nestedElement, bd, parserContext, stepName); } else if(name.equals(PARTITION_ELEMENT)) { new PartitionParser(stepName, allowStartIfCompletValue).parse(nestedElement, bd, parserContext, stepName);
private void parseCollectorElement(Element element, ParserContext parserContext, MutablePropertyValues factoryBeanProperties, MutablePropertyValues properties) { Element collectorElement = DomUtils.getChildElementByTagName(element, COLLECTOR_ELEMENT); if(collectorElement != null) { // Only needed if a collector is used registerCollectorAnalyzerQueue(parserContext); properties.add(PARTITION_QUEUE_PROPERTY, new RuntimeBeanReference(name + "PartitionQueue")); properties.add(PARTITION_LOCK_PROPERTY, new RuntimeBeanReference(name + "PartitionLock")); factoryBeanProperties.add("partitionQueue", new RuntimeBeanReference(name + "PartitionQueue")); factoryBeanProperties.add("partitionLock", new RuntimeBeanReference(name + "PartitionLock")); String collectorName = collectorElement.getAttribute(REF); factoryBeanProperties.add(LISTENERS_PROPERTY, new RuntimeBeanReference(collectorName)); new PropertyParser(collectorName, parserContext, BatchArtifactType.STEP_ARTIFACT, name).parseProperties(collectorElement); } }