DATAGEODE-109 - Rename o.s.d.g.RegionFactoryBean as o.s.d.g.PeerRegionFactoryBean.
Rename o.s.d.g.RegionLookupFactoryBean as o.s.d.g.ResolvableRegionFactoryBean.
This commit is contained in:
@@ -62,14 +62,14 @@ public class GenericRegionFactoryBeanTest {
|
||||
.set("log-level", "warning")
|
||||
.create();
|
||||
|
||||
RegionFactoryBean<Object, Object> defaultRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
PeerRegionFactoryBean<Object, Object> defaultRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
defaultRegionFactory.setCache(gemfireCache);
|
||||
defaultRegionFactory.setName("DefaultRegion");
|
||||
defaultRegionFactory.afterPropertiesSet();
|
||||
|
||||
defaultRegion = defaultRegionFactory.getObject();
|
||||
|
||||
RegionFactoryBean<Object, Object> emptyRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
PeerRegionFactoryBean<Object, Object> emptyRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
emptyRegionFactory.setCache(gemfireCache);
|
||||
emptyRegionFactory.setDataPolicy(DataPolicy.EMPTY);
|
||||
emptyRegionFactory.setName("EmptyRegion");
|
||||
@@ -78,7 +78,7 @@ public class GenericRegionFactoryBeanTest {
|
||||
|
||||
emptyRegion = emptyRegionFactory.getObject();
|
||||
|
||||
RegionFactoryBean<Object, Object> localRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
PeerRegionFactoryBean<Object, Object> localRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
localRegionFactory.setCache(gemfireCache);
|
||||
localRegionFactory.setDataPolicy(DataPolicy.NORMAL);
|
||||
localRegionFactory.setName("LocalRegion");
|
||||
@@ -87,7 +87,7 @@ public class GenericRegionFactoryBeanTest {
|
||||
|
||||
localRegion = localRegionFactory.getObject();
|
||||
|
||||
RegionFactoryBean<Object, Object> normalRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
PeerRegionFactoryBean<Object, Object> normalRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
normalRegionFactory.setCache(gemfireCache);
|
||||
normalRegionFactory.setDataPolicy(DataPolicy.NORMAL);
|
||||
normalRegionFactory.setName("NormalRegion");
|
||||
@@ -96,7 +96,7 @@ public class GenericRegionFactoryBeanTest {
|
||||
|
||||
normalRegion = normalRegionFactory.getObject();
|
||||
|
||||
RegionFactoryBean<Object, Object> persistentPartitionRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
PeerRegionFactoryBean<Object, Object> persistentPartitionRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
persistentPartitionRegionFactory.setCache(gemfireCache);
|
||||
persistentPartitionRegionFactory.setDataPolicy(DataPolicy.PERSISTENT_PARTITION);
|
||||
persistentPartitionRegionFactory.setName("PersistentPartitionRegion");
|
||||
@@ -105,7 +105,7 @@ public class GenericRegionFactoryBeanTest {
|
||||
|
||||
persistentPartitionRegion = persistentPartitionRegionFactory.getObject();
|
||||
|
||||
RegionFactoryBean<Object, Object> preloadedRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
PeerRegionFactoryBean<Object, Object> preloadedRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
preloadedRegionFactory.setCache(gemfireCache);
|
||||
preloadedRegionFactory.setDataPolicy(DataPolicy.PRELOADED);
|
||||
preloadedRegionFactory.setName("PreloadedRegion");
|
||||
@@ -113,7 +113,7 @@ public class GenericRegionFactoryBeanTest {
|
||||
|
||||
preloadedRegion = preloadedRegionFactory.getObject();
|
||||
|
||||
RegionFactoryBean<Object, Object> replicateRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
PeerRegionFactoryBean<Object, Object> replicateRegionFactory = new GenericRegionFactoryBean<Object, Object>();
|
||||
replicateRegionFactory.setCache(gemfireCache);
|
||||
replicateRegionFactory.setDataPolicy(DataPolicy.REPLICATE);
|
||||
replicateRegionFactory.setName("ReplicateRegion");
|
||||
|
||||
@@ -57,7 +57,7 @@ import org.springframework.data.gemfire.test.support.AbstractRegionFactoryBeanTe
|
||||
import org.springframework.data.gemfire.util.ArrayUtils;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link RegionFactoryBean}.
|
||||
* Unit tests for {@link PeerRegionFactoryBean}.
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
@@ -68,13 +68,13 @@ import org.springframework.data.gemfire.util.ArrayUtils;
|
||||
* @see org.apache.geode.cache.RegionAttributes
|
||||
* @see org.apache.geode.cache.RegionFactory
|
||||
* @see org.apache.geode.cache.RegionShortcut
|
||||
* @see org.springframework.data.gemfire.RegionFactoryBean
|
||||
* @see PeerRegionFactoryBean
|
||||
* @see org.springframework.data.gemfire.test.support.AbstractRegionFactoryBeanTests
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
public class PeerRegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
|
||||
private final RegionFactoryBean factoryBean = new TestRegionFactoryBean();
|
||||
private final PeerRegionFactoryBean factoryBean = new TestRegionFactoryBean();
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
@@ -173,7 +173,7 @@ public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
@Test
|
||||
public void testIsPersistent() {
|
||||
|
||||
RegionFactoryBean<?, ?> factoryBean = new TestRegionFactoryBean<>();
|
||||
PeerRegionFactoryBean<?, ?> factoryBean = new TestRegionFactoryBean<>();
|
||||
|
||||
assertFalse(factoryBean.isPersistent());
|
||||
|
||||
@@ -189,7 +189,7 @@ public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
@Test
|
||||
public void testIsNotPersistent() {
|
||||
|
||||
RegionFactoryBean<?, ?> factoryBean = new TestRegionFactoryBean<>();
|
||||
PeerRegionFactoryBean<?, ?> factoryBean = new TestRegionFactoryBean<>();
|
||||
|
||||
assertFalse(factoryBean.isNotPersistent());
|
||||
|
||||
@@ -216,7 +216,7 @@ public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
|
||||
AtomicBoolean setDataPolicyCalled = new AtomicBoolean(false);
|
||||
|
||||
RegionFactoryBean factoryBean = new RegionFactoryBean() {
|
||||
PeerRegionFactoryBean factoryBean = new PeerRegionFactoryBean() {
|
||||
|
||||
@Override
|
||||
DataPolicy getDataPolicy(RegionFactory regionFactory, RegionShortcut regionShortcut) {
|
||||
@@ -255,7 +255,7 @@ public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
|
||||
when(mockCache.createRegionFactory(eq(mockRegionAttributes))).thenReturn(mockRegionFactory);
|
||||
|
||||
RegionFactoryBean factoryBean = new TestRegionFactoryBean();
|
||||
PeerRegionFactoryBean factoryBean = new TestRegionFactoryBean();
|
||||
|
||||
factoryBean.setAttributes(mockRegionAttributes);
|
||||
factoryBean.setShortcut(null);
|
||||
@@ -274,7 +274,7 @@ public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
|
||||
when(mockCache.createRegionFactory()).thenReturn(mockRegionFactory);
|
||||
|
||||
RegionFactoryBean factoryBean = new TestRegionFactoryBean();
|
||||
PeerRegionFactoryBean factoryBean = new TestRegionFactoryBean();
|
||||
|
||||
factoryBean.setAttributes(null);
|
||||
factoryBean.setShortcut(null);
|
||||
@@ -325,7 +325,7 @@ public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
when(mockRegionAttributes.getStatisticsEnabled()).thenReturn(true);
|
||||
when(mockRegionAttributes.getSubscriptionAttributes()).thenReturn(testSubscriptionAttributes);
|
||||
|
||||
RegionFactoryBean factoryBean = new RegionFactoryBean() {
|
||||
PeerRegionFactoryBean factoryBean = new PeerRegionFactoryBean() {
|
||||
@Override boolean isUserSpecifiedEvictionAttributes(final RegionAttributes regionAttributes) {
|
||||
return true;
|
||||
}
|
||||
@@ -436,7 +436,7 @@ public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
when(mockRegionAttributes.getStatisticsEnabled()).thenReturn(true);
|
||||
when(mockRegionAttributes.getSubscriptionAttributes()).thenReturn(null);
|
||||
|
||||
RegionFactoryBean factoryBean = new RegionFactoryBean() {
|
||||
PeerRegionFactoryBean factoryBean = new PeerRegionFactoryBean() {
|
||||
@Override boolean isUserSpecifiedEvictionAttributes(final RegionAttributes regionAttributes) {
|
||||
return false;
|
||||
}
|
||||
@@ -1087,6 +1087,6 @@ public class RegionFactoryBeanTest extends AbstractRegionFactoryBeanTests {
|
||||
}
|
||||
}
|
||||
|
||||
protected static class TestRegionFactoryBean<K, V> extends RegionFactoryBean<K, V> {
|
||||
protected static class TestRegionFactoryBean<K, V> extends PeerRegionFactoryBean<K, V> {
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.FilterType;
|
||||
import org.springframework.data.gemfire.PartitionedRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.client.ClientRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.config.annotation.test.entities.CollocatedPartitionRegionEntity;
|
||||
import org.springframework.data.gemfire.config.annotation.test.entities.NonEntity;
|
||||
@@ -52,7 +52,7 @@ import org.springframework.data.gemfire.test.GemfireTestBeanPostProcessor;
|
||||
* @see org.apache.geode.cache.Region
|
||||
* @see org.springframework.context.ConfigurableApplicationContext
|
||||
* @see org.springframework.context.annotation.AnnotationConfigApplicationContext
|
||||
* @see org.springframework.data.gemfire.RegionFactoryBean
|
||||
* @see PeerRegionFactoryBean
|
||||
* @see org.springframework.data.gemfire.client.ClientRegionFactoryBean
|
||||
* @see org.springframework.data.gemfire.config.annotation.RegionConfigurer
|
||||
* @see org.springframework.data.gemfire.test.GemfireTestBeanPostProcessor
|
||||
@@ -187,7 +187,7 @@ public class RegionConfigurerIntegrationTests {
|
||||
private final Set<String> beanNames = new HashSet<>();
|
||||
|
||||
@Override
|
||||
public void configure(String beanName, RegionFactoryBean<?, ?> bean) {
|
||||
public void configure(String beanName, PeerRegionFactoryBean<?, ?> bean) {
|
||||
this.beanNames.add(beanName);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.AbstractApplicationContext;
|
||||
import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.test.mock.context.GemFireMockObjectsApplicationContextInitializer;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
@@ -133,7 +133,7 @@ public class LuceneIndexRegionBeanFactoryPostProcessorIntegrationTests {
|
||||
}
|
||||
|
||||
private boolean isRegionBean(Object bean) {
|
||||
return bean instanceof Region || bean instanceof RegionFactoryBean;
|
||||
return bean instanceof Region || bean instanceof PeerRegionFactoryBean;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ 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.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -51,7 +51,7 @@ public class CacheSubscriptionTest{
|
||||
public void testReplicatedRegionSubscriptionAllPolicy() throws Exception {
|
||||
assertTrue(context.containsBean("replicALL"));
|
||||
|
||||
RegionFactoryBean regionFactoryBean = context.getBean("&replicALL", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean regionFactoryBean = context.getBean("&replicALL", PeerRegionFactoryBean.class);
|
||||
RegionAttributes regionAttributes = TestUtils.readField("attributes", regionFactoryBean);
|
||||
|
||||
assertNotNull(regionAttributes);
|
||||
@@ -66,7 +66,7 @@ public class CacheSubscriptionTest{
|
||||
public void testPartitionRegionSubscriptionCacheContentPolicy() throws Exception {
|
||||
assertTrue(context.containsBean("partCACHE_CONTENT"));
|
||||
|
||||
RegionFactoryBean regionFactoryBean = context.getBean("&partCACHE_CONTENT", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean regionFactoryBean = context.getBean("&partCACHE_CONTENT", PeerRegionFactoryBean.class);
|
||||
RegionAttributes regionAttributes = TestUtils.readField("attributes", regionFactoryBean);
|
||||
|
||||
assertNotNull(regionAttributes);
|
||||
@@ -81,7 +81,7 @@ public class CacheSubscriptionTest{
|
||||
public void testPartitionRegionSubscriptionDefaultPolicy() throws Exception {
|
||||
assertTrue(context.containsBean("partDEFAULT"));
|
||||
|
||||
RegionFactoryBean regionFactoryBean = context.getBean("&partDEFAULT", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean regionFactoryBean = context.getBean("&partDEFAULT", PeerRegionFactoryBean.class);
|
||||
RegionAttributes regionAttributes = TestUtils.readField("attributes", regionFactoryBean);
|
||||
|
||||
assertNotNull(regionAttributes);
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.gemfire.PartitionedRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.ReplicatedRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.SimpleObjectSizer;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
@@ -119,7 +119,7 @@ public class DiskStoreAndEvictionRegionParsingTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("replicated-data"));
|
||||
|
||||
RegionFactoryBean replicatedDataRegionFactoryBean = applicationContext.getBean("&replicated-data", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean replicatedDataRegionFactoryBean = applicationContext.getBean("&replicated-data", PeerRegionFactoryBean.class);
|
||||
|
||||
assertTrue(replicatedDataRegionFactoryBean instanceof ReplicatedRegionFactoryBean);
|
||||
assertEquals(DataPolicy.REPLICATE, replicatedDataRegionFactoryBean.getDataPolicy());
|
||||
@@ -148,7 +148,7 @@ public class DiskStoreAndEvictionRegionParsingTest {
|
||||
public void testPartitionDataOptions() throws Exception {
|
||||
|
||||
assertTrue(applicationContext.containsBean("partition-data"));
|
||||
RegionFactoryBean fb = applicationContext.getBean("&partition-data", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean fb = applicationContext.getBean("&partition-data", PeerRegionFactoryBean.class);
|
||||
assertTrue(fb instanceof PartitionedRegionFactoryBean);
|
||||
assertTrue((Boolean) TestUtils.readField("persistent", fb));
|
||||
RegionAttributes attrs = TestUtils.readField("attributes", fb);
|
||||
@@ -169,7 +169,7 @@ public class DiskStoreAndEvictionRegionParsingTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("replicated-data"));
|
||||
|
||||
RegionFactoryBean fb = applicationContext.getBean("&replicated-data", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean fb = applicationContext.getBean("&replicated-data", PeerRegionFactoryBean.class);
|
||||
RegionAttributes attrs = TestUtils.readField("attributes", fb);
|
||||
|
||||
ExpirationAttributes entryTTL = attrs.getEntryTimeToLive();
|
||||
@@ -196,7 +196,7 @@ public class DiskStoreAndEvictionRegionParsingTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("replicated-data-custom-expiry"));
|
||||
|
||||
RegionFactoryBean fb = applicationContext.getBean("&replicated-data-custom-expiry", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean fb = applicationContext.getBean("&replicated-data-custom-expiry", PeerRegionFactoryBean.class);
|
||||
RegionAttributes attrs = TestUtils.readField("attributes", fb);
|
||||
|
||||
assertNotNull(attrs.getCustomEntryIdleTimeout());
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.junit.AfterClass;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.data.gemfire.RecreatingSpringApplicationContextTest;
|
||||
import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
import org.springframework.data.gemfire.test.GemfireTestBeanPostProcessor;
|
||||
import org.springframework.data.gemfire.wan.GatewaySenderFactoryBean;
|
||||
@@ -144,7 +144,7 @@ public class GemfireV7GatewayNamespaceTest extends RecreatingSpringApplicationCo
|
||||
assertNotNull(region.getAttributes().getGatewaySenderIds());
|
||||
assertEquals(2, region.getAttributes().getGatewaySenderIds().size());
|
||||
|
||||
RegionFactoryBean regionFactoryBean = applicationContext.getBean("®ion-inner-gateway-sender", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean regionFactoryBean = applicationContext.getBean("®ion-inner-gateway-sender", PeerRegionFactoryBean.class);
|
||||
|
||||
Object[] gatewaySenders = TestUtils.readField("gatewaySenders", regionFactoryBean);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import static org.junit.Assert.assertTrue;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
|
||||
/**
|
||||
* The InvalidRegionDefinitionUsingBeansNamespaceTest class is a test suite of test cases testing the definition of
|
||||
@@ -32,7 +32,7 @@ import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.RegionFactoryBean
|
||||
* @see PeerRegionFactoryBean
|
||||
* @since 1.6.0
|
||||
*/
|
||||
public class InvalidRegionDefinitionUsingBeansNamespaceTest {
|
||||
@@ -57,6 +57,6 @@ public class InvalidRegionDefinitionUsingBeansNamespaceTest {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static final class TestRegionFactoryBean<K, V> extends RegionFactoryBean<K, V> { }
|
||||
public static final class TestRegionFactoryBean<K, V> extends PeerRegionFactoryBean<K, V> { }
|
||||
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ 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.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.RegionLookupFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.ResolvableRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.SimpleCacheListener;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
import org.springframework.data.gemfire.test.mock.context.GemFireMockObjectsApplicationContextInitializer;
|
||||
@@ -80,7 +80,7 @@ public class LocalRegionNamespaceTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("pub"));
|
||||
|
||||
RegionFactoryBean publisherRegionFactoryBean = applicationContext.getBean("&pub", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean publisherRegionFactoryBean = applicationContext.getBean("&pub", PeerRegionFactoryBean.class);
|
||||
|
||||
assertNotNull(publisherRegionFactoryBean);
|
||||
assertEquals(DataPolicy.NORMAL, TestUtils.readField("dataPolicy", publisherRegionFactoryBean));
|
||||
@@ -99,7 +99,7 @@ public class LocalRegionNamespaceTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("complex"));
|
||||
|
||||
RegionFactoryBean complexRegionFactoryBean = applicationContext.getBean("&complex", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean complexRegionFactoryBean = applicationContext.getBean("&complex", PeerRegionFactoryBean.class);
|
||||
|
||||
assertNotNull(complexRegionFactoryBean);
|
||||
|
||||
@@ -149,7 +149,7 @@ public class LocalRegionNamespaceTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("lookup"));
|
||||
|
||||
RegionLookupFactoryBean localRegionFactoryBean = applicationContext.getBean("&lookup", RegionLookupFactoryBean.class);
|
||||
ResolvableRegionFactoryBean localRegionFactoryBean = applicationContext.getBean("&lookup", ResolvableRegionFactoryBean.class);
|
||||
|
||||
assertEquals("existing", TestUtils.readField("name", localRegionFactoryBean));
|
||||
assertSame(existing, applicationContext.getBean("lookup"));
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.data.gemfire.PartitionedRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.SimpleCacheListener;
|
||||
import org.springframework.data.gemfire.SimplePartitionResolver;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
@@ -96,7 +96,7 @@ public class PartitionedRegionNamespaceTest {
|
||||
assertThat(options.getName()).isEqualTo("redundant");
|
||||
assertThat(options.getAttributes().getOffHeap()).isTrue();
|
||||
|
||||
RegionFactoryBean optionsRegionFactoryBean = applicationContext.getBean("&options", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean optionsRegionFactoryBean = applicationContext.getBean("&options", PeerRegionFactoryBean.class);
|
||||
|
||||
assertTrue(optionsRegionFactoryBean instanceof PartitionedRegionFactoryBean);
|
||||
assertNull(TestUtils.readField("scope", optionsRegionFactoryBean));
|
||||
@@ -123,7 +123,7 @@ public class PartitionedRegionNamespaceTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("complex"));
|
||||
|
||||
RegionFactoryBean complexRegionFactoryBean = applicationContext.getBean("&complex", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean complexRegionFactoryBean = applicationContext.getBean("&complex", PeerRegionFactoryBean.class);
|
||||
|
||||
CacheListener[] cacheListeners = TestUtils.readField("cacheListeners", complexRegionFactoryBean);
|
||||
|
||||
@@ -168,7 +168,7 @@ public class PartitionedRegionNamespaceTest {
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void testFixedPartitionRegion() throws Exception {
|
||||
|
||||
RegionFactoryBean fixedRegionFactoryBean = applicationContext.getBean("&fixed", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean fixedRegionFactoryBean = applicationContext.getBean("&fixed", PeerRegionFactoryBean.class);
|
||||
|
||||
assertNotNull(fixedRegionFactoryBean);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ 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.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
import org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
@@ -45,7 +45,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @see org.junit.Test
|
||||
* @see org.springframework.data.gemfire.PartitionAttributesFactoryBean
|
||||
* @see org.springframework.data.gemfire.RegionAttributesFactoryBean
|
||||
* @see org.springframework.data.gemfire.RegionFactoryBean
|
||||
* @see PeerRegionFactoryBean
|
||||
* @see org.springframework.data.gemfire.test.GemfireTestApplicationContextInitializer
|
||||
* @see org.springframework.test.context.ContextConfiguration
|
||||
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
|
||||
@@ -82,8 +82,8 @@ public class RegionDefinitionUsingBeansNamespaceTest {
|
||||
|
||||
@Test
|
||||
public void testAnotherExampleRegionFactoryBeanConfiguration() throws Exception {
|
||||
RegionFactoryBean<?, ?> anotherExampleRegionFactoryBean = context.getBean("&AnotherExample",
|
||||
RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean<?, ?> anotherExampleRegionFactoryBean = context.getBean("&AnotherExample",
|
||||
PeerRegionFactoryBean.class);
|
||||
|
||||
assertNotNull(anotherExampleRegionFactoryBean);
|
||||
assertEquals(DataPolicy.PERSISTENT_PARTITION, anotherExampleRegionFactoryBean.getDataPolicy());
|
||||
@@ -112,7 +112,7 @@ public class RegionDefinitionUsingBeansNamespaceTest {
|
||||
assertEquals(2, anotherExample.getAttributes().getPartitionAttributes().getRedundantCopies());
|
||||
}
|
||||
|
||||
public static final class TestRegionFactoryBean<K, V> extends RegionFactoryBean<K, V> {
|
||||
public static final class TestRegionFactoryBean<K, V> extends PeerRegionFactoryBean<K, V> {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ 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.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.RegionLookupFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.ResolvableRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.ReplicatedRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.SimpleCacheListener;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
@@ -68,8 +68,8 @@ public class ReplicatedRegionNamespaceTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("simple"));
|
||||
|
||||
RegionFactoryBean simpleRegionFactoryBean =
|
||||
applicationContext.getBean("&simple", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean simpleRegionFactoryBean =
|
||||
applicationContext.getBean("&simple", PeerRegionFactoryBean.class);
|
||||
|
||||
assertEquals("simple", TestUtils.readField("beanName", simpleRegionFactoryBean));
|
||||
assertEquals(false, TestUtils.readField("close", simpleRegionFactoryBean));
|
||||
@@ -89,8 +89,8 @@ public class ReplicatedRegionNamespaceTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("pub"));
|
||||
|
||||
RegionFactoryBean publisherRegionFactoryBean =
|
||||
applicationContext.getBean("&pub", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean publisherRegionFactoryBean =
|
||||
applicationContext.getBean("&pub", PeerRegionFactoryBean.class);
|
||||
|
||||
assertTrue(publisherRegionFactoryBean instanceof ReplicatedRegionFactoryBean);
|
||||
assertEquals("publisher", TestUtils.readField("name", publisherRegionFactoryBean));
|
||||
@@ -108,8 +108,8 @@ public class ReplicatedRegionNamespaceTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("complex"));
|
||||
|
||||
RegionFactoryBean complexRegionFactoryBean =
|
||||
applicationContext.getBean("&complex", RegionFactoryBean.class);
|
||||
PeerRegionFactoryBean complexRegionFactoryBean =
|
||||
applicationContext.getBean("&complex", PeerRegionFactoryBean.class);
|
||||
|
||||
assertNotNull(complexRegionFactoryBean);
|
||||
assertEquals("complex", TestUtils.readField("beanName", complexRegionFactoryBean));
|
||||
@@ -181,11 +181,11 @@ public class ReplicatedRegionNamespaceTest {
|
||||
|
||||
assertTrue(applicationContext.containsBean("lookup"));
|
||||
|
||||
RegionLookupFactoryBean regionLookupFactoryBean =
|
||||
applicationContext.getBean("&lookup", RegionLookupFactoryBean.class);
|
||||
ResolvableRegionFactoryBean regionFactoryBean =
|
||||
applicationContext.getBean("&lookup", ResolvableRegionFactoryBean.class);
|
||||
|
||||
assertNotNull(regionLookupFactoryBean);
|
||||
assertEquals("existing", TestUtils.readField("name", regionLookupFactoryBean));
|
||||
assertNotNull(regionFactoryBean);
|
||||
assertEquals("existing", TestUtils.readField("name", regionFactoryBean));
|
||||
assertSame(existing, applicationContext.getBean("lookup"));
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.gemfire.RegionFactoryBean;
|
||||
import org.springframework.data.gemfire.PeerRegionFactoryBean;
|
||||
import org.springframework.data.gemfire.test.StubCache;
|
||||
|
||||
/**
|
||||
@@ -81,12 +81,12 @@ public abstract class AbstractRegionFactoryBeanTests {
|
||||
public Exception exception;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public final RegionFactoryBean regionFactoryBean;
|
||||
public final PeerRegionFactoryBean regionFactoryBean;
|
||||
|
||||
public final String regionName;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public RegionFactoryBeanConfig(RegionFactoryBean regionFactoryBean, String regionName) {
|
||||
public RegionFactoryBeanConfig(PeerRegionFactoryBean regionFactoryBean, String regionName) {
|
||||
this.regionFactoryBean = regionFactoryBean;
|
||||
this.regionName = regionName;
|
||||
regionFactoryBean.setBeanName(regionName);
|
||||
|
||||
Reference in New Issue
Block a user