SGF-10
SGF-17 + add parsing of the grid object sizer
This commit is contained in:
8
.project
8
.project
@@ -1,10 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>spring-gemfire</name>
|
||||
<name>head</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
@@ -25,5 +30,6 @@
|
||||
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||
<nature>org.maven.ide.eclipse.maven2Nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@@ -152,7 +152,7 @@ abstract class ParsingUtils {
|
||||
* @param element
|
||||
* @param attrBuilder
|
||||
*/
|
||||
static void parseEviction(Element element, BeanDefinitionBuilder attrBuilder) {
|
||||
static void parseEviction(ParserContext parserContext, Element element, BeanDefinitionBuilder attrBuilder) {
|
||||
Element evictionElement = DomUtils.getChildElementByTagName(element, "eviction");
|
||||
|
||||
if (evictionElement == null)
|
||||
@@ -169,6 +169,15 @@ abstract class ParsingUtils {
|
||||
setPropertyValue(evictionElement, evictionDefBuilder, "threshold", "threshold");
|
||||
setPropertyValue(evictionElement, evictionDefBuilder, "action", "action");
|
||||
|
||||
|
||||
// get object sizer (if declared)
|
||||
Element objectSizerElement = DomUtils.getChildElementByTagName(evictionElement, "object-sizer");
|
||||
|
||||
if (objectSizerElement != null) {
|
||||
Object sizer = parseRefOrNestedBeanDeclaration(parserContext, objectSizerElement, evictionDefBuilder);
|
||||
evictionDefBuilder.addPropertyValue("ObjectSizer", sizer);
|
||||
}
|
||||
|
||||
attrBuilder.addPropertyValue("evictionAttributes", evictionDefBuilder.getBeanDefinition());
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ class PartitionedRegionParser extends AbstractSingleBeanDefinitionParser {
|
||||
// region attributes
|
||||
BeanDefinitionBuilder attrBuilder = BeanDefinitionBuilder.genericBeanDefinition(RegionAttributesFactory.class);
|
||||
|
||||
ParsingUtils.parseEviction(element, attrBuilder);
|
||||
ParsingUtils.parseEviction(parserContext, element, attrBuilder);
|
||||
ParsingUtils.parseDiskStorage(element, attrBuilder);
|
||||
|
||||
// partition attributes
|
||||
|
||||
@@ -70,7 +70,7 @@ class ReplicatedRegionParser extends AbstractSingleBeanDefinitionParser {
|
||||
attrBuilder.addPropertyValue("publisher", Boolean.valueOf(attr));
|
||||
}
|
||||
|
||||
ParsingUtils.parseEviction(element, attrBuilder);
|
||||
ParsingUtils.parseEviction(parserContext, element, attrBuilder);
|
||||
ParsingUtils.parseDiskStorage(element, attrBuilder);
|
||||
|
||||
builder.addPropertyValue("attributes", attrBuilder.getBeanDefinition());
|
||||
|
||||
Reference in New Issue
Block a user