merge 1.2.2

This commit is contained in:
David Turanski
2012-12-10 08:21:12 -05:00
parent 0a2fcb7324
commit c9de0477f9
7 changed files with 221 additions and 26 deletions

View File

@@ -142,10 +142,10 @@ abstract class AbstractRegionParser extends AliasReplacingBeanDefinitionParser {
// Parse child elements
parseCollectionOfCustomSubElements(parserContext, element, builder,
"com.gemstone.gemfire.cache.wan.GatewaySender", "gateway-sender","gatewaySenders");
parseCollectionOfCustomSubElements(parserContext, element, builder,
"com.gemstone.gemfire.cache.wan.GatewaySender", "gateway-sender", "gatewaySenders");
parseCollectionOfCustomSubElements(parserContext, element, builder,
"com.gemstone.gemfire.cache.wan.AsyncEventQueue", "async-event-queue", "asyncEventQueues");
"com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue", "async-event-queue", "asyncEventQueues");
List<Element> subElements = DomUtils.getChildElements(element);
for (Element subElement : subElements) {

View File

@@ -284,6 +284,8 @@ abstract class ParsingUtils {
result |= parseExpiration(element, "region-tti", "regionIdleTimeout", attrBuilder);
result |= parseExpiration(element, "entry-ttl", "entryTimeToLive", attrBuilder);
result |= parseExpiration(element, "entry-tti", "entryIdleTimeout", attrBuilder);
result |= parseCustomExpiration(parserContext, element,"custom-entry-ttl","customEntryTimeToLive",attrBuilder);
result |= parseCustomExpiration(parserContext, element,"custom-entry-tti","customEntryIdleTimeout",attrBuilder);
if (result) {
// turn on statistics
@@ -422,4 +424,18 @@ abstract class ParsingUtils {
return true;
}
private static boolean parseCustomExpiration(ParserContext parserContext, Element rootElement, String elementName, String propertyName,
BeanDefinitionBuilder attrBuilder) {
Element expirationElement = DomUtils.getChildElementByTagName(rootElement, elementName);
if (expirationElement == null)
return false;
Object customExpiry = parseRefOrSingleNestedBeanDeclaration(parserContext, expirationElement, attrBuilder);
attrBuilder.addPropertyValue(propertyName, customExpiry);
return true;
}
}

View File

@@ -37,7 +37,7 @@ class ReplicatedRegionParser extends AbstractRegionParser {
BeanDefinitionBuilder attrBuilder = subRegion ? builder : BeanDefinitionBuilder
.genericBeanDefinition(RegionAttributesFactoryBean.class);
super.doParseCommonRegionConfiguration(element, parserContext, builder, attrBuilder, subRegion);
if (!subRegion) {
builder.addPropertyValue("attributes", attrBuilder.getBeanDefinition());

View File

@@ -756,22 +756,57 @@ Time to idle (or idle timeout) configuration for the region itself. Default: no
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="entry-ttl" type="expirationType"
<xsd:choice>
<xsd:element name="entry-ttl" type="expirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:annotation>
<xsd:documentation><![CDATA[[
Time to live configuration for the region entries. Default: no expiration.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="entry-tti" type="expirationType"
</xsd:annotation>
</xsd:element>
<xsd:element name="custom-entry-ttl" type="customExpirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<tool:exports
type="com.gemstone.gemfire.cache.CustomExpiry" />
</tool:annotation>
</xsd:appinfo>
<xsd:documentation><![CDATA[[
CustomExpiry time to live configuration for the region entries. Default: no expiration.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
<xsd:choice>
<xsd:element name="entry-tti" type="expirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:annotation>
<xsd:documentation><![CDATA[[
Time to idle (or idle timeout) configuration for the region entries. Default: no expiration.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:annotation>
</xsd:element>
<xsd:element name="custom-entry-tti" type="customExpirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<tool:exports
type="com.gemstone.gemfire.cache.CustomExpiry" />
</tool:annotation>
</xsd:appinfo>
<xsd:documentation><![CDATA[[
CustomExpiry Time to idle (or idle timeout) configuration for the region entries. Default: no expiration.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="load-factor" type="xsd:string"
default="0.75">
@@ -1361,6 +1396,28 @@ When the region or cached object expires, it is destroyed locally only. Not supp
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<!-- -->
<!-- -->
<xsd:complexType name="customExpirationType">
<xsd:sequence>
<xsd:any namespace="##other" processContents="skip" minOccurs="0"
maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation><![CDATA[
Inner bean definition of the CustomExpiry.
]]></xsd:documentation>
</xsd:annotation>
</xsd:any>
</xsd:sequence>
<xsd:attribute name="ref" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[
The name of the CustomExpiry bean referred by this declaration. Used as a convenience method. If no reference exists,
use inner bean declarations.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<!-- -->
<xsd:complexType name="evictionType">
<xsd:sequence minOccurs="0" maxOccurs="1">
@@ -2258,6 +2315,13 @@ Inner bean definition of the event filter
minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attributeGroup ref="commonWANQueueAttributes" />
<xsd:attribute name="name" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[
Optionally specifies the GemFire gateway sender id. By default this value is the bean id or a generated value if an inner bean.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="remote-distributed-system-id"
type="xsd:string" use="required">
<xsd:annotation>
@@ -2506,6 +2570,13 @@ use inner bean declarations.
</xsd:element>
</xsd:sequence>
<xsd:attributeGroup ref="commonWANQueueAttributes" />
<xsd:attribute name="name" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[
Optionally specifies the GemFire gateway sender id. By default this value is the bean id or a generated value if an inner bean.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<!-- -->
<xsd:element name="gateway-sender">

View File

@@ -758,22 +758,58 @@ Time to idle (or idle timeout) configuration for the region itself. Default: no
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="entry-ttl" type="expirationType"
<xsd:choice>
<xsd:element name="entry-ttl" type="expirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:annotation>
<xsd:documentation><![CDATA[[
Time to live configuration for the region entries. Default: no expiration.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="entry-tti" type="expirationType"
</xsd:annotation>
</xsd:element>
<xsd:element name="custom-entry-ttl" type="customExpirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<tool:exports
type="com.gemstone.gemfire.cache.CustomExpiry" />
</tool:annotation>
</xsd:appinfo>
<xsd:documentation><![CDATA[[
CustomExpiry time to live configuration for the region entries. Default: no expiration.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
<xsd:choice>
<xsd:element name="entry-tti" type="expirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:annotation>
<xsd:documentation><![CDATA[[
Time to idle (or idle timeout) configuration for the region entries. Default: no expiration.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:annotation>
</xsd:element>
<xsd:element name="custom-entry-tti" type="customExpirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<tool:exports
type="com.gemstone.gemfire.cache.CustomExpiry" />
</tool:annotation>
</xsd:appinfo>
<xsd:documentation><![CDATA[[
CustomExpiry Time to idle (or idle timeout) configuration for the region entries. Default: no expiration.
]]></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="load-factor" type="xsd:string"
default="0.75">
@@ -1308,9 +1344,10 @@ The name of the region definition.
</xsd:complexType>
<!-- -->
<xsd:element name="partitioned-region" type="partitionedRegionType" />
<!-- -->
<!-- -->
<xsd:complexType name="expirationType">
<xsd:attribute name="timeout" type="xsd:string"
<xsd:attribute name="timeout" type="xsd:string"
default="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
@@ -1353,6 +1390,29 @@ When the region or cached object expires, it is destroyed locally only. Not supp
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<!-- -->
<xsd:complexType name="customExpirationType">
<xsd:sequence>
<xsd:any namespace="##other" processContents="skip" minOccurs="0"
maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation><![CDATA[
Inner bean definition of the CustomExpiry.
]]></xsd:documentation>
</xsd:annotation>
</xsd:any>
</xsd:sequence>
<xsd:attribute name="ref" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation><![CDATA[
The name of the CustomExpiry bean referred by this declaration. Used as a convenience method. If no reference exists,
use inner bean declarations.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<!-- -->
<xsd:complexType name="evictionType">
<xsd:sequence minOccurs="0" maxOccurs="1">