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 {
|
tasks.withType(Test).all {
|
||||||
forkEvery = 1
|
forkEvery = 1
|
||||||
systemProperties['product.name'] = 'Apache Geode'
|
|
||||||
systemProperties['gemfire.disableShutdownHook'] = 'true'
|
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['org.springframework.data.gemfire.test.GemfireTestRunner.nomock'] = System.getProperty('org.springframework.data.gemfire.test.GemfireTestRunner.nomock')
|
||||||
|
systemProperties['spring.profiles.active'] = 'apache-geode'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Common dependencies
|
// Common dependencies
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import javax.annotation.Resource;
|
|||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.BeanNameAware;
|
import org.springframework.beans.factory.BeanNameAware;
|
||||||
|
import org.springframework.data.gemfire.test.GemfireProfileValueSource;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
@@ -96,11 +97,35 @@ public class LookupRegionMutationIntegrationTest {
|
|||||||
assertEquals(expectedTimeout, expirationAttributes.getTimeout());
|
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) {
|
protected void assertGemFireComponent(Object gemfireComponent, String expectedName) {
|
||||||
assertNotNull("The GemFire component must not be null!", gemfireComponent);
|
assertNotNull("The GemFire component must not be null!", gemfireComponent);
|
||||||
assertEquals(expectedName, gemfireComponent.toString());
|
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) {
|
protected Collection<String> toStrings(Object[] objects) {
|
||||||
List<String> cacheListenerNames = new ArrayList<String>(objects.length);
|
List<String> cacheListenerNames = new ArrayList<String>(objects.length);
|
||||||
|
|
||||||
@@ -113,11 +138,7 @@ public class LookupRegionMutationIntegrationTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRegionConfiguration() {
|
public void testRegionConfiguration() {
|
||||||
assertNotNull("'/Example' Region was not properly initialized!", example);
|
assertRegionAttributes(example, "Example", DataPolicy.REPLICATE);
|
||||||
assertEquals("Example", example.getName());
|
|
||||||
assertEquals("/Example", example.getFullPath());
|
|
||||||
assertNotNull(example.getAttributes());
|
|
||||||
assertEquals(DataPolicy.REPLICATE, example.getAttributes().getDataPolicy());
|
|
||||||
assertEquals(13, example.getAttributes().getInitialCapacity());
|
assertEquals(13, example.getAttributes().getInitialCapacity());
|
||||||
assertEquals(0.85f, example.getAttributes().getLoadFactor(), 0.0f);
|
assertEquals(0.85f, example.getAttributes().getLoadFactor(), 0.0f);
|
||||||
assertCacheListeners(example.getAttributes().getCacheListeners(), Arrays.asList("A", "B"));
|
assertCacheListeners(example.getAttributes().getCacheListeners(), Arrays.asList("A", "B"));
|
||||||
@@ -132,12 +153,10 @@ public class LookupRegionMutationIntegrationTest {
|
|||||||
assertExpirationAttributes(example.getAttributes().getEntryTimeToLive(), "Entry TTL",
|
assertExpirationAttributes(example.getAttributes().getEntryTimeToLive(), "Entry TTL",
|
||||||
30, ExpirationAction.DESTROY);
|
30, ExpirationAction.DESTROY);
|
||||||
assertGemFireComponent(example.getAttributes().getCustomEntryIdleTimeout(), "E");
|
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());
|
assertNotNull(example.getAttributes().getAsyncEventQueueIds());
|
||||||
assertEquals(1, example.getAttributes().getAsyncEventQueueIds().size());
|
assertEquals(1, example.getAttributes().getAsyncEventQueueIds().size());
|
||||||
assertEquals("AEQ", example.getAttributes().getAsyncEventQueueIds().iterator().next());
|
assertEquals("AEQ", example.getAttributes().getAsyncEventQueueIds().iterator().next());
|
||||||
|
assertGatewaySenders(example, Arrays.asList("GWS"));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static interface Nameable extends BeanNameAware {
|
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.GemfireBeanFactoryLocator;
|
||||||
import org.springframework.data.gemfire.TestUtils;
|
import org.springframework.data.gemfire.TestUtils;
|
||||||
import org.springframework.data.gemfire.client.ClientCacheFactoryBean;
|
import org.springframework.data.gemfire.client.ClientCacheFactoryBean;
|
||||||
|
import org.springframework.data.gemfire.test.GemfireProfileValueSource;
|
||||||
import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer;
|
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.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
import org.springframework.test.util.ReflectionTestUtils;
|
import org.springframework.test.util.ReflectionTestUtils;
|
||||||
@@ -51,6 +54,7 @@ import com.gemstone.gemfire.cache.util.TimestampedEntryEvent;
|
|||||||
* @author John Blum
|
* @author John Blum
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@ProfileValueSourceConfiguration(GemfireProfileValueSource.class)
|
||||||
@ContextConfiguration(locations = "cache-ns.xml", initializers = GemfireTestApplicationContextInitializer.class)
|
@ContextConfiguration(locations = "cache-ns.xml", initializers = GemfireTestApplicationContextInitializer.class)
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class CacheNamespaceTest{
|
public class CacheNamespaceTest{
|
||||||
@@ -121,6 +125,8 @@ public class CacheNamespaceTest{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@IfProfileValue(name = GemfireProfileValueSource.PRODUCT_NAME_KEY,
|
||||||
|
value = GemfireProfileValueSource.PIVOTAL_GEMFIRE_PRODUCT_NAME)
|
||||||
public void testCacheWithGatewayConflictResolver() {
|
public void testCacheWithGatewayConflictResolver() {
|
||||||
Cache cache = context.getBean("cache-with-gateway-conflict-resolver", Cache.class);
|
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.Test;
|
||||||
import org.junit.runner.RunWith;
|
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.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.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
@@ -50,17 +55,18 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
|
|||||||
* @since 1.3.3
|
* @since 1.3.3
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@ProfileValueSourceConfiguration(GemfireProfileValueSource.class)
|
||||||
@ContextConfiguration(locations = "subregionsubelement-ns.xml",
|
@ContextConfiguration(locations = "subregionsubelement-ns.xml",
|
||||||
initializers = GemfireTestApplicationContextInitializer.class)
|
initializers = GemfireTestApplicationContextInitializer.class)
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class SubRegionSubElementNamespaceTest {
|
public class SubRegionSubElementNamespaceTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApplicationContext applicationContext;
|
||||||
|
|
||||||
@Resource(name = "/Customers/Accounts")
|
@Resource(name = "/Customers/Accounts")
|
||||||
private Region customersAccountsRegion;
|
private Region customersAccountsRegion;
|
||||||
|
|
||||||
@Resource(name = "/Orders/Items")
|
|
||||||
private Region orderItemsRegion;
|
|
||||||
|
|
||||||
@Resource(name = "/Parent/Child")
|
@Resource(name = "/Parent/Child")
|
||||||
private Region parentChildRegion;
|
private Region parentChildRegion;
|
||||||
|
|
||||||
@@ -81,7 +87,11 @@ public class SubRegionSubElementNamespaceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@IfProfileValue(name = GemfireProfileValueSource.PRODUCT_NAME_KEY,
|
||||||
|
value = GemfireProfileValueSource.PIVOTAL_GEMFIRE_PRODUCT_NAME)
|
||||||
public void testOrderItemsSubRegionGatewaySender() {
|
public void testOrderItemsSubRegionGatewaySender() {
|
||||||
|
Region orderItemsRegion = applicationContext.getBean("/Orders/Items", Region.class);
|
||||||
|
|
||||||
assertNotNull(orderItemsRegion);
|
assertNotNull(orderItemsRegion);
|
||||||
assertNotNull(orderItemsRegion.getAttributes());
|
assertNotNull(orderItemsRegion.getAttributes());
|
||||||
assertNotNull(orderItemsRegion.getAttributes().getGatewaySenderIds());
|
assertNotNull(orderItemsRegion.getAttributes().getGatewaySenderIds());
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import org.springframework.beans.BeansException;
|
|||||||
import org.springframework.beans.factory.BeanIsAbstractException;
|
import org.springframework.beans.factory.BeanIsAbstractException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
import org.springframework.data.gemfire.test.GemfireProfileValueSource;
|
||||||
import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer;
|
import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
@@ -180,14 +181,13 @@ public class TemplateRegionsNamespaceTests {
|
|||||||
assertEquals(expectedTimeout, expirationAttributes.getTimeout());
|
assertEquals(expectedTimeout, expirationAttributes.getTimeout());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertGatewaySenders(final Region<?, ?> region, final String... gatewaySenderNames) {
|
protected void assertGatewaySenders(final Region<?, ?> region, final String... gatewaySenderIds) {
|
||||||
assertNotNull(region);
|
if (GemfireProfileValueSource.isPivotalGemFire()) {
|
||||||
assertNotNull(region.getAttributes());
|
assertNotNull(region);
|
||||||
assertNotNull(region.getAttributes().getGatewaySenderIds());
|
assertNotNull(region.getAttributes());
|
||||||
assertEquals(gatewaySenderNames.length, region.getAttributes().getGatewaySenderIds().size());
|
assertNotNull(region.getAttributes().getGatewaySenderIds());
|
||||||
|
assertEquals(gatewaySenderIds.length, region.getAttributes().getGatewaySenderIds().size());
|
||||||
for (String gatewaySenderId : region.getAttributes().getGatewaySenderIds()) {
|
assertTrue(Arrays.asList(gatewaySenderIds).containsAll(region.getAttributes().getGatewaySenderIds()));
|
||||||
assertTrue(Arrays.asList(gatewaySenderNames).contains(gatewaySenderId));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,11 +447,13 @@ public class TemplateRegionsNamespaceTests {
|
|||||||
assertEquals(String.class, templateBasedReplicateRegionNoOverrides.getAttributes().getKeyConstraint());
|
assertEquals(String.class, templateBasedReplicateRegionNoOverrides.getAttributes().getKeyConstraint());
|
||||||
assertEquals(0.85f, templateBasedReplicateRegionNoOverrides.getAttributes().getLoadFactor(), 0.0f);
|
assertEquals(0.85f, templateBasedReplicateRegionNoOverrides.getAttributes().getLoadFactor(), 0.0f);
|
||||||
assertFalse(templateBasedReplicateRegionNoOverrides.getAttributes().isLockGrantor());
|
assertFalse(templateBasedReplicateRegionNoOverrides.getAttributes().isLockGrantor());
|
||||||
assertDefaultMembershipAttributes(templateBasedReplicateRegionNoOverrides.getAttributes().getMembershipAttributes());
|
assertDefaultMembershipAttributes(
|
||||||
|
templateBasedReplicateRegionNoOverrides.getAttributes().getMembershipAttributes());
|
||||||
assertNull(templateBasedReplicateRegionNoOverrides.getAttributes().getPartitionAttributes());
|
assertNull(templateBasedReplicateRegionNoOverrides.getAttributes().getPartitionAttributes());
|
||||||
assertEquals(Scope.DISTRIBUTED_ACK, templateBasedReplicateRegionNoOverrides.getAttributes().getScope());
|
assertEquals(Scope.DISTRIBUTED_ACK, templateBasedReplicateRegionNoOverrides.getAttributes().getScope());
|
||||||
assertTrue(templateBasedReplicateRegionNoOverrides.getAttributes().getStatisticsEnabled());
|
assertTrue(templateBasedReplicateRegionNoOverrides.getAttributes().getStatisticsEnabled());
|
||||||
assertSubscriptionAttributes(templateBasedReplicateRegionNoOverrides.getAttributes().getSubscriptionAttributes(),
|
assertSubscriptionAttributes(
|
||||||
|
templateBasedReplicateRegionNoOverrides.getAttributes().getSubscriptionAttributes(),
|
||||||
InterestPolicy.CACHE_CONTENT);
|
InterestPolicy.CACHE_CONTENT);
|
||||||
assertEquals(Object.class, templateBasedReplicateRegionNoOverrides.getAttributes().getValueConstraint());
|
assertEquals(Object.class, templateBasedReplicateRegionNoOverrides.getAttributes().getValueConstraint());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.springframework.data.gemfire.test;
|
package org.springframework.data.gemfire.test;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
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 PIVOTAL_GEMFIRE_PRODUCT_NAME = "Pivotal GemFire";
|
||||||
public static final String PRODUCT_NAME_KEY = "product.name";
|
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 {
|
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
|
@Override
|
||||||
public String get(final String key) {
|
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"/>
|
<bean id="B" class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest.TestCacheListener"/>
|
||||||
|
|
||||||
<gfe:lookup-region id="Example" cloning-enabled="true" eviction-maximum="1000">
|
<beans profile="apache-geode">
|
||||||
<gfe:cache-listener>
|
<gfe:lookup-region id="Example" cloning-enabled="true" eviction-maximum="1000">
|
||||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest.TestCacheListener" p:name="A"/>
|
<gfe:cache-listener>
|
||||||
<ref bean="B"/>
|
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest.TestCacheListener"
|
||||||
</gfe:cache-listener>
|
p:name="A"/>
|
||||||
<gfe:cache-loader>
|
<ref bean="B"/>
|
||||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheLoader" p:name="C"/>
|
</gfe:cache-listener>
|
||||||
</gfe:cache-loader>
|
<gfe:cache-loader>
|
||||||
<gfe:cache-writer>
|
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheLoader"
|
||||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheWriter" p:name="D"/>
|
p:name="C"/>
|
||||||
</gfe:cache-writer>
|
</gfe:cache-loader>
|
||||||
<gfe:region-ttl timeout="120" action="LOCAL_DESTROY"/>
|
<gfe:cache-writer>
|
||||||
<gfe:region-tti timeout="60" action="INVALIDATE"/>
|
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCacheWriter"
|
||||||
<gfe:entry-ttl timeout="30" action="DESTROY"/>
|
p:name="D"/>
|
||||||
<gfe:custom-entry-tti>
|
</gfe:cache-writer>
|
||||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCustomExpiry" p:name="E"/>
|
<gfe:region-ttl timeout="120" action="LOCAL_DESTROY"/>
|
||||||
</gfe:custom-entry-tti>
|
<gfe:region-tti timeout="60" action="INVALIDATE"/>
|
||||||
<gfe:gateway-sender name="GWS" remote-distributed-system-id="123" manual-start="true"/>
|
<gfe:entry-ttl timeout="30" action="DESTROY"/>
|
||||||
<gfe:async-event-queue name="AEQ" persistent="false" parallel="true" dispatcher-threads="8">
|
<gfe:custom-entry-tti>
|
||||||
<gfe:async-event-listener>
|
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestCustomExpiry"
|
||||||
<bean class="org.springframework.data.gemfire.LookupRegionMutationIntegrationTest$TestAsyncEventListener" p:name="F"/>
|
p:name="E"/>
|
||||||
</gfe:async-event-listener>
|
</gfe:custom-entry-tti>
|
||||||
</gfe:async-event-queue>
|
<gfe:async-event-queue name="AEQ" persistent="false" parallel="true" dispatcher-threads="8">
|
||||||
</gfe:lookup-region>
|
<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>
|
</beans>
|
||||||
|
|||||||
@@ -25,9 +25,6 @@
|
|||||||
</gfe:async-event-listener>
|
</gfe:async-event-listener>
|
||||||
</gfe:async-event-queue>
|
</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 -->
|
<!-- Template Regions -->
|
||||||
<gfe:region-template id="BaseRegionTemplate" cloning-enabled="true" concurrency-checks-enabled="false"
|
<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"
|
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"/>
|
<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 -->
|
<!-- LOCAL Regions -->
|
||||||
<gfe:local-region-template id="LocalRegionTemplate" concurrency-level="8" template="BaseRegionTemplate">
|
<gfe:local-region-template id="LocalRegionTemplate" concurrency-level="8" template="BaseRegionTemplate">
|
||||||
<gfe:eviction type="ENTRY_COUNT" threshold="4096" action="LOCAL_DESTROY"/>
|
<gfe:eviction type="ENTRY_COUNT" threshold="4096" action="LOCAL_DESTROY"/>
|
||||||
@@ -133,4 +99,68 @@
|
|||||||
|
|
||||||
<gfe:local-region id="TemplateBasedLocalRegion" template="LocalRegionTemplate"/>
|
<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>
|
</beans>
|
||||||
|
|||||||
@@ -23,12 +23,6 @@
|
|||||||
<gfe:cache id="cache-with-xml-and-props" cache-xml-location="classpath:gemfire-cache.xml" properties-ref="gemfireProperties"
|
<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"/>
|
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-disabled" enable-auto-reconnect="false"/>
|
||||||
|
|
||||||
<gfe:cache id="cache-with-auto-reconnect-enabled" enable-auto-reconnect="true"/>
|
<gfe:cache id="cache-with-auto-reconnect-enabled" enable-auto-reconnect="true"/>
|
||||||
@@ -45,4 +39,12 @@
|
|||||||
<gfe:server host="localhost" port="1234"/>
|
<gfe:server host="localhost" port="1234"/>
|
||||||
</gfe:pool>
|
</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>
|
</beans>
|
||||||
|
|||||||
@@ -36,11 +36,13 @@
|
|||||||
</gfe:replicated-region>
|
</gfe:replicated-region>
|
||||||
</gfe:replicated-region>
|
</gfe:replicated-region>
|
||||||
|
|
||||||
<gfe:replicated-region id="Orders" persistent="false">
|
<beans profile="pivotal-gemfire">
|
||||||
<gfe:replicated-region name="Items" persistent="false">
|
<gfe:replicated-region id="Orders" persistent="false">
|
||||||
<gfe:gateway-sender remote-distributed-system-id="21" name="testSender" parallel="false"
|
<gfe:replicated-region name="Items" persistent="false">
|
||||||
manual-start="true"/>
|
<gfe:gateway-sender remote-distributed-system-id="21" name="testSender" parallel="false"
|
||||||
|
manual-start="true"/>
|
||||||
|
</gfe:replicated-region>
|
||||||
</gfe:replicated-region>
|
</gfe:replicated-region>
|
||||||
</gfe:replicated-region>
|
</beans>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
|||||||
Reference in New Issue
Block a user