SGF-338 - Both <gfe:custom-entry-ttl> and <gfe:custom-entry-tti> SDG XML namespace elements allow for more than one 'CustomExpiry' bean to be set in the Region Expiration Attributes although GemFire only allows one!
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
">
|
||||
|
||||
<util:properties id="gemfireProperties">
|
||||
<prop key="name">InvalidRegionExpirationAttributesNamespaceTest</prop>
|
||||
<prop key="mcast-port">0</prop>
|
||||
<prop key="log-level">config</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:cache properties-ref="gemfireProperties"/>
|
||||
|
||||
<gfe:replicated-region id="ReplicateExample" persistent="false">
|
||||
<gfe:custom-entry-tti>
|
||||
<bean class="org.springframework.data.gemfire.config.RegionExpirationAttributesNamespaceTest$TestCustomExpiry"
|
||||
p:name="One" p:timeout="60" p:action="#{T(com.gemstone.gemfire.cache.ExpirationAction).DESTROY}"/>
|
||||
<bean class="org.springframework.data.gemfire.config.RegionExpirationAttributesNamespaceTest$TestCustomExpiry"
|
||||
p:name="Two" p:timeout="120" p:action="#{T(com.gemstone.gemfire.cache.ExpirationAction).INVALIDATE}"/>
|
||||
</gfe:custom-entry-tti>
|
||||
</gfe:replicated-region>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
">
|
||||
|
||||
<util:properties id="gemfireProperties">
|
||||
<prop key="name">RegionExpirationAttributesNamespaceTest</prop>
|
||||
<prop key="mcast-port">0</prop>
|
||||
<prop key="log-level">config</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:cache properties-ref="gemfireProperties"/>
|
||||
|
||||
<gfe:replicated-region id="ReplicateExample" persistent="false">
|
||||
<gfe:entry-ttl timeout="600" action="DESTROY"/>
|
||||
<gfe:entry-tti timeout="300" action="INVALIDATE"/>
|
||||
</gfe:replicated-region>
|
||||
|
||||
<!--
|
||||
NOTE GemFire will switch the Region's DataPolicy when Entry Expiration Action settings
|
||||
are "LOCAL_[DESTROY|INVAlIDATE]" based or the Eviction Action is "LOCAL_[DESTROY|INVALIDATE]".
|
||||
-->
|
||||
<gfe:replicated-region id="PreloadedExample" persistent="false">
|
||||
<gfe:entry-ttl timeout="120" action="LOCAL_DESTROY"/>
|
||||
</gfe:replicated-region>
|
||||
|
||||
<gfe:partitioned-region id="PartitionExample" persistent="false">
|
||||
<gfe:entry-ttl timeout="300" action="DESTROY"/>
|
||||
<gfe:custom-entry-tti>
|
||||
<bean class="org.springframework.data.gemfire.config.RegionExpirationAttributesNamespaceTest$TestCustomExpiry"
|
||||
p:name="PartitionCustomExpiry" p:timeout="120" p:action="#{T(com.gemstone.gemfire.cache.ExpirationAction).INVALIDATE}"/>
|
||||
</gfe:custom-entry-tti>
|
||||
</gfe:partitioned-region>
|
||||
|
||||
<gfe:local-region id="LocalExample" persistent="false">
|
||||
<gfe:custom-entry-ttl>
|
||||
<bean class="org.springframework.data.gemfire.config.RegionExpirationAttributesNamespaceTest$TestCustomExpiry"
|
||||
p:name="LocalTtlCustomExpiry" p:timeout="180" p:action="#{T(com.gemstone.gemfire.cache.ExpirationAction).LOCAL_DESTROY}"/>
|
||||
</gfe:custom-entry-ttl>
|
||||
<gfe:custom-entry-tti ref="LocalTtiCustomExpiry"/>
|
||||
</gfe:local-region>
|
||||
|
||||
<bean id="LocalTtiCustomExpiry" class="org.springframework.data.gemfire.config.RegionExpirationAttributesNamespaceTest$TestCustomExpiry">
|
||||
<property name="name" value="LocalTtiCustomExpiry"/>
|
||||
<property name="timeout" value="60"/>
|
||||
<property name="action" value="#{T(com.gemstone.gemfire.cache.ExpirationAction).LOCAL_INVALIDATE}"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
Reference in New Issue
Block a user