DATAGEODE-1 - Remove support for DynamicRegionFactory.

Resolves gh-29.
This commit is contained in:
Patrick Johnson
2019-10-17 17:32:19 -07:00
committed by John Blum
parent dc0d14b8ee
commit 1a012c992a
12 changed files with 10 additions and 294 deletions

View File

@@ -121,9 +121,7 @@ or child elements, as the following listing shows:
<gfe:gateway-conflict-resolver ref="myGatewayConflictResolver"/> <!--7--> <gfe:gateway-conflict-resolver ref="myGatewayConflictResolver"/> <!--7-->
<gfe:dynamic-region-factory/> <!--8--> <gfe:jndi-binding jndi-name="myDataSource" type="ManagedDataSource"/> <!--8-->
<gfe:jndi-binding jndi-name="myDataSource" type="ManagedDataSource"/> <!--9-->
</gfe:cache> </gfe:cache>
---- ----
@@ -157,9 +155,8 @@ must implement {x-data-store-javadoc}/org/apache/geode/cache/util/GatewayConflic
[GatewayConflictResolver]. [GatewayConflictResolver].
A `GatewayConflictResolver` is a `Cache`-level plugin that is called upon to decide what to do with events A `GatewayConflictResolver` is a `Cache`-level plugin that is called upon to decide what to do with events
that originate in other systems and arrive through the WAN Gateway. that originate in other systems and arrive through the WAN Gateway.
<8> Enables {data-store-name}'s {x-data-store-docs}/developing/region_options/dynamic_region_creation.html[DynamicRegionFactory],
which provides a distributed Region creation service. which provides a distributed Region creation service.
<9> Declares a JNDI binding to enlist an external DataSource in a {data-store-name} transaction. <8> Declares a JNDI binding to enlist an external DataSource in a {data-store-name} transaction.
[[bootstrap:cache:pdx-serialization]] [[bootstrap:cache:pdx-serialization]]
=== Enabling PDX Serialization === Enabling PDX Serialization

View File

@@ -41,7 +41,6 @@ import org.apache.geode.GemFireException;
import org.apache.geode.cache.Cache; import org.apache.geode.cache.Cache;
import org.apache.geode.cache.CacheClosedException; import org.apache.geode.cache.CacheClosedException;
import org.apache.geode.cache.CacheFactory; import org.apache.geode.cache.CacheFactory;
import org.apache.geode.cache.DynamicRegionFactory;
import org.apache.geode.cache.GemFireCache; import org.apache.geode.cache.GemFireCache;
import org.apache.geode.cache.RegionService; import org.apache.geode.cache.RegionService;
import org.apache.geode.cache.TransactionListener; import org.apache.geode.cache.TransactionListener;
@@ -87,11 +86,11 @@ import org.springframework.util.StringUtils;
* @author Costin Leau * @author Costin Leau
* @author David Turanski * @author David Turanski
* @author John Blum * @author John Blum
* @author Patrick Johnson
* @see java.util.Properties * @see java.util.Properties
* @see org.apache.geode.cache.Cache * @see org.apache.geode.cache.Cache
* @see org.apache.geode.cache.CacheFactory * @see org.apache.geode.cache.CacheFactory
* @see org.apache.geode.cache.GemFireCache * @see org.apache.geode.cache.GemFireCache
* @see org.apache.geode.cache.DynamicRegionFactory
* @see org.apache.geode.cache.RegionService * @see org.apache.geode.cache.RegionService
* @see org.apache.geode.distributed.DistributedMember * @see org.apache.geode.distributed.DistributedMember
* @see org.apache.geode.distributed.DistributedSystem * @see org.apache.geode.distributed.DistributedSystem
@@ -127,8 +126,6 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
private GemFireCache cache; private GemFireCache cache;
private DynamicRegionSupport dynamicRegionSupport;
private Float criticalHeapPercentage; private Float criticalHeapPercentage;
private Float criticalOffHeapPercentage; private Float criticalOffHeapPercentage;
private Float evictionHeapPercentage; private Float evictionHeapPercentage;
@@ -321,7 +318,6 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
catch (CacheClosedException cause) { catch (CacheClosedException cause) {
this.cacheResolutionMessagePrefix = "Created new"; this.cacheResolutionMessagePrefix = "Created new";
initDynamicRegionFactory();
return (T) createCache(postProcess(configureFactory(initializeFactory(createFactory(resolveProperties()))))); return (T) createCache(postProcess(configureFactory(initializeFactory(createFactory(resolveProperties())))));
} }
@@ -342,17 +338,6 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
return (T) Optional.ofNullable(getCache()).orElseGet(CacheFactory::getAnyInstance); return (T) Optional.ofNullable(getCache()).orElseGet(CacheFactory::getAnyInstance);
} }
/**
* If Pivotal GemFire/Apache Geode Dynamic Regions are enabled, create and initialize a {@link DynamicRegionFactory}
* before creating the {@link Cache}.
*
* @see org.springframework.data.gemfire.CacheFactoryBean.DynamicRegionSupport#initDynamicRegionFactory()
* @see #getDynamicRegionSupport()
*/
private void initDynamicRegionFactory() {
Optional.ofNullable(getDynamicRegionSupport()).ifPresent(DynamicRegionSupport::initializeDynamicRegionFactory);
}
/** /**
* Resolves the Pivotal GemFire/Apache Geode {@link Properties} used to configure the {@link Cache}. * Resolves the Pivotal GemFire/Apache Geode {@link Properties} used to configure the {@link Cache}.
* *
@@ -947,22 +932,6 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
return this.criticalOffHeapPercentage; return this.criticalOffHeapPercentage;
} }
/**
* Sets an instance of the DynamicRegionSupport to support Dynamic Regions in this GemFire Cache.
*
* @param dynamicRegionSupport the DynamicRegionSupport class to setup Dynamic Regions in this Cache.
*/
public void setDynamicRegionSupport(DynamicRegionSupport dynamicRegionSupport) {
this.dynamicRegionSupport = dynamicRegionSupport;
}
/**
* @return the dynamicRegionSupport
*/
public DynamicRegionSupport getDynamicRegionSupport() {
return dynamicRegionSupport;
}
/** /**
* Controls whether auto-reconnect functionality introduced in GemFire 8 is enabled or not. * Controls whether auto-reconnect functionality introduced in GemFire 8 is enabled or not.
* *
@@ -1366,58 +1335,6 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
} }
public static class DynamicRegionSupport {
private Boolean persistent = Boolean.TRUE;
private Boolean registerInterest = Boolean.TRUE;
private String diskDirectory;
private String poolName;
public void setDiskDir(String diskDirectory) {
this.diskDirectory = diskDirectory;
}
public String getDiskDir() {
return diskDirectory;
}
public void setPersistent(Boolean persistent) {
this.persistent = persistent;
}
public Boolean getPersistent() {
return persistent;
}
public void setPoolName(String poolName) {
this.poolName = poolName;
}
public String getPoolName() {
return poolName;
}
public void setRegisterInterest(Boolean registerInterest) {
this.registerInterest = registerInterest;
}
public Boolean getRegisterInterest() {
return registerInterest;
}
public void initializeDynamicRegionFactory() {
File localDiskDirectory = this.diskDirectory != null ? new File(this.diskDirectory) : null;
DynamicRegionFactory.Config config =
new DynamicRegionFactory.Config(localDiskDirectory, this.poolName, this.persistent,
this.registerInterest);
DynamicRegionFactory.get().open(config);
}
}
public static class JndiDataSource { public static class JndiDataSource {
private List<ConfigProperty> configProperties; private List<ConfigProperty> configProperties;

View File

@@ -17,7 +17,6 @@
package org.springframework.data.gemfire.config.annotation; package org.springframework.data.gemfire.config.annotation;
import static org.springframework.data.gemfire.CacheFactoryBean.DynamicRegionSupport;
import static org.springframework.data.gemfire.CacheFactoryBean.JndiDataSource; import static org.springframework.data.gemfire.CacheFactoryBean.JndiDataSource;
import static org.springframework.data.gemfire.util.CollectionUtils.nullSafeList; import static org.springframework.data.gemfire.util.CollectionUtils.nullSafeList;
@@ -59,6 +58,7 @@ import org.springframework.util.StringUtils;
* and {@link org.apache.geode.cache.client.ClientCache client caches}. * and {@link org.apache.geode.cache.client.ClientCache client caches}.
* *
* @author John Blum * @author John Blum
* @author Patrick Johnson
* @see java.lang.annotation.Annotation * @see java.lang.annotation.Annotation
* @see java.util.Properties * @see java.util.Properties
* @see org.apache.geode.cache.Cache * @see org.apache.geode.cache.Cache
@@ -110,8 +110,6 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
private boolean copyOnRead = DEFAULT_COPY_ON_READ; private boolean copyOnRead = DEFAULT_COPY_ON_READ;
private boolean useBeanFactoryLocator = DEFAULT_USE_BEAN_FACTORY_LOCATOR; private boolean useBeanFactoryLocator = DEFAULT_USE_BEAN_FACTORY_LOCATOR;
private DynamicRegionSupport dynamicRegionSupport;
private Integer mcastPort = DEFAULT_MCAST_PORT; private Integer mcastPort = DEFAULT_MCAST_PORT;
private Float criticalHeapPercentage; private Float criticalHeapPercentage;
@@ -345,7 +343,6 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
gemfireCache.setCopyOnRead(getCopyOnRead()); gemfireCache.setCopyOnRead(getCopyOnRead());
gemfireCache.setCriticalHeapPercentage(getCriticalHeapPercentage()); gemfireCache.setCriticalHeapPercentage(getCriticalHeapPercentage());
gemfireCache.setCriticalOffHeapPercentage(getCriticalOffHeapPercentage()); gemfireCache.setCriticalOffHeapPercentage(getCriticalOffHeapPercentage());
gemfireCache.setDynamicRegionSupport(getDynamicRegionSupport());
gemfireCache.setEvictionHeapPercentage(getEvictionHeapPercentage()); gemfireCache.setEvictionHeapPercentage(getEvictionHeapPercentage());
gemfireCache.setEvictionOffHeapPercentage(getEvictionOffHeapPercentage()); gemfireCache.setEvictionOffHeapPercentage(getEvictionOffHeapPercentage());
gemfireCache.setGatewayConflictResolver(getGatewayConflictResolver()); gemfireCache.setGatewayConflictResolver(getGatewayConflictResolver());
@@ -499,14 +496,6 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
return this.criticalOffHeapPercentage; return this.criticalOffHeapPercentage;
} }
void setDynamicRegionSupport(DynamicRegionSupport dynamicRegionSupport) {
this.dynamicRegionSupport = dynamicRegionSupport;
}
protected DynamicRegionSupport getDynamicRegionSupport() {
return this.dynamicRegionSupport;
}
void setEvictionHeapPercentage(Float evictionHeapPercentage) { void setEvictionHeapPercentage(Float evictionHeapPercentage) {
this.evictionHeapPercentage = evictionHeapPercentage; this.evictionHeapPercentage = evictionHeapPercentage;
} }

View File

@@ -49,6 +49,7 @@ import org.springframework.util.xml.DomUtils;
* @author Oliver Gierke * @author Oliver Gierke
* @author David Turanski * @author David Turanski
* @author John Blum * @author John Blum
* @author Patrick Johnson
* @see org.springframework.beans.factory.support.AbstractBeanDefinition * @see org.springframework.beans.factory.support.AbstractBeanDefinition
* @see org.springframework.beans.factory.support.BeanDefinitionBuilder * @see org.springframework.beans.factory.support.BeanDefinitionBuilder
* @see org.springframework.beans.factory.support.BeanDefinitionRegistry * @see org.springframework.beans.factory.support.BeanDefinitionRegistry
@@ -129,7 +130,6 @@ class CacheParser extends AbstractSingleBeanDefinitionParser {
gatewayConflictResolver, parserContext, cacheBuilder)); gatewayConflictResolver, parserContext, cacheBuilder));
} }
parseDynamicRegionFactory(element, cacheBuilder);
parseJndiBindings(element, cacheBuilder); parseJndiBindings(element, cacheBuilder);
} }
@@ -173,56 +173,6 @@ class CacheParser extends AbstractSingleBeanDefinitionParser {
return builder.getBeanDefinition(); return builder.getBeanDefinition();
} }
private void parseDynamicRegionFactory(Element element, BeanDefinitionBuilder cacheBuilder) {
Element dynamicRegionFactory =
DomUtils.getChildElementByTagName(element, "dynamic-region-factory");
if (dynamicRegionFactory != null) {
BeanDefinitionBuilder dynamicRegionSupport = buildDynamicRegionSupport(dynamicRegionFactory);
postProcessDynamicRegionSupport(element, dynamicRegionSupport);
cacheBuilder.addPropertyValue("dynamicRegionSupport", dynamicRegionSupport.getBeanDefinition());
}
}
private BeanDefinitionBuilder buildDynamicRegionSupport(Element dynamicRegionFactory) {
if (dynamicRegionFactory != null) {
BeanDefinitionBuilder dynamicRegionSupport =
BeanDefinitionBuilder.genericBeanDefinition(CacheFactoryBean.DynamicRegionSupport.class);
String diskDirectory = dynamicRegionFactory.getAttribute("disk-dir");
if (StringUtils.hasText(diskDirectory)) {
dynamicRegionSupport.addPropertyValue("diskDir", diskDirectory);
}
String persistent = dynamicRegionFactory.getAttribute("persistent");
if (StringUtils.hasText(persistent)) {
dynamicRegionSupport.addPropertyValue("persistent", persistent);
}
String registerInterest = dynamicRegionFactory.getAttribute("register-interest");
if (StringUtils.hasText(registerInterest)) {
dynamicRegionSupport.addPropertyValue("registerInterest", registerInterest);
}
return dynamicRegionSupport;
}
return null;
}
/**
* @param dynamicRegionSupport {@link BeanDefinitionBuilder} for &lt;gfe:dynamic-region-factory&gt; element.
*/
protected void postProcessDynamicRegionSupport(Element element, BeanDefinitionBuilder dynamicRegionSupport) { }
private void parseJndiBindings(Element element, BeanDefinitionBuilder cacheBuilder) { private void parseJndiBindings(Element element, BeanDefinitionBuilder cacheBuilder) {
List<Element> jndiBindings = DomUtils.getChildElementsByTagName(element, "jndi-binding"); List<Element> jndiBindings = DomUtils.getChildElementsByTagName(element, "jndi-binding");

View File

@@ -29,6 +29,7 @@ import org.springframework.data.gemfire.client.ClientCacheFactoryBean;
* @author David Turanski * @author David Turanski
* @author Lyndon Adams * @author Lyndon Adams
* @author John Blum * @author John Blum
* @author Patrick Johnson
* @see org.springframework.data.gemfire.client.ClientCacheFactoryBean * @see org.springframework.data.gemfire.client.ClientCacheFactoryBean
* @see CacheParser * @see CacheParser
*/ */
@@ -56,12 +57,4 @@ class ClientCacheParser extends CacheParser {
ParsingUtils.setPropertyValue(element, clientCacheBuilder, "pool-name"); ParsingUtils.setPropertyValue(element, clientCacheBuilder, "pool-name");
ParsingUtils.setPropertyValue(element, clientCacheBuilder, "ready-for-events"); ParsingUtils.setPropertyValue(element, clientCacheBuilder, "ready-for-events");
} }
/**
* {@inheritDoc}
*/
@Override
protected void postProcessDynamicRegionSupport(Element element, BeanDefinitionBuilder dynamicRegionSupport) {
ParsingUtils.setPropertyValue(element, dynamicRegionSupport, "pool-name");
}
} }

View File

@@ -89,38 +89,6 @@ use inner bean declarations.
</xsd:attribute> </xsd:attribute>
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="dynamic-region-factory" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation><![CDATA[
Enables Dynamic Regions and specifies their configuration.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="disk-dir" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Specifies the directory path for disk persistence for dynamic regions.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="persistent" type="xsd:string"
default="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
Enables persistence for dynamic regions.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="register-interest" type="xsd:string"
default="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
Specifies whether dynamic regions register interest in all keys in a corresponding server region.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="jndi-binding" type="jndiBindingType" minOccurs="0" maxOccurs="unbounded"> <xsd:element name="jndi-binding" type="jndiBindingType" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation> <xsd:annotation>
<xsd:documentation><![CDATA[ <xsd:documentation><![CDATA[

View File

@@ -77,6 +77,7 @@ import org.springframework.data.gemfire.support.GemfireBeanFactoryLocator;
* Unit tests for {@link CacheFactoryBean}. * Unit tests for {@link CacheFactoryBean}.
* *
* @author John Blum * @author John Blum
* @author Patrick Johnson
* @see java.io.InputStream * @see java.io.InputStream
* @see java.util.Properties * @see java.util.Properties
* @see org.junit.Test * @see org.junit.Test
@@ -303,7 +304,6 @@ public class CacheFactoryBeanTest {
cacheFactoryBean.setCopyOnRead(true); cacheFactoryBean.setCopyOnRead(true);
cacheFactoryBean.setCriticalHeapPercentage(0.90f); cacheFactoryBean.setCriticalHeapPercentage(0.90f);
cacheFactoryBean.setCriticalOffHeapPercentage(0.95f); cacheFactoryBean.setCriticalOffHeapPercentage(0.95f);
cacheFactoryBean.setDynamicRegionSupport(null);
cacheFactoryBean.setEnableAutoReconnect(false); cacheFactoryBean.setEnableAutoReconnect(false);
cacheFactoryBean.setEvictionHeapPercentage(0.75f); cacheFactoryBean.setEvictionHeapPercentage(0.75f);
cacheFactoryBean.setEvictionOffHeapPercentage(0.90f); cacheFactoryBean.setEvictionOffHeapPercentage(0.90f);
@@ -791,7 +791,6 @@ public class CacheFactoryBeanTest {
cacheFactoryBean.setUseBeanFactoryLocator(false); cacheFactoryBean.setUseBeanFactoryLocator(false);
cacheFactoryBean.setClose(false); cacheFactoryBean.setClose(false);
cacheFactoryBean.setCopyOnRead(true); cacheFactoryBean.setCopyOnRead(true);
cacheFactoryBean.setDynamicRegionSupport(new CacheFactoryBean.DynamicRegionSupport());
cacheFactoryBean.setEnableAutoReconnect(true); cacheFactoryBean.setEnableAutoReconnect(true);
cacheFactoryBean.setCriticalHeapPercentage(0.95f); cacheFactoryBean.setCriticalHeapPercentage(0.95f);
cacheFactoryBean.setCriticalOffHeapPercentage(0.99f); cacheFactoryBean.setCriticalOffHeapPercentage(0.99f);
@@ -823,7 +822,6 @@ public class CacheFactoryBeanTest {
assertTrue(cacheFactoryBean.getCopyOnRead()); assertTrue(cacheFactoryBean.getCopyOnRead());
assertEquals(0.95f, cacheFactoryBean.getCriticalHeapPercentage(), 0.0f); assertEquals(0.95f, cacheFactoryBean.getCriticalHeapPercentage(), 0.0f);
assertEquals(0.99f, cacheFactoryBean.getCriticalOffHeapPercentage(), 0.0f); assertEquals(0.99f, cacheFactoryBean.getCriticalOffHeapPercentage(), 0.0f);
assertNotNull(cacheFactoryBean.getDynamicRegionSupport());
assertTrue(cacheFactoryBean.getEnableAutoReconnect()); assertTrue(cacheFactoryBean.getEnableAutoReconnect());
assertEquals(0.70f, cacheFactoryBean.getEvictionHeapPercentage(), 0.0f); assertEquals(0.70f, cacheFactoryBean.getEvictionHeapPercentage(), 0.0f);
assertEquals(0.80f, cacheFactoryBean.getEvictionOffHeapPercentage(), 0.0f); assertEquals(0.80f, cacheFactoryBean.getEvictionOffHeapPercentage(), 0.0f);

View File

@@ -43,6 +43,7 @@ import org.springframework.data.gemfire.client.ClientCacheFactoryBean;
* Unit tests for {@link ClientCacheParser}. * Unit tests for {@link ClientCacheParser}.
* *
* @author John Blum * @author John Blum
* @author Patrick Johnson
* @see org.junit.Test * @see org.junit.Test
* @see org.mockito.Mock * @see org.mockito.Mock
* @see org.mockito.Mockito * @see org.mockito.Mockito
@@ -123,20 +124,4 @@ public class ClientCacheParserUnitTests {
verify(mockElement, times(1)).getAttribute(eq("pool-name")); verify(mockElement, times(1)).getAttribute(eq("pool-name"));
verify(mockElement, times(1)).getAttribute(eq("ready-for-events")); verify(mockElement, times(1)).getAttribute(eq("ready-for-events"));
} }
@Test
public void postProcessDynamicRegionSupportParsesPoolName() {
when(mockElement.getAttribute(eq("pool-name"))).thenReturn("TestPool");
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition();
new ClientCacheParser().postProcessDynamicRegionSupport(mockElement, builder);
BeanDefinition beanDefinition = builder.getBeanDefinition();
assertThat(beanDefinition).isNotNull();
assertPropertyValueEquals(beanDefinition, "poolName", "TestPool");
verify(mockElement, times(1)).getAttribute(eq("pool-name"));
}
} }

View File

@@ -1,60 +0,0 @@
/*
* Copyright 2010-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.gemfire.config.xml;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.DynamicRegionFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* @author David Turanski
*
* This requires a real cache
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/org/springframework/data/gemfire/config/xml/dynamic-region-ns.xml")
public class DynamicRegionNamespaceTest {
@Autowired ApplicationContext ctx;
@Test
public void testBasicCache() throws Exception {
DynamicRegionFactory drf = DynamicRegionFactory.get();
assertFalse(drf.isOpen());
assertNull(drf.getConfig());
ctx.getBean("gemfireCache", Cache.class);
assertTrue(drf.isOpen());
DynamicRegionFactory.Config config = drf.getConfig();
assertFalse(config.persistBackup);
assertFalse(config.registerInterest);
assertEquals(File.separator + "foo", config.diskDir.getPath());
}
}

View File

@@ -24,6 +24,7 @@ import org.springframework.data.gemfire.CacheFactoryBean;
* *
* @author David Turanski * @author David Turanski
* @author John Blum * @author John Blum
* @author Patrick Johnson
* @see org.springframework.data.gemfire.CacheFactoryBean * @see org.springframework.data.gemfire.CacheFactoryBean
*/ */
public class MockCacheFactoryBean extends CacheFactoryBean { public class MockCacheFactoryBean extends CacheFactoryBean {
@@ -43,7 +44,6 @@ public class MockCacheFactoryBean extends CacheFactoryBean {
setCopyOnRead(it.getCopyOnRead()); setCopyOnRead(it.getCopyOnRead());
setCriticalHeapPercentage(it.getCriticalHeapPercentage()); setCriticalHeapPercentage(it.getCriticalHeapPercentage());
setCriticalOffHeapPercentage(it.getCriticalOffHeapPercentage()); setCriticalOffHeapPercentage(it.getCriticalOffHeapPercentage());
setDynamicRegionSupport(it.getDynamicRegionSupport());
setEnableAutoReconnect(it.getEnableAutoReconnect()); setEnableAutoReconnect(it.getEnableAutoReconnect());
setEvictionHeapPercentage(it.getEvictionHeapPercentage()); setEvictionHeapPercentage(it.getEvictionHeapPercentage());
setEvictionOffHeapPercentage(it.getEvictionOffHeapPercentage()); setEvictionOffHeapPercentage(it.getEvictionOffHeapPercentage());

View File

@@ -21,6 +21,7 @@ import org.springframework.data.gemfire.client.ClientCacheFactoryBean;
/** /**
* @author David Turanski * @author David Turanski
* @author John Blum * @author John Blum
* @author Patrick Johnson
*/ */
public class MockClientCacheFactoryBean extends ClientCacheFactoryBean { public class MockClientCacheFactoryBean extends ClientCacheFactoryBean {
@@ -38,7 +39,6 @@ public class MockClientCacheFactoryBean extends ClientCacheFactoryBean {
setCriticalHeapPercentage(it.getCriticalHeapPercentage()); setCriticalHeapPercentage(it.getCriticalHeapPercentage());
setDurableClientId(it.getDurableClientId()); setDurableClientId(it.getDurableClientId());
setDurableClientTimeout(it.getDurableClientTimeout()); setDurableClientTimeout(it.getDurableClientTimeout());
setDynamicRegionSupport(it.getDynamicRegionSupport());
setEvictionHeapPercentage(it.getEvictionHeapPercentage()); setEvictionHeapPercentage(it.getEvictionHeapPercentage());
setGatewayConflictResolver(it.getGatewayConflictResolver()); setGatewayConflictResolver(it.getGatewayConflictResolver());
setJndiDataSources(it.getJndiDataSources()); setJndiDataSources(it.getJndiDataSources());

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:gfe="http://www.springframework.org/schema/geode"
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 https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/geode https://www.springframework.org/schema/geode/spring-geode.xsd
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
" default-lazy-init="true">
<util:properties id="gemfireProperties">
<prop key="name">DynamicRegionNamespaceConfig</prop>
<prop key="log-level">error</prop>
</util:properties>
<gfe:cache properties-ref="gemfireProperties">
<gfe:dynamic-region-factory persistent="false" register-interest="false" disk-dir="/foo"/>
</gfe:cache>
</beans>