Implements JIRA feature request SGF-309 adding support for compression of GemFire Cache Region data using the new Compressor attribute and property in the RegionAttributes API.

This commit is contained in:
John Blum
2014-08-28 15:32:11 -07:00
parent b9a966e11a
commit 84be164f60
14 changed files with 308 additions and 81 deletions

View File

@@ -345,6 +345,7 @@ public class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V> imple
validateRegionAttributes(regionAttributes);
regionFactory.setCloningEnabled(regionAttributes.getCloningEnabled());
regionFactory.setCompressor(regionAttributes.getCompressor());
regionFactory.setConcurrencyChecksEnabled(regionAttributes.getConcurrencyChecksEnabled());
regionFactory.setConcurrencyLevel(regionAttributes.getConcurrencyLevel());
regionFactory.setCustomEntryIdleTimeout(regionAttributes.getCustomEntryIdleTimeout());

View File

@@ -105,6 +105,7 @@ public class ClientRegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V>
// map region attributes onto the client region factory
if (attributes != null) {
factory.setCloningEnabled(attributes.getCloningEnabled());
factory.setCompressor(attributes.getCompressor());
factory.setConcurrencyLevel(attributes.getConcurrencyLevel());
factory.setCustomEntryIdleTimeout(attributes.getCustomEntryIdleTimeout());
factory.setCustomEntryTimeToLive(attributes.getCustomEntryTimeToLive());

View File

@@ -91,9 +91,10 @@ abstract class AbstractRegionParser extends AbstractSingleBeanDefinitionParser {
ParsingUtils.parseOptionalRegionAttributes(parserContext, element, regionAttributesBuilder);
ParsingUtils.parseSubscription(parserContext, element, regionAttributesBuilder);
ParsingUtils.parseStatistics(element, regionAttributesBuilder);
ParsingUtils.parseMembershipAttributes(parserContext, element, regionAttributesBuilder);
ParsingUtils.parseExpiration(parserContext, element, regionAttributesBuilder);
ParsingUtils.parseEviction(parserContext, element, regionAttributesBuilder);
ParsingUtils.parseMembershipAttributes(parserContext, element, regionAttributesBuilder);
ParsingUtils.parseCompressor(parserContext, element, regionAttributesBuilder);
String enableGateway = element.getAttribute("enable-gateway");
String hubId = element.getAttribute("hub-id");
@@ -133,11 +134,11 @@ abstract class AbstractRegionParser extends AbstractSingleBeanDefinitionParser {
}
else if (subElement.getLocalName().equals("cache-loader")) {
builder.addPropertyValue("cacheLoader",
ParsingUtils.parseRefOrNestedBeanDeclaration(parserContext, subElement, builder));
ParsingUtils.parseRefOrSingleNestedBeanDeclaration(parserContext, subElement, builder));
}
else if (subElement.getLocalName().equals("cache-writer")) {
builder.addPropertyValue("cacheWriter",
ParsingUtils.parseRefOrNestedBeanDeclaration(parserContext, subElement, builder));
ParsingUtils.parseRefOrSingleNestedBeanDeclaration(parserContext, subElement, builder));
}
}

View File

@@ -76,6 +76,7 @@ class ClientRegionParser extends AbstractRegionParser {
ParsingUtils.parseStatistics(element, regionAttributesBuilder);
ParsingUtils.parseExpiration(parserContext, element, regionAttributesBuilder);
ParsingUtils.parseEviction(parserContext, element, regionAttributesBuilder);
ParsingUtils.parseCompressor(parserContext, element, regionAttributesBuilder);
builder.addPropertyValue("attributes", regionAttributesBuilder.getBeanDefinition());

View File

@@ -432,6 +432,17 @@ abstract class ParsingUtils {
return false;
}
public static void parseCompressor(ParserContext parserContext, Element element,
BeanDefinitionBuilder regionAttributesBuilder) {
Element compressorElement = DomUtils.getChildElementByTagName(element, "compressor");
if (compressorElement != null) {
regionAttributesBuilder.addPropertyValue("compressor", parseRefOrSingleNestedBeanDeclaration(
parserContext, compressorElement, regionAttributesBuilder));
}
}
static String resolveCacheReference(final String cacheRef) {
return (StringUtils.hasText(cacheRef) ? cacheRef : GemfireConstants.DEFAULT_GEMFIRE_CACHE_NAME);
}

View File

@@ -522,6 +522,19 @@ use inner bean declarations.
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="compressor" type="beanDeclarationType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation source="com.gemstone.gemfire.compression.Compressor"><![CDATA[
The Compressor definition for this Region. A Compressor registers a custom class that implements Compressor
to support compression on a Region.
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation>
<tool:exports type="com.gemstone.gemfire.compression.Compressor"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="region-ttl" type="expirationType"
minOccurs="0" maxOccurs="1">
<xsd:annotation>

View File

@@ -51,15 +51,19 @@ import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache.util.ObjectSizer;
import com.gemstone.gemfire.compression.Compressor;
/**
* The ClientRegionNamespaceTest class is a test suite of test cases testing the contract and functionality
* of GemFire Client Region namespace support in SDG.
*
* @author Costin Leau
* @author David Turanski
* @author John Blum
*/
@ContextConfiguration(locations="/org/springframework/data/gemfire/config/client-ns.xml",
initializers=GemfireTestApplicationContextInitializer.class)
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="client-ns.xml", initializers=GemfireTestApplicationContextInitializer.class)
@SuppressWarnings("unused")
public class ClientRegionNamespaceTest {
@Autowired
@@ -152,7 +156,24 @@ public class ClientRegionNamespaceTest {
assertTrue(TestUtils.readField("cacheWriter", factory) instanceof TestCacheWriter);
}
@SuppressWarnings("unused")
@Test
public void testCompressedReplicateRegion() {
assertTrue(context.containsBean("compressed"));
Region<?, ?> compressed = context.getBean("compressed", Region.class);
assertNotNull("The 'compressed' Client Region was not properly configured and initialized!", compressed);
assertEquals("compressed", compressed.getName());
assertEquals(Region.SEPARATOR + "compressed", compressed.getFullPath());
assertNotNull(compressed.getAttributes());
assertEquals(DataPolicy.EMPTY, compressed.getAttributes().getDataPolicy());
assertEquals("gemfire-pool", compressed.getAttributes().getPoolName());
assertTrue(String.format("Expected 'TestCompressor'; but was '%1$s'!",
ObjectUtils.nullSafeClassName(compressed.getAttributes().getCompressor())),
compressed.getAttributes().getCompressor() instanceof TestCompressor);
assertEquals("STD", compressed.getAttributes().getCompressor().toString());
}
public static final class TestCacheLoader implements CacheLoader<Object, Object> {
@Override
@@ -168,4 +189,28 @@ public class ClientRegionNamespaceTest {
public static final class TestCacheWriter extends CacheWriterAdapter<Object, Object> {
}
public static class TestCompressor implements Compressor {
private String name;
public void setName(final String name) {
this.name = name;
}
@Override
public byte[] compress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!");
}
@Override
public byte[] decompress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!");
}
@Override
public String toString() {
return this.name;
}
}
}

View File

@@ -18,7 +18,7 @@ package org.springframework.data.gemfire.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@@ -40,14 +40,18 @@ import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.compression.Compressor;
/**
* The LocalRegionNamespaceTest class is a test suite of test cases testing the contract and functionality
* of GemFire's Local Region support in SDG.
*
* @author Costin Leau
* @author David Turanski
* @author John Blum
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="local-ns.xml",
initializers=GemfireTestApplicationContextInitializer.class)
@ContextConfiguration(locations="local-ns.xml", initializers=GemfireTestApplicationContextInitializer.class)
public class LocalRegionNamespaceTest {
@Autowired
@@ -71,8 +75,8 @@ public class LocalRegionNamespaceTest {
assertFalse(attrs.getPublisher());
}
@SuppressWarnings("rawtypes")
@Test
@SuppressWarnings("rawtypes")
public void testComplexLocal() throws Exception {
assertTrue(context.containsBean("complex"));
RegionFactoryBean fb = context.getBean("&complex", RegionFactoryBean.class);
@@ -85,8 +89,8 @@ public class LocalRegionNamespaceTest {
assertSame(context.getBean("c-writer"), TestUtils.readField("cacheWriter", fb));
}
@SuppressWarnings("rawtypes")
@Test
@SuppressWarnings("rawtypes")
public void testLocalWithAttributes() throws Exception {
assertTrue(context.containsBean("local-with-attributes"));
Region region = context.getBean("local-with-attributes", Region.class);
@@ -99,8 +103,8 @@ public class LocalRegionNamespaceTest {
assertEquals(true, attrs.isDiskSynchronous());
}
@SuppressWarnings("rawtypes")
@Test
@SuppressWarnings("rawtypes")
public void testRegionLookup() throws Exception {
Cache cache = context.getBean(Cache.class);
Region existing = cache.createRegionFactory().create("existing");
@@ -111,11 +115,52 @@ public class LocalRegionNamespaceTest {
assertEquals(existing, context.getBean("lookup"));
}
@SuppressWarnings("rawtypes")
@Test
@SuppressWarnings("rawtypes")
public void testLocalPersistent() {
Region region = context.getBean("persistent", Region.class);
RegionAttributes attrs = region.getAttributes();
assertTrue(attrs.getDataPolicy().withPersistence());
}
@Test
public void testCompressedLocalRegion() {
assertTrue(context.containsBean("compressed"));
Region<?, ?> compressed = context.getBean("compressed", Region.class);
assertNotNull("The 'compressed' Local Region was not properly configured and initialized!", compressed);
assertEquals("compressed", compressed.getName());
assertEquals(Region.SEPARATOR + "compressed", compressed.getFullPath());
assertNotNull(compressed.getAttributes());
assertEquals(DataPolicy.NORMAL, compressed.getAttributes().getDataPolicy());
assertEquals(Scope.LOCAL, compressed.getAttributes().getScope());
assertTrue(compressed.getAttributes().getCompressor() instanceof TestCompressor);
assertEquals("ABC", compressed.getAttributes().getCompressor().toString());
}
public static class TestCompressor implements Compressor {
private String name;
public void setName(final String name) {
this.name = name;
}
@Override
public byte[] compress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!");
}
@Override
public byte[] decompress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!");
}
@Override
public String toString() {
return this.name;
}
}
}

View File

@@ -47,6 +47,7 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.partition.PartitionListener;
import com.gemstone.gemfire.cache.partition.PartitionListenerAdapter;
import com.gemstone.gemfire.compression.Compressor;
/**
* The PartitionRegionNamespaceTest class is a test suite of test cases testing the contract and functionality
@@ -131,9 +132,24 @@ public class PartitionedRegionNamespaceTest {
assertTrue(complexRegionPartitionAttributes.getPartitionListeners()[0] instanceof TestPartitionListener);
}
@Test
public void testCompressedPartitionRegion() {
assertTrue(context.containsBean("compressed"));
Region<?, ?> compressed = context.getBean("compressed", Region.class);
assertNotNull("The 'compressed' PARTITION Region was not properly configured and initialized!", compressed);
assertEquals("compressed", compressed.getName());
assertEquals(Region.SEPARATOR + "compressed", compressed.getFullPath());
assertNotNull(compressed.getAttributes());
assertEquals(DataPolicy.PARTITION, compressed.getAttributes().getDataPolicy());
assertTrue(compressed.getAttributes().getCompressor() instanceof TestCompressor);
assertEquals("testCompressor", compressed.getAttributes().getCompressor().toString());
}
@Test
@SuppressWarnings("rawtypes")
public void testFixedPartition() throws Exception {
public void testFixedPartitionRegion() throws Exception {
RegionFactoryBean fixedRegionFactoryBean = context.getBean("&fixed", RegionFactoryBean.class);
assertNotNull(fixedRegionFactoryBean);
@@ -203,6 +219,30 @@ public class PartitionedRegionNamespaceTest {
assertEquals("ABC", listenersPartitionAttributes.getPartitionListeners()[0].toString());
}
public static class TestCompressor implements Compressor {
private String name;
public void setName(final String name) {
this.name = name;
}
@Override
public byte[] compress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!");
}
@Override
public byte[] decompress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!");
}
@Override
public String toString() {
return this.name;
}
}
public static class TestPartitionListener extends PartitionListenerAdapter {
private String name;

View File

@@ -18,6 +18,7 @@ package org.springframework.data.gemfire.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
@@ -36,17 +37,23 @@ import org.springframework.util.ObjectUtils;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheListener;
import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.compression.Compressor;
/**
* The ReplicatedRegionNamespaceTest class is a test suite of test cases testing the contract and functionality
* of GemFire Replicated Region support in SDG.
*
* @author Costin Leau
* @author David Turanski
* @author John Blum
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="replicated-ns.xml",
initializers=GemfireTestApplicationContextInitializer.class)
@ContextConfiguration(locations="replicated-ns.xml", initializers=GemfireTestApplicationContextInitializer.class)
@SuppressWarnings("unused")
public class ReplicatedRegionNamespaceTest {
@Autowired
@@ -74,8 +81,8 @@ public class ReplicatedRegionNamespaceTest {
assertTrue(attrs.getConcurrencyChecksEnabled());
}
@SuppressWarnings("rawtypes")
@Test
@SuppressWarnings("rawtypes")
public void testComplexReplica() throws Exception {
assertTrue(context.containsBean("complex"));
RegionFactoryBean fb = context.getBean("&complex", RegionFactoryBean.class);
@@ -88,8 +95,8 @@ public class ReplicatedRegionNamespaceTest {
assertSame(context.getBean("c-writer"), TestUtils.readField("cacheWriter", fb));
}
@SuppressWarnings("rawtypes")
@Test
@SuppressWarnings("rawtypes")
public void testReplicaWithAttributes() throws Exception {
assertTrue(context.containsBean("replicated-with-attributes"));
Region region = context.getBean("replicated-with-attributes", Region.class);
@@ -111,8 +118,8 @@ public class ReplicatedRegionNamespaceTest {
assertEquals(true, attrs.getMulticastEnabled());
}
@SuppressWarnings("rawtypes")
@Test
@SuppressWarnings("rawtypes")
public void testRegionLookup() throws Exception {
Cache cache = context.getBean(Cache.class);
Region existing = cache.createRegionFactory().create("existing");
@@ -121,5 +128,45 @@ public class ReplicatedRegionNamespaceTest {
assertEquals("existing", TestUtils.readField("name", lfb));
assertEquals(existing, context.getBean("lookup"));
}
@Test
public void testCompressedReplicateRegion() {
assertTrue(context.containsBean("compressed"));
Region<?, ?> compressed = context.getBean("compressed", Region.class);
assertNotNull("The 'compressed' REPLICATE Region was not properly configured and initialized!", compressed);
assertEquals("compressed", compressed.getName());
assertEquals(Region.SEPARATOR + "compressed", compressed.getFullPath());
assertNotNull(compressed.getAttributes());
assertEquals(DataPolicy.REPLICATE, compressed.getAttributes().getDataPolicy());
assertTrue(compressed.getAttributes().getCompressor() instanceof TestCompressor);
assertEquals("XYZ", compressed.getAttributes().getCompressor().toString());
}
public static class TestCompressor implements Compressor {
private String name;
public void setName(final String name) {
this.name = name;
}
@Override
public byte[] compress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!");
}
@Override
public byte[] decompress(final byte[] input) {
throw new UnsupportedOperationException("Not Implemented!");
}
@Override
public String toString() {
return this.name;
}
}
}

View File

@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
default-lazy-init="true"
xsi:schemaLocation="http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
" default-lazy-init="true">
<gfe:client-cache />
<gfe:client-cache/>
<gfe:client-region id="simple" name="SimpleRegion"/>
@@ -53,4 +52,10 @@
</gfe:cache-writer>
</gfe:client-region>
<gfe:client-region id="compressed" pool-name="gemfire-pool" shortcut="PROXY">
<gfe:compressor ref="testCompressor"/>
</gfe:client-region>
<bean id="testCompressor" class="org.springframework.data.gemfire.config.ClientRegionNamespaceTest$TestCompressor" p:name="STD"/>
</beans>

View File

@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:p="http://www.springframework.org/schema/p"
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/util http://www.springframework.org/schema/util/spring-util.xsd" default-lazy-init="true">
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
" default-lazy-init="true">
<gfe:cache />
<gfe:cache/>
<gfe:local-region id="simple" />
<gfe:local-region id="pub" name="publisher"/>
<gfe:local-region id="persistent" persistent="true"/>
<gfe:local-region id="complex" close="true" destroy="false">
<gfe:cache-listener>
<ref bean="c-listener"/>
@@ -24,20 +24,26 @@
<gfe:cache-loader ref="c-loader"/>
<gfe:cache-writer ref="c-writer"/>
</gfe:local-region>
<gfe:local-region id="local-with-attributes"
disk-synchronous="true"
ignore-jta="true"
index-update-type="asynchronous"
initial-capacity="10"
key-constraint="java.lang.String"
value-constraint="java.lang.String"
data-policy="PRELOADED"
/>
<gfe:local-region id="local-with-attributes"
data-policy="PRELOADED"
disk-synchronous="true"
ignore-jta="true"
index-update-type="asynchronous"
initial-capacity="10"
key-constraint="java.lang.String"
value-constraint="java.lang.String"
/>
<gfe:local-region id="compressed" persistent="false">
<gfe:compressor>
<bean class="org.springframework.data.gemfire.config.LocalRegionNamespaceTest$TestCompressor" p:name="ABC"/>
</gfe:compressor>
</gfe:local-region>
<bean id="c-listener" class="org.springframework.data.gemfire.SimpleCacheListener"/>
<bean id="c-loader" class="org.springframework.data.gemfire.SimpleCacheLoader"/>
<bean id="c-writer" class="org.springframework.data.gemfire.SimpleCacheWriter"/>
<gfe:lookup-region id="lookup" name="existing"/>
</beans>
</beans>

View File

@@ -42,6 +42,12 @@
</gfe:partition-listener>
</gfe:partitioned-region>
<gfe:partitioned-region id="compressed" persistent="false">
<gfe:compressor>
<bean class="org.springframework.data.gemfire.config.PartitionedRegionNamespaceTest$TestCompressor" p:name="testCompressor"/>
</gfe:compressor>
</gfe:partitioned-region>
<gfe:partitioned-region id="fixed">
<gfe:fixed-partition partition-name="p1" primary="true" num-buckets="3"/>
<gfe:fixed-partition partition-name="p2"/>

View File

@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:p="http://www.springframework.org/schema/p"
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/util http://www.springframework.org/schema/util/spring-util.xsd" default-lazy-init="true">
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
" default-lazy-init="true">
<gfe:cache/>
<gfe:replicated-region id="simple" close="false" concurrency-checks-enabled="false"/>
<gfe:cache />
<gfe:replicated-region id="simple" close="false" concurrency-checks-enabled="false" />
<gfe:replicated-region id="pub" name="publisher"/>
<gfe:replicated-region id="complex" close="true" destroy="false">
<gfe:cache-listener>
<ref bean="c-listener"/>
@@ -22,27 +22,32 @@
<gfe:cache-loader ref="c-loader"/>
<gfe:cache-writer ref="c-writer"/>
</gfe:replicated-region>
<gfe:replicated-region id="replicated-with-attributes"
disk-synchronous="true"
ignore-jta="true"
index-update-type="asynchronous"
initial-capacity="10"
key-constraint="java.lang.String"
value-constraint="java.lang.String"
scope="global"
is-lock-grantor="true"
enable-async-conflation="true"
enable-subscription-conflation="true"
load-factor="0.5"
cloning-enabled="false"
concurrency-level="10"
multicast-enabled="true"
/>
<gfe:replicated-region id="replicated-with-attributes"
cloning-enabled="false"
concurrency-level="10"
disk-synchronous="true"
enable-async-conflation="true"
enable-subscription-conflation="true"
ignore-jta="true"
index-update-type="asynchronous"
initial-capacity="10"
is-lock-grantor="true"
key-constraint="java.lang.String"
load-factor="0.5"
multicast-enabled="true"
scope="global"
value-constraint="java.lang.String"/>
<gfe:replicated-region id="compressed" persistent="false">
<gfe:compressor ref="testCompressor"/>
</gfe:replicated-region>
<bean id="c-listener" class="org.springframework.data.gemfire.SimpleCacheListener"/>
<bean id="c-loader" class="org.springframework.data.gemfire.SimpleCacheLoader"/>
<bean id="c-writer" class="org.springframework.data.gemfire.SimpleCacheWriter"/>
<bean id="testCompressor" class="org.springframework.data.gemfire.config.ReplicatedRegionNamespaceTest$TestCompressor" p:name="XYZ"/>
<gfe:lookup-region id="lookup" name="existing"/>
</beans>
</beans>