SGF-398 - Provide early support of Apache Geode (Pivotal GemFire OSS).
Additional test cleanup related to Pivotal GemFire specific features (e.g. WAN).
This commit is contained in:
@@ -52,9 +52,10 @@ if (project.hasProperty('platformVersion')) {
|
||||
|
||||
tasks.withType(Test).all {
|
||||
forkEvery = 1
|
||||
systemProperties['product.name'] = 'Apache Geode'
|
||||
systemProperties['gemfire.disableShutdownHook'] = 'true'
|
||||
systemProperties['product.name'] = 'Apache Geode'
|
||||
systemProperties['org.springframework.data.gemfire.test.GemfireTestRunner.nomock'] = System.getProperty('org.springframework.data.gemfire.test.GemfireTestRunner.nomock')
|
||||
systemProperties['spring.profiles.active'] = 'apache-geode'
|
||||
}
|
||||
|
||||
// Common dependencies
|
||||
|
||||
@@ -29,6 +29,7 @@ import javax.annotation.Resource;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.data.gemfire.test.GemfireProfileValueSource;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@@ -96,11 +97,35 @@ public class LookupRegionMutationIntegrationTest {
|
||||
assertEquals(expectedTimeout, expirationAttributes.getTimeout());
|
||||
}
|
||||
|
||||
protected void assertGatewaySenders(Region<?, ?> region, List<String> expectedGatewaySenderIds) {
|
||||
if (GemfireProfileValueSource.isPivotalGemFire()) {
|
||||
assertNotNull(region.getAttributes());
|
||||
assertNotNull(region.getAttributes().getGatewaySenderIds());
|
||||
assertEquals(expectedGatewaySenderIds.size(), region.getAttributes().getGatewaySenderIds().size());
|
||||
assertTrue(expectedGatewaySenderIds.containsAll(region.getAttributes().getGatewaySenderIds()));
|
||||
}
|
||||
}
|
||||
|
||||
protected void assertGemFireComponent(Object gemfireComponent, String expectedName) {
|
||||
assertNotNull("The GemFire component must not be null!", gemfireComponent);
|
||||
assertEquals(expectedName, gemfireComponent.toString());
|
||||
}
|
||||
|
||||
protected void assertRegionAttributes(Region<?, ?> region, String expectedName, DataPolicy expectedDataPolicy) {
|
||||
assertRegionAttributes(region, expectedName, String.format("%1$s%2$s", Region.SEPARATOR, expectedName),
|
||||
expectedDataPolicy);
|
||||
}
|
||||
|
||||
protected void assertRegionAttributes(Region<?, ?> region, String expectedName, String expectedFullPath,
|
||||
DataPolicy expectedDataPolicy) {
|
||||
|
||||
assertNotNull(String.format("'%1$s' Region was not properly initialized!", region));
|
||||
assertEquals(expectedName, region.getName());
|
||||
assertEquals(expectedFullPath, region.getFullPath());
|
||||
assertNotNull(region.getAttributes());
|
||||
assertEquals(expectedDataPolicy, region.getAttributes().getDataPolicy());
|
||||
}
|
||||
|
||||
protected Collection<String> toStrings(Object[] objects) {
|
||||
List<String> cacheListenerNames = new ArrayList<String>(objects.length);
|
||||
|
||||
@@ -113,11 +138,7 @@ public class LookupRegionMutationIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void testRegionConfiguration() {
|
||||
assertNotNull("'/Example' Region was not properly initialized!", example);
|
||||
assertEquals("Example", example.getName());
|
||||
assertEquals("/Example", example.getFullPath());
|
||||
assertNotNull(example.getAttributes());
|
||||
assertEquals(DataPolicy.REPLICATE, example.getAttributes().getDataPolicy());
|
||||
assertRegionAttributes(example, "Example", DataPolicy.REPLICATE);
|
||||
assertEquals(13, example.getAttributes().getInitialCapacity());
|
||||
assertEquals(0.85f, example.getAttributes().getLoadFactor(), 0.0f);
|
||||
assertCacheListeners(example.getAttributes().getCacheListeners(), Arrays.asList("A", "B"));
|
||||
@@ -132,12 +153,10 @@ public class LookupRegionMutationIntegrationTest {
|
||||
assertExpirationAttributes(example.getAttributes().getEntryTimeToLive(), "Entry TTL",
|
||||
30, ExpirationAction.DESTROY);
|
||||
assertGemFireComponent(example.getAttributes().getCustomEntryIdleTimeout(), "E");
|
||||
assertNotNull(example.getAttributes().getGatewaySenderIds());
|
||||
assertEquals(1, example.getAttributes().getGatewaySenderIds().size());
|
||||
assertEquals("GWS", example.getAttributes().getGatewaySenderIds().iterator().next());
|
||||
assertNotNull(example.getAttributes().getAsyncEventQueueIds());
|
||||
assertEquals(1, example.getAttributes().getAsyncEventQueueIds().size());
|
||||
assertEquals("AEQ", example.getAttributes().getAsyncEventQueueIds().iterator().next());
|
||||
assertGatewaySenders(example, Arrays.asList("GWS"));
|
||||
}
|
||||
|
||||
protected static interface Nameable extends BeanNameAware {
|
||||
|
||||
@@ -36,7 +36,10 @@ import org.springframework.data.gemfire.CacheFactoryBean;
|
||||
import org.springframework.data.gemfire.GemfireBeanFactoryLocator;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
import org.springframework.data.gemfire.client.ClientCacheFactoryBean;
|
||||
import org.springframework.data.gemfire.test.GemfireProfileValueSource;
|
||||
import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer;
|
||||
import org.springframework.test.annotation.IfProfileValue;
|
||||
import org.springframework.test.annotation.ProfileValueSourceConfiguration;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
@@ -51,6 +54,7 @@ import com.gemstone.gemfire.cache.util.TimestampedEntryEvent;
|
||||
* @author John Blum
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ProfileValueSourceConfiguration(GemfireProfileValueSource.class)
|
||||
@ContextConfiguration(locations = "cache-ns.xml", initializers = GemfireTestApplicationContextInitializer.class)
|
||||
@SuppressWarnings("unused")
|
||||
public class CacheNamespaceTest{
|
||||
@@ -121,6 +125,8 @@ public class CacheNamespaceTest{
|
||||
}
|
||||
|
||||
@Test
|
||||
@IfProfileValue(name = GemfireProfileValueSource.PRODUCT_NAME_KEY,
|
||||
value = GemfireProfileValueSource.PIVOTAL_GEMFIRE_PRODUCT_NAME)
|
||||
public void testCacheWithGatewayConflictResolver() {
|
||||
Cache cache = context.getBean("cache-with-gateway-conflict-resolver", Cache.class);
|
||||
|
||||
|
||||
@@ -24,7 +24,12 @@ import javax.annotation.Resource;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.gemfire.test.GemfireProfileValueSource;
|
||||
import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer;
|
||||
import org.springframework.test.annotation.IfProfileValue;
|
||||
import org.springframework.test.annotation.ProfileValueSourceConfiguration;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@@ -50,17 +55,18 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
|
||||
* @since 1.3.3
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ProfileValueSourceConfiguration(GemfireProfileValueSource.class)
|
||||
@ContextConfiguration(locations = "subregionsubelement-ns.xml",
|
||||
initializers = GemfireTestApplicationContextInitializer.class)
|
||||
@SuppressWarnings("unused")
|
||||
public class SubRegionSubElementNamespaceTest {
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
@Resource(name = "/Customers/Accounts")
|
||||
private Region customersAccountsRegion;
|
||||
|
||||
@Resource(name = "/Orders/Items")
|
||||
private Region orderItemsRegion;
|
||||
|
||||
@Resource(name = "/Parent/Child")
|
||||
private Region parentChildRegion;
|
||||
|
||||
@@ -81,7 +87,11 @@ public class SubRegionSubElementNamespaceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@IfProfileValue(name = GemfireProfileValueSource.PRODUCT_NAME_KEY,
|
||||
value = GemfireProfileValueSource.PIVOTAL_GEMFIRE_PRODUCT_NAME)
|
||||
public void testOrderItemsSubRegionGatewaySender() {
|
||||
Region orderItemsRegion = applicationContext.getBean("/Orders/Items", Region.class);
|
||||
|
||||
assertNotNull(orderItemsRegion);
|
||||
assertNotNull(orderItemsRegion.getAttributes());
|
||||
assertNotNull(orderItemsRegion.getAttributes().getGatewaySenderIds());
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanIsAbstractException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.gemfire.test.GemfireProfileValueSource;
|
||||
import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -180,14 +181,13 @@ public class TemplateRegionsNamespaceTests {
|
||||
assertEquals(expectedTimeout, expirationAttributes.getTimeout());
|
||||
}
|
||||
|
||||
protected void assertGatewaySenders(final Region<?, ?> region, final String... gatewaySenderNames) {
|
||||
assertNotNull(region);
|
||||
assertNotNull(region.getAttributes());
|
||||
assertNotNull(region.getAttributes().getGatewaySenderIds());
|
||||
assertEquals(gatewaySenderNames.length, region.getAttributes().getGatewaySenderIds().size());
|
||||
|
||||
for (String gatewaySenderId : region.getAttributes().getGatewaySenderIds()) {
|
||||
assertTrue(Arrays.asList(gatewaySenderNames).contains(gatewaySenderId));
|
||||
protected void assertGatewaySenders(final Region<?, ?> region, final String... gatewaySenderIds) {
|
||||
if (GemfireProfileValueSource.isPivotalGemFire()) {
|
||||
assertNotNull(region);
|
||||
assertNotNull(region.getAttributes());
|
||||
assertNotNull(region.getAttributes().getGatewaySenderIds());
|
||||
assertEquals(gatewaySenderIds.length, region.getAttributes().getGatewaySenderIds().size());
|
||||
assertTrue(Arrays.asList(gatewaySenderIds).containsAll(region.getAttributes().getGatewaySenderIds()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,11 +447,13 @@ public class TemplateRegionsNamespaceTests {
|
||||
assertEquals(String.class, templateBasedReplicateRegionNoOverrides.getAttributes().getKeyConstraint());
|
||||
assertEquals(0.85f, templateBasedReplicateRegionNoOverrides.getAttributes().getLoadFactor(), 0.0f);
|
||||
assertFalse(templateBasedReplicateRegionNoOverrides.getAttributes().isLockGrantor());
|
||||
assertDefaultMembershipAttributes(templateBasedReplicateRegionNoOverrides.getAttributes().getMembershipAttributes());
|
||||
assertDefaultMembershipAttributes(
|
||||
templateBasedReplicateRegionNoOverrides.getAttributes().getMembershipAttributes());
|
||||
assertNull(templateBasedReplicateRegionNoOverrides.getAttributes().getPartitionAttributes());
|
||||
assertEquals(Scope.DISTRIBUTED_ACK, templateBasedReplicateRegionNoOverrides.getAttributes().getScope());
|
||||
assertTrue(templateBasedReplicateRegionNoOverrides.getAttributes().getStatisticsEnabled());
|
||||
assertSubscriptionAttributes(templateBasedReplicateRegionNoOverrides.getAttributes().getSubscriptionAttributes(),
|
||||
assertSubscriptionAttributes(
|
||||
templateBasedReplicateRegionNoOverrides.getAttributes().getSubscriptionAttributes(),
|
||||
InterestPolicy.CACHE_CONTENT);
|
||||
assertEquals(Object.class, templateBasedReplicateRegionNoOverrides.getAttributes().getValueConstraint());
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.data.gemfire.test;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@@ -37,15 +38,29 @@ public class GemfireProfileValueSource implements ProfileValueSource {
|
||||
public static final String PIVOTAL_GEMFIRE_PRODUCT_NAME = "Pivotal GemFire";
|
||||
public static final String PRODUCT_NAME_KEY = "product.name";
|
||||
|
||||
private static final Map<String, String> PROFILE_VALUES = new ConcurrentHashMap<String, String>();
|
||||
public static final Map<String, String> PROFILE_VALUES;
|
||||
|
||||
static {
|
||||
PROFILE_VALUES.put(PRODUCT_NAME_KEY, System.getProperty(PRODUCT_NAME_KEY, GemfireUtils.GEMFIRE_NAME));
|
||||
Map<String, String> profileValues = new ConcurrentHashMap<String, String>(1);
|
||||
profileValues.put(PRODUCT_NAME_KEY, System.getProperty(PRODUCT_NAME_KEY, GemfireUtils.GEMFIRE_NAME));
|
||||
PROFILE_VALUES = Collections.unmodifiableMap(profileValues);
|
||||
}
|
||||
|
||||
public static boolean isApacheGeode() {
|
||||
return APACHE_GEODE_PRODUCT_NAME.equals(getProfileValue(PRODUCT_NAME_KEY));
|
||||
}
|
||||
|
||||
public static boolean isPivotalGemFire() {
|
||||
return PIVOTAL_GEMFIRE_PRODUCT_NAME.equals(getProfileValue(PRODUCT_NAME_KEY));
|
||||
}
|
||||
|
||||
public static String getProfileValue(final String profileKey) {
|
||||
return PROFILE_VALUES.get(profileKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String get(final String key) {
|
||||
return PROFILE_VALUES.get(key);
|
||||
return getProfileValue(key);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,29 +20,69 @@
|
||||
|
||||
<bean id="B" class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest.TestCacheListener"/>
|
||||
|
||||
<gfe:lookup-region id="Example" cloning-enabled="true" eviction-maximum="1000">
|
||||
<gfe:cache-listener>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest.TestCacheListener" p:name="A"/>
|
||||
<ref bean="B"/>
|
||||
</gfe:cache-listener>
|
||||
<gfe:cache-loader>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheLoader" p:name="C"/>
|
||||
</gfe:cache-loader>
|
||||
<gfe:cache-writer>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheWriter" p:name="D"/>
|
||||
</gfe:cache-writer>
|
||||
<gfe:region-ttl timeout="120" action="LOCAL_DESTROY"/>
|
||||
<gfe:region-tti timeout="60" action="INVALIDATE"/>
|
||||
<gfe:entry-ttl timeout="30" action="DESTROY"/>
|
||||
<gfe:custom-entry-tti>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCustomExpiry" p:name="E"/>
|
||||
</gfe:custom-entry-tti>
|
||||
<gfe:gateway-sender name="GWS" remote-distributed-system-id="123" manual-start="true"/>
|
||||
<gfe:async-event-queue name="AEQ" persistent="false" parallel="true" dispatcher-threads="8">
|
||||
<gfe:async-event-listener>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestAsyncEventListener" p:name="F"/>
|
||||
</gfe:async-event-listener>
|
||||
</gfe:async-event-queue>
|
||||
</gfe:lookup-region>
|
||||
<beans profile="apache-geode">
|
||||
<gfe:lookup-region id="Example" cloning-enabled="true" eviction-maximum="1000">
|
||||
<gfe:cache-listener>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest.TestCacheListener"
|
||||
p:name="A"/>
|
||||
<ref bean="B"/>
|
||||
</gfe:cache-listener>
|
||||
<gfe:cache-loader>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheLoader"
|
||||
p:name="C"/>
|
||||
</gfe:cache-loader>
|
||||
<gfe:cache-writer>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheWriter"
|
||||
p:name="D"/>
|
||||
</gfe:cache-writer>
|
||||
<gfe:region-ttl timeout="120" action="LOCAL_DESTROY"/>
|
||||
<gfe:region-tti timeout="60" action="INVALIDATE"/>
|
||||
<gfe:entry-ttl timeout="30" action="DESTROY"/>
|
||||
<gfe:custom-entry-tti>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCustomExpiry"
|
||||
p:name="E"/>
|
||||
</gfe:custom-entry-tti>
|
||||
<gfe:async-event-queue name="AEQ" persistent="false" parallel="true" dispatcher-threads="8">
|
||||
<gfe:async-event-listener>
|
||||
<bean
|
||||
class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestAsyncEventListener"
|
||||
p:name="F"/>
|
||||
</gfe:async-event-listener>
|
||||
</gfe:async-event-queue>
|
||||
</gfe:lookup-region>
|
||||
</beans>
|
||||
|
||||
<beans profile="pivotal-gemfire">
|
||||
<gfe:lookup-region id="Example" cloning-enabled="true" eviction-maximum="1000">
|
||||
<gfe:cache-listener>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest.TestCacheListener"
|
||||
p:name="A"/>
|
||||
<ref bean="B"/>
|
||||
</gfe:cache-listener>
|
||||
<gfe:cache-loader>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheLoader"
|
||||
p:name="C"/>
|
||||
</gfe:cache-loader>
|
||||
<gfe:cache-writer>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheWriter"
|
||||
p:name="D"/>
|
||||
</gfe:cache-writer>
|
||||
<gfe:region-ttl timeout="120" action="LOCAL_DESTROY"/>
|
||||
<gfe:region-tti timeout="60" action="INVALIDATE"/>
|
||||
<gfe:entry-ttl timeout="30" action="DESTROY"/>
|
||||
<gfe:custom-entry-tti>
|
||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCustomExpiry"
|
||||
p:name="E"/>
|
||||
</gfe:custom-entry-tti>
|
||||
<gfe:gateway-sender name="GWS" remote-distributed-system-id="123" manual-start="true"/>
|
||||
<gfe:async-event-queue name="AEQ" persistent="false" parallel="true" dispatcher-threads="8">
|
||||
<gfe:async-event-listener>
|
||||
<bean
|
||||
class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestAsyncEventListener"
|
||||
p:name="F"/>
|
||||
</gfe:async-event-listener>
|
||||
</gfe:async-event-queue>
|
||||
</gfe:lookup-region>
|
||||
</beans>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
</gfe:async-event-listener>
|
||||
</gfe:async-event-queue>
|
||||
|
||||
<gfe:gateway-sender id="TestGatewaySender" remote-distributed-system-id="123" manual-start="true" persistent="false"
|
||||
parallel="true" dispatcher-threads="8"/>
|
||||
|
||||
<!-- Template Regions -->
|
||||
<gfe:region-template id="BaseRegionTemplate" cloning-enabled="true" concurrency-checks-enabled="false"
|
||||
disk-synchronous="false" ignore-jta="true" initial-capacity="51" key-constraint="java.lang.Long"
|
||||
@@ -95,37 +92,6 @@
|
||||
|
||||
<gfe:replicated-region id="TemplateBasedReplicateRegionNoOverrides" template="ReplicateRegionTemplate"/>
|
||||
|
||||
|
||||
<!-- PARTITION Regions -->
|
||||
<gfe:partitioned-region-template id="PartitionRegionTemplate" copies="1" local-max-memory="1024"
|
||||
total-max-memory="16384" recovery-delay="60000" startup-recovery-delay="15000"
|
||||
enable-async-conflation="false" enable-subscription-conflation="true"
|
||||
load-factor="0.70" value-constraint="java.lang.Object"
|
||||
template="ExtendedRegionTemplate">
|
||||
<gfe:gateway-sender-ref bean="TestGatewaySender"/>
|
||||
<gfe:async-event-queue-ref bean="TestAsyncEventQueue"/>
|
||||
<gfe:partition-resolver>
|
||||
<bean class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestPartitionResolver" p:name="testResolver"/>
|
||||
</gfe:partition-resolver>
|
||||
<gfe:eviction type="ENTRY_COUNT" threshold="8192000" action="OVERFLOW_TO_DISK"/>
|
||||
</gfe:partitioned-region-template>
|
||||
|
||||
<gfe:partitioned-region id="Neighbor" persistent="true" copies="2" total-buckets="91"/>
|
||||
|
||||
<gfe:partitioned-region id="TemplateBasedPartitionRegion" colocated-with="Neighbor" copies="2" local-max-memory="8192"
|
||||
total-buckets="91" disk-synchronous="true" enable-async-conflation="true" ignore-jta="false"
|
||||
key-constraint="java.util.Date" persistent="true" template="PartitionRegionTemplate">
|
||||
<gfe:cache-writer>
|
||||
<bean class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestCacheWriter" p:name="dbWriter"/>
|
||||
</gfe:cache-writer>
|
||||
<gfe:membership-attributes required-roles="admin,root,supertool" loss-action="no-access" resumption-action="reinitialize"/>
|
||||
<gfe:partition-listener>
|
||||
<bean class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestPartitionListener" p:name="testListener"/>
|
||||
</gfe:partition-listener>
|
||||
<gfe:subscription type="ALL"/>
|
||||
</gfe:partitioned-region>
|
||||
|
||||
|
||||
<!-- LOCAL Regions -->
|
||||
<gfe:local-region-template id="LocalRegionTemplate" concurrency-level="8" template="BaseRegionTemplate">
|
||||
<gfe:eviction type="ENTRY_COUNT" threshold="4096" action="LOCAL_DESTROY"/>
|
||||
@@ -133,4 +99,68 @@
|
||||
|
||||
<gfe:local-region id="TemplateBasedLocalRegion" template="LocalRegionTemplate"/>
|
||||
|
||||
<!-- PARTITION Regions -->
|
||||
<gfe:partitioned-region id="Neighbor" persistent="true" copies="2" total-buckets="91"/>
|
||||
|
||||
<beans profile="pivotal-gemfire">
|
||||
<gfe:gateway-sender id="TestGatewaySender" remote-distributed-system-id="123" manual-start="true"
|
||||
persistent="false" parallel="true" dispatcher-threads="8"/>
|
||||
|
||||
<gfe:partitioned-region-template id="PartitionRegionTemplate" copies="1" local-max-memory="1024"
|
||||
total-max-memory="16384" recovery-delay="60000" startup-recovery-delay="15000"
|
||||
enable-async-conflation="false" enable-subscription-conflation="true"
|
||||
load-factor="0.70" value-constraint="java.lang.Object"
|
||||
template="ExtendedRegionTemplate">
|
||||
<gfe:gateway-sender-ref bean="TestGatewaySender"/>
|
||||
<gfe:async-event-queue-ref bean="TestAsyncEventQueue"/>
|
||||
<gfe:partition-resolver>
|
||||
<bean
|
||||
class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestPartitionResolver"
|
||||
p:name="testResolver"/>
|
||||
</gfe:partition-resolver>
|
||||
<gfe:eviction type="ENTRY_COUNT" threshold="8192000" action="OVERFLOW_TO_DISK"/>
|
||||
</gfe:partitioned-region-template>
|
||||
|
||||
<gfe:partitioned-region id="TemplateBasedPartitionRegion" colocated-with="Neighbor" copies="2" local-max-memory="8192"
|
||||
total-buckets="91" disk-synchronous="true" enable-async-conflation="true" ignore-jta="false"
|
||||
key-constraint="java.util.Date" persistent="true" template="PartitionRegionTemplate">
|
||||
<gfe:cache-writer>
|
||||
<bean class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestCacheWriter" p:name="dbWriter"/>
|
||||
</gfe:cache-writer>
|
||||
<gfe:membership-attributes required-roles="admin,root,supertool" loss-action="no-access" resumption-action="reinitialize"/>
|
||||
<gfe:partition-listener>
|
||||
<bean class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestPartitionListener" p:name="testListener"/>
|
||||
</gfe:partition-listener>
|
||||
<gfe:subscription type="ALL"/>
|
||||
</gfe:partitioned-region>
|
||||
</beans>
|
||||
|
||||
<beans profile="apache-geode">
|
||||
<gfe:partitioned-region-template id="PartitionRegionTemplate" copies="1" local-max-memory="1024"
|
||||
total-max-memory="16384" recovery-delay="60000" startup-recovery-delay="15000"
|
||||
enable-async-conflation="false" enable-subscription-conflation="true"
|
||||
load-factor="0.70" value-constraint="java.lang.Object"
|
||||
template="ExtendedRegionTemplate">
|
||||
<gfe:async-event-queue-ref bean="TestAsyncEventQueue"/>
|
||||
<gfe:partition-resolver>
|
||||
<bean class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestPartitionResolver"
|
||||
p:name="testResolver"/>
|
||||
</gfe:partition-resolver>
|
||||
<gfe:eviction type="ENTRY_COUNT" threshold="8192000" action="OVERFLOW_TO_DISK"/>
|
||||
</gfe:partitioned-region-template>
|
||||
|
||||
<gfe:partitioned-region id="TemplateBasedPartitionRegion" colocated-with="Neighbor" copies="2" local-max-memory="8192"
|
||||
total-buckets="91" disk-synchronous="true" enable-async-conflation="true" ignore-jta="false"
|
||||
key-constraint="java.util.Date" persistent="true" template="PartitionRegionTemplate">
|
||||
<gfe:cache-writer>
|
||||
<bean class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestCacheWriter" p:name="dbWriter"/>
|
||||
</gfe:cache-writer>
|
||||
<gfe:membership-attributes required-roles="admin,root,supertool" loss-action="no-access" resumption-action="reinitialize"/>
|
||||
<gfe:partition-listener>
|
||||
<bean class="org.springframework.data.gemfire.config.TemplateRegionsNamespaceTests$TestPartitionListener" p:name="testListener"/>
|
||||
</gfe:partition-listener>
|
||||
<gfe:subscription type="ALL"/>
|
||||
</gfe:partitioned-region>
|
||||
</beans>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -23,12 +23,6 @@
|
||||
<gfe:cache id="cache-with-xml-and-props" cache-xml-location="classpath:gemfire-cache.xml" properties-ref="gemfireProperties"
|
||||
pdx-read-serialized="true" pdx-ignore-unread-fields="false" pdx-persistent="true"/>
|
||||
|
||||
<gfe:cache id="cache-with-gateway-conflict-resolver">
|
||||
<gfe:gateway-conflict-resolver>
|
||||
<bean class="org.springframework.data.gemfire.config.CacheNamespaceTest.TestGatewayConflictResolver"/>
|
||||
</gfe:gateway-conflict-resolver>
|
||||
</gfe:cache>
|
||||
|
||||
<gfe:cache id="cache-with-auto-reconnect-disabled" enable-auto-reconnect="false"/>
|
||||
|
||||
<gfe:cache id="cache-with-auto-reconnect-enabled" enable-auto-reconnect="true"/>
|
||||
@@ -45,4 +39,12 @@
|
||||
<gfe:server host="localhost" port="1234"/>
|
||||
</gfe:pool>
|
||||
|
||||
<beans profile="pivotal-gemfire">
|
||||
<gfe:cache id="cache-with-gateway-conflict-resolver">
|
||||
<gfe:gateway-conflict-resolver>
|
||||
<bean class="org.springframework.data.gemfire.config.CacheNamespaceTest.TestGatewayConflictResolver"/>
|
||||
</gfe:gateway-conflict-resolver>
|
||||
</gfe:cache>
|
||||
</beans>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -36,11 +36,13 @@
|
||||
</gfe:replicated-region>
|
||||
</gfe:replicated-region>
|
||||
|
||||
<gfe:replicated-region id="Orders" persistent="false">
|
||||
<gfe:replicated-region name="Items" persistent="false">
|
||||
<gfe:gateway-sender remote-distributed-system-id="21" name="testSender" parallel="false"
|
||||
manual-start="true"/>
|
||||
<beans profile="pivotal-gemfire">
|
||||
<gfe:replicated-region id="Orders" persistent="false">
|
||||
<gfe:replicated-region name="Items" persistent="false">
|
||||
<gfe:gateway-sender remote-distributed-system-id="21" name="testSender" parallel="false"
|
||||
manual-start="true"/>
|
||||
</gfe:replicated-region>
|
||||
</gfe:replicated-region>
|
||||
</gfe:replicated-region>
|
||||
</beans>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user