diff --git a/src/main/java/org/springframework/data/gemfire/ConfigurableRegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/ConfigurableRegionFactoryBean.java index 526a33b9..8775f7c4 100644 --- a/src/main/java/org/springframework/data/gemfire/ConfigurableRegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/ConfigurableRegionFactoryBean.java @@ -27,18 +27,26 @@ import java.util.Optional; import java.util.stream.StreamSupport; import org.apache.geode.cache.Region; +import org.springframework.beans.factory.FactoryBean; import org.springframework.data.gemfire.client.ClientRegionFactoryBean; import org.springframework.data.gemfire.config.annotation.RegionConfigurer; /** - * The ConfigurableRegionFactoryBean class... + * {@link ConfigurableRegionFactoryBean} is an abstract base class encapsulating functionality common + * to all configurable {@link Region} {@link FactoryBean FactoryBeans}. + * + * A {@literal configurable} {@link Region} {@link FactoryBean} includes all {@link FactoryBean FactoryBeans} + * that create a {@link Region} and allow additional configuration to be applied via a {@link RegionConfigurer}. * * @author John Blum - * @see org.springframework.data.gemfire.RegionLookupFactoryBean + * @see org.apache.geode.cache.Region + * @see org.springframework.beans.factory.FactoryBean + * @see org.springframework.data.gemfire.ResolvableRegionFactoryBean + * @see org.springframework.data.gemfire.config.annotation.RegionConfigurer * @since 2.1.0 */ @SuppressWarnings("unused") -public abstract class ConfigurableRegionFactoryBean extends RegionLookupFactoryBean { +public abstract class ConfigurableRegionFactoryBean extends ResolvableRegionFactoryBean { private List regionConfigurers = Collections.emptyList(); @@ -127,9 +135,9 @@ public abstract class ConfigurableRegionFactoryBean extends RegionLookupFa */ protected void applyRegionConfigurers(String regionName, Iterable regionConfigurers) { - if (this instanceof RegionFactoryBean) { + if (this instanceof PeerRegionFactoryBean) { StreamSupport.stream(nullSafeIterable(regionConfigurers).spliterator(), false) - .forEach(regionConfigurer -> regionConfigurer.configure(regionName, (RegionFactoryBean) this)); + .forEach(regionConfigurer -> regionConfigurer.configure(regionName, (PeerRegionFactoryBean) this)); } else if (this instanceof ClientRegionFactoryBean) { StreamSupport.stream(nullSafeIterable(regionConfigurers).spliterator(), false) diff --git a/src/main/java/org/springframework/data/gemfire/GenericRegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/GenericRegionFactoryBean.java index 1c8a62a0..e62096b5 100644 --- a/src/main/java/org/springframework/data/gemfire/GenericRegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/GenericRegionFactoryBean.java @@ -17,7 +17,7 @@ package org.springframework.data.gemfire; /** - * The GenericRegionFactoryBean class is an extension of the abstract, base RegionFactoryBean class enabling developers + * The GenericRegionFactoryBean class is an extension of the abstract, base PeerRegionFactoryBean class enabling developers * to define a GemFire Cache Region with defaults. * * The defaults for DataPolicy is NORMAL and Scope is DISTRIBUTED_NO_ACK, effectively creating a "non-replicate", @@ -33,12 +33,12 @@ package org.springframework.data.gemfire; * in certain use cases. * * @author John Blum - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean * @link http://gemfire.docs.pivotal.io/latest/userguide/index.html#developing/region_options/region_types.html * @link http://gemfire.docs.pivotal.io/latest/userguide/index.html#developing/region_options/storage_distribution_options.html * @since 1.7.0 */ @SuppressWarnings("unused") -public class GenericRegionFactoryBean extends RegionFactoryBean { +public class GenericRegionFactoryBean extends PeerRegionFactoryBean { } diff --git a/src/main/java/org/springframework/data/gemfire/LocalRegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/LocalRegionFactoryBean.java index af947553..3cc929f7 100644 --- a/src/main/java/org/springframework/data/gemfire/LocalRegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/LocalRegionFactoryBean.java @@ -24,7 +24,7 @@ import org.springframework.util.Assert; * @author David Turanski * @author John Blum */ -public class LocalRegionFactoryBean extends RegionFactoryBean { +public class LocalRegionFactoryBean extends PeerRegionFactoryBean { @Override public void setScope(Scope scope) { diff --git a/src/main/java/org/springframework/data/gemfire/LookupRegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/LookupRegionFactoryBean.java index adc0d032..f8e9e041 100644 --- a/src/main/java/org/springframework/data/gemfire/LookupRegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/LookupRegionFactoryBean.java @@ -32,16 +32,16 @@ import org.apache.geode.cache.wan.GatewaySender; import org.springframework.util.Assert; /** - * The LookupRegionFactoryBean class is a concrete implementation of RegionLookupFactoryBean for handling + * The LookupRegionFactoryBean class is a concrete implementation of ResolvableRegionFactoryBean for handling * >gfe:lookup-region/< SDG XML namespace (XSD) elements. * * @author John Blum - * @see RegionLookupFactoryBean * @see org.apache.geode.cache.AttributesMutator + * @see org.springframework.data.gemfire.ResolvableRegionFactoryBean * @since 1.6.0 */ @SuppressWarnings("unused") -public class LookupRegionFactoryBean extends RegionLookupFactoryBean { +public class LookupRegionFactoryBean extends ResolvableRegionFactoryBean { private AsyncEventQueue[] asyncEventQueues; diff --git a/src/main/java/org/springframework/data/gemfire/PartitionedRegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/PartitionedRegionFactoryBean.java index 858fc1a9..3527b244 100644 --- a/src/main/java/org/springframework/data/gemfire/PartitionedRegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/PartitionedRegionFactoryBean.java @@ -24,7 +24,7 @@ import org.springframework.util.Assert; * @author David Turanski * @author John Blum */ -public class PartitionedRegionFactoryBean extends RegionFactoryBean { +public class PartitionedRegionFactoryBean extends PeerRegionFactoryBean { @Override protected void resolveDataPolicy(RegionFactory regionFactory, Boolean persistent, DataPolicy dataPolicy) { diff --git a/src/main/java/org/springframework/data/gemfire/RegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/PeerRegionFactoryBean.java similarity index 97% rename from src/main/java/org/springframework/data/gemfire/RegionFactoryBean.java rename to src/main/java/org/springframework/data/gemfire/PeerRegionFactoryBean.java index 0e9496cf..f4035174 100644 --- a/src/main/java/org/springframework/data/gemfire/RegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/PeerRegionFactoryBean.java @@ -85,13 +85,12 @@ import org.springframework.util.StringUtils; * @see org.apache.geode.cache.asyncqueue.AsyncEventQueue * @see org.springframework.beans.factory.DisposableBean * @see org.springframework.context.SmartLifecycle - * @see RegionLookupFactoryBean + * @see org.springframework.data.gemfire.ResolvableRegionFactoryBean * @see org.springframework.data.gemfire.client.ClientRegionFactoryBean * @see org.springframework.data.gemfire.config.annotation.RegionConfigurer */ @SuppressWarnings("unused") -// TODO: Rename to PeerRegionFactoryBean in SD Lovelace -public abstract class RegionFactoryBean extends ConfigurableRegionFactoryBean +public abstract class PeerRegionFactoryBean extends ConfigurableRegionFactoryBean implements EvictingRegionFactoryBean, ExpiringRegionFactoryBean, DisposableBean, SmartLifecycle { private boolean close = true; @@ -212,11 +211,11 @@ public abstract class RegionFactoryBean extends ConfigurableRegionFactoryB /** * Creates an instance of {@link RegionFactory} with the given {@link Cache} which is then used to construct, - * configure and initialize the {@link Region} specified by this {@link RegionFactoryBean}. + * configure and initialize the {@link Region} specified by this {@link PeerRegionFactoryBean}. * * @param cache reference to the {@link Cache}. * @return a {@link RegionFactory} used to construct, configure and initialized the {@link Region} specified by - * this {@link RegionFactoryBean}. + * this {@link PeerRegionFactoryBean}. * @see org.apache.geode.cache.Cache#createRegionFactory(org.apache.geode.cache.RegionShortcut) * @see org.apache.geode.cache.Cache#createRegionFactory(org.apache.geode.cache.RegionAttributes) * @see org.apache.geode.cache.Cache#createRegionFactory() @@ -242,7 +241,7 @@ public abstract class RegionFactoryBean extends ConfigurableRegionFactoryB } /** - * Configures the {@link RegionFactory} based on the configuration settings of this {@link RegionFactoryBean}. + * Configures the {@link RegionFactory} based on the configuration settings of this {@link PeerRegionFactoryBean}. * * @param regionFactory {@link RegionFactory} to configure * @return the given {@link RegionFactory}. @@ -297,10 +296,10 @@ public abstract class RegionFactoryBean extends ConfigurableRegionFactoryB /** * Post-process the {@link RegionFactory} used to create the {@link Region} specified by - * this {@link RegionFactoryBean} during initialization. + * this {@link PeerRegionFactoryBean} during initialization. * * The {@link RegionFactory} has been already constructed, configured and initialized by - * this {@link RegionFactoryBean} before this method gets invoked. + * this {@link PeerRegionFactoryBean} before this method gets invoked. * * @param regionFactory {@link RegionFactory} used to create the {@link Region}. * @return the given {@link RegionFactory}. @@ -316,7 +315,7 @@ public abstract class RegionFactoryBean extends ConfigurableRegionFactoryB /* * (non-Javadoc) * - * This method is not considered part of the RegionFactoryBean API and is strictly used for testing purposes! + * This method is not considered part of the PeerRegionFactoryBean API and is strictly used for testing purposes! * * NOTE: Cannot pass RegionAttributes.class as the "targetType" in the second invocation of getFieldValue(..) * since the "regionAttributes" field is naively declared as a instance of the implementation class type @@ -360,7 +359,7 @@ public abstract class RegionFactoryBean extends ConfigurableRegionFactoryB * @param the Class type fo the Region key. * @param the Class type of the Region value. * @param regionFactory the GemFire RegionFactory used to configure and create the Region that is the product - * of this RegionFactoryBean. + * of this PeerRegionFactoryBean. * @param regionAttributes the RegionAttributes containing the Region configuration settings to merge to the * RegionFactory. * @return the RegionFactory with the configuration settings of the RegionAttributes merged. @@ -463,7 +462,7 @@ public abstract class RegionFactoryBean extends ConfigurableRegionFactoryB /* * (non-Javadoc) * - * This method is not part of the RegionFactoryBean API and is strictly used for testing purposes! + * This method is not part of the PeerRegionFactoryBean API and is strictly used for testing purposes! * * @see org.apache.geode.cache.AttributesFactory#validateAttributes(:RegionAttributes) */ @@ -475,7 +474,7 @@ public abstract class RegionFactoryBean extends ConfigurableRegionFactoryB /* * (non-Javadoc) * - * This method is not part of the RegionFactoryBean API and is strictly used for testing purposes! + * This method is not part of the PeerRegionFactoryBean API and is strictly used for testing purposes! * * NOTE unfortunately, must resort to using a GemFire internal class, ugh! * diff --git a/src/main/java/org/springframework/data/gemfire/ReplicatedRegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/ReplicatedRegionFactoryBean.java index 6fb56c3d..8781cd8c 100644 --- a/src/main/java/org/springframework/data/gemfire/ReplicatedRegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/ReplicatedRegionFactoryBean.java @@ -24,7 +24,7 @@ import org.springframework.util.Assert; * @author David Turanski * @author John Blum */ -public class ReplicatedRegionFactoryBean extends RegionFactoryBean { +public class ReplicatedRegionFactoryBean extends PeerRegionFactoryBean { @Override protected void resolveDataPolicy(RegionFactory regionFactory, Boolean persistent, DataPolicy dataPolicy) { diff --git a/src/main/java/org/springframework/data/gemfire/RegionLookupFactoryBean.java b/src/main/java/org/springframework/data/gemfire/ResolvableRegionFactoryBean.java similarity index 94% rename from src/main/java/org/springframework/data/gemfire/RegionLookupFactoryBean.java rename to src/main/java/org/springframework/data/gemfire/ResolvableRegionFactoryBean.java index 908d2a25..23f1fd3d 100644 --- a/src/main/java/org/springframework/data/gemfire/RegionLookupFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/ResolvableRegionFactoryBean.java @@ -36,7 +36,7 @@ import org.springframework.util.StringUtils; * * If lookups are disabled or the {@link Region} does not exist, an exception is thrown. * - * For declaring and configuring new Regions, see {@link RegionFactoryBean}. + * For declaring and configuring new Regions, see {@link PeerRegionFactoryBean}. * * @author Costin Leau * @author John Blum @@ -47,8 +47,7 @@ import org.springframework.util.StringUtils; * @see org.springframework.data.gemfire.support.AbstractFactoryBeanSupport */ @SuppressWarnings("unused") -// TODO: Rename to ResolvableRegionFactoryBean in SD Lovelace -public abstract class RegionLookupFactoryBean extends AbstractFactoryBeanSupport> +public abstract class ResolvableRegionFactoryBean extends AbstractFactoryBeanSupport> implements InitializingBean { private Boolean lookupEnabled = false; @@ -65,7 +64,7 @@ public abstract class RegionLookupFactoryBean extends AbstractFactoryBeanS private String regionName; /** - * Initializes this {@link RegionLookupFactoryBean} after properties have been set by the Spring container. + * Initializes this {@link ResolvableRegionFactoryBean} after properties have been set by the Spring container. * * @throws Exception if initialization fails. * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() @@ -170,7 +169,7 @@ public abstract class RegionLookupFactoryBean extends AbstractFactoryBeanS } /** - * Post-process the {@link Region} created by this {@link RegionFactoryBean}. + * Post-process the {@link Region} created by this {@link PeerRegionFactoryBean}. * * @param region {@link Region} to process. * @see org.apache.geode.cache.Region @@ -180,9 +179,9 @@ public abstract class RegionLookupFactoryBean extends AbstractFactoryBeanS } /** - * Returns an object reference to the {@link Region} created by this {@link RegionLookupFactoryBean}. + * Returns an object reference to the {@link Region} created by this {@link ResolvableRegionFactoryBean}. * - * @return an object reference to the {@link Region} created by this {@link RegionLookupFactoryBean}. + * @return an object reference to the {@link Region} created by this {@link ResolvableRegionFactoryBean}. * @see org.springframework.beans.factory.FactoryBean#getObject() * @see org.apache.geode.cache.Region * @see #getRegion() @@ -193,9 +192,9 @@ public abstract class RegionLookupFactoryBean extends AbstractFactoryBeanS } /** - * Returns the {@link Class} type of the {@link Region} produced by this {@link RegionLookupFactoryBean}. + * Returns the {@link Class} type of the {@link Region} produced by this {@link ResolvableRegionFactoryBean}. * - * @return the {@link Class} type of the {@link Region} produced by this {@link RegionLookupFactoryBean}. + * @return the {@link Class} type of the {@link Region} produced by this {@link ResolvableRegionFactoryBean}. * @see org.springframework.beans.factory.FactoryBean#getObjectType() */ @Override diff --git a/src/main/java/org/springframework/data/gemfire/client/ClientRegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/client/ClientRegionFactoryBean.java index b9ea6be2..c4f8132f 100644 --- a/src/main/java/org/springframework/data/gemfire/client/ClientRegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/client/ClientRegionFactoryBean.java @@ -47,7 +47,7 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.data.gemfire.ConfigurableRegionFactoryBean; import org.springframework.data.gemfire.DataPolicyConverter; import org.springframework.data.gemfire.GemfireUtils; -import org.springframework.data.gemfire.RegionLookupFactoryBean; +import org.springframework.data.gemfire.ResolvableRegionFactoryBean; import org.springframework.data.gemfire.config.annotation.RegionConfigurer; import org.springframework.data.gemfire.config.xml.GemfireConstants; import org.springframework.data.gemfire.eviction.EvictingRegionFactoryBean; @@ -75,7 +75,7 @@ import org.springframework.util.StringUtils; * @see org.springframework.beans.factory.DisposableBean * @see org.springframework.beans.factory.FactoryBean * @see org.springframework.data.gemfire.DataPolicyConverter - * @see RegionLookupFactoryBean + * @see org.springframework.data.gemfire.ResolvableRegionFactoryBean * @see org.springframework.data.gemfire.config.annotation.RegionConfigurer */ @SuppressWarnings("unused") diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/CompressionConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/CompressionConfiguration.java index 506f8fc6..8c8bbf22 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/CompressionConfiguration.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/CompressionConfiguration.java @@ -40,7 +40,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportAware; import org.springframework.core.annotation.AnnotationAttributes; import org.springframework.core.type.AnnotationMetadata; -import org.springframework.data.gemfire.RegionLookupFactoryBean; +import org.springframework.data.gemfire.ResolvableRegionFactoryBean; import org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport; import org.springframework.data.gemfire.util.CollectionUtils; import org.springframework.data.gemfire.util.SpringUtils; @@ -146,7 +146,7 @@ public class CompressionConfiguration extends AbstractAnnotationConfigSupport im return Optional.ofNullable(beanDefinition) .flatMap(it -> resolveBeanClass(it, beanFactory.getBeanClassLoader())) - .filter(beanClass -> RegionLookupFactoryBean.class.isAssignableFrom(beanClass)) + .filter(beanClass -> ResolvableRegionFactoryBean.class.isAssignableFrom(beanClass)) .isPresent(); } diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableAutoRegionLookup.java b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableAutoRegionLookup.java index a8b9588b..e72fbd65 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableAutoRegionLookup.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableAutoRegionLookup.java @@ -25,6 +25,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.context.annotation.Import; +import org.springframework.data.gemfire.PeerRegionFactoryBean; /** * The {@link EnableAutoRegionLookup} annotation configures a Spring {@link org.springframework.context.annotation.Configuration} @@ -36,7 +37,7 @@ import org.springframework.context.annotation.Import; * expression or a Spring property placeholder. * * @author John Blum - * @see org.springframework.data.gemfire.RegionFactoryBean#setLookupEnabled(Boolean) + * @see PeerRegionFactoryBean#setLookupEnabled(Boolean) * @see org.springframework.data.gemfire.config.annotation.AutoRegionLookupConfiguration * @since 1.9.0 */ diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableEntityDefinedRegions.java b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableEntityDefinedRegions.java index 314ffb7a..79c3dbc7 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableEntityDefinedRegions.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableEntityDefinedRegions.java @@ -32,6 +32,7 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.core.annotation.AliasFor; +import org.springframework.data.gemfire.PeerRegionFactoryBean; import org.springframework.data.gemfire.client.ClientRegionFactoryBean; import org.springframework.data.gemfire.config.annotation.support.CacheTypeAwareRegionFactoryBean; import org.springframework.data.gemfire.mapping.annotation.ClientRegion; @@ -54,7 +55,7 @@ import org.springframework.data.gemfire.mapping.annotation.ClientRegion; * @see org.springframework.context.annotation.ComponentScan.Filter * @see org.springframework.context.annotation.Import * @see org.springframework.core.annotation.AliasFor - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean * @see org.springframework.data.gemfire.client.ClientRegionFactoryBean * @see org.springframework.data.gemfire.config.annotation.EntityDefinedRegionsConfiguration * @see org.springframework.data.gemfire.config.annotation.IndexConfiguration diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EvictionConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/EvictionConfiguration.java index 42695e12..00387db9 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/EvictionConfiguration.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/EvictionConfiguration.java @@ -44,8 +44,8 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportAware; import org.springframework.core.annotation.AnnotationAttributes; import org.springframework.core.type.AnnotationMetadata; -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.client.ClientRegionFactoryBean; import org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport; import org.springframework.data.gemfire.eviction.EvictingRegionFactoryBean; @@ -65,8 +65,8 @@ import org.springframework.util.StringUtils; * @see org.springframework.context.annotation.Bean * @see org.springframework.context.annotation.Configuration * @see org.springframework.context.annotation.ImportAware - * @see org.springframework.data.gemfire.RegionFactoryBean - * @see org.springframework.data.gemfire.RegionLookupFactoryBean + * @see PeerRegionFactoryBean + * @see org.springframework.data.gemfire.ResolvableRegionFactoryBean * @see org.springframework.data.gemfire.client.ClientRegionFactoryBean * @see org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport * @see org.springframework.data.gemfire.eviction.EvictionActionType @@ -140,7 +140,7 @@ public class EvictionConfiguration extends AbstractAnnotationConfigSupport * @return a boolean value indicating whether the Spring bean is an instance of {@link EvictingRegionFactoryBean}. * @see org.springframework.data.gemfire.eviction.EvictingRegionFactoryBean * @see org.springframework.data.gemfire.client.ClientRegionFactoryBean - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean */ protected static boolean isRegionFactoryBean(Object bean) { return bean instanceof EvictingRegionFactoryBean; @@ -177,13 +177,13 @@ public class EvictionConfiguration extends AbstractAnnotationConfigSupport protected interface EvictionPolicyConfigurer { /** - * Configure the Eviction policy on the given SDG {@link RegionFactoryBean} or {@link ClientRegionFactoryBean} + * Configure the Eviction policy on the given SDG {@link PeerRegionFactoryBean} or {@link ClientRegionFactoryBean} * used to create a GemFire {@link Region}. * - * @param regionFactoryBean {@link RegionFactoryBean} or {@link ClientRegionFactoryBean} used to create + * @param regionFactoryBean {@link PeerRegionFactoryBean} or {@link ClientRegionFactoryBean} used to create * a GemFire {@link Region}. * @return the given {@code regionFactoryBean}. - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean * @see org.springframework.data.gemfire.client.ClientRegionFactoryBean */ Object configure(Object regionFactoryBean); @@ -409,24 +409,24 @@ public class EvictionConfiguration extends AbstractAnnotationConfigSupport } /** - * Resolves the name of a given {@link Region} from the corresponding {@link RegionLookupFactoryBean} object. + * Resolves the name of a given {@link Region} from the corresponding {@link ResolvableRegionFactoryBean} object. * - * @param regionFactoryBean {@link RegionLookupFactoryBean} from which to resolve the {@link Region} name. - * @return the resolved name of the {@link Region} created from the given {@link RegionLookupFactoryBean}. - * @see org.springframework.data.gemfire.RegionLookupFactoryBean#resolveRegionName() + * @param regionFactoryBean {@link ResolvableRegionFactoryBean} from which to resolve the {@link Region} name. + * @return the resolved name of the {@link Region} created from the given {@link ResolvableRegionFactoryBean}. + * @see org.springframework.data.gemfire.ResolvableRegionFactoryBean#resolveRegionName() */ protected String resolveRegionName(Object regionFactoryBean) { - return regionFactoryBean instanceof RegionLookupFactoryBean - ? ((RegionLookupFactoryBean) regionFactoryBean).resolveRegionName() + return regionFactoryBean instanceof ResolvableRegionFactoryBean + ? ((ResolvableRegionFactoryBean) regionFactoryBean).resolveRegionName() : null; } /** - * Sets the {@link EvictionAttributes} on the {@link RegionFactoryBean} or {@link ClientRegionFactoryBean} + * Sets the {@link EvictionAttributes} on the {@link PeerRegionFactoryBean} or {@link ClientRegionFactoryBean} * used to create the targeted {@link Region}. * - * @param regionFactoryBean {@link RegionFactoryBean} or {@link ClientRegionFactoryBean} on which to + * @param regionFactoryBean {@link PeerRegionFactoryBean} or {@link ClientRegionFactoryBean} on which to * set the {@link EvictionAttributes} encapsulating the Eviction policy for the targeted {@link Region}. * @return the {@code regionFactoryBean}. * @see org.springframework.data.gemfire.eviction.EvictingRegionFactoryBean#setEvictionAttributes(EvictionAttributes) diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/ExpirationConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/ExpirationConfiguration.java index 1872b61a..e378161c 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/ExpirationConfiguration.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/ExpirationConfiguration.java @@ -40,8 +40,8 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportAware; import org.springframework.core.annotation.AnnotationAttributes; import org.springframework.core.type.AnnotationMetadata; -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.client.ClientRegionFactoryBean; import org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport; import org.springframework.data.gemfire.expiration.AnnotationBasedExpiration; @@ -118,7 +118,7 @@ public class ExpirationConfiguration extends AbstractAnnotationConfigSupport imp * @return a boolean value indicating whether the Spring bean is an instance of {@link ExpiringRegionFactoryBean}. * @see org.springframework.data.gemfire.expiration.ExpiringRegionFactoryBean * @see org.springframework.data.gemfire.client.ClientRegionFactoryBean - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean */ protected static boolean isRegionFactoryBean(Object bean) { return bean instanceof ExpiringRegionFactoryBean; @@ -478,20 +478,20 @@ public class ExpirationConfiguration extends AbstractAnnotationConfigSupport imp } /** - * Resolves the name of a given {@link Region} from the corresponding {@link RegionLookupFactoryBean} object. + * Resolves the name of a given {@link Region} from the corresponding {@link ResolvableRegionFactoryBean} object. * - * @param regionFactoryBean {@link RegionLookupFactoryBean} from which to resolve the {@link Region} name. - * @return the resolved name of the {@link Region} created from the given {@link RegionLookupFactoryBean}. - * @see org.springframework.data.gemfire.RegionLookupFactoryBean#resolveRegionName() + * @param regionFactoryBean {@link ResolvableRegionFactoryBean} from which to resolve the {@link Region} name. + * @return the resolved name of the {@link Region} created from the given {@link ResolvableRegionFactoryBean}. + * @see org.springframework.data.gemfire.ResolvableRegionFactoryBean#resolveRegionName() */ protected String resolveRegionName(Object regionFactoryBean) { - return regionFactoryBean instanceof RegionLookupFactoryBean - ? ((RegionLookupFactoryBean) regionFactoryBean).resolveRegionName() : null; + return regionFactoryBean instanceof ResolvableRegionFactoryBean + ? ((ResolvableRegionFactoryBean) regionFactoryBean).resolveRegionName() : null; } /** * Configures the Expiration policies on the targeted {@link ExpiringRegionFactoryBean}, which may be - * either a {@link RegionFactoryBean} or {@link ClientRegionFactoryBean}. + * either a {@link PeerRegionFactoryBean} or {@link ClientRegionFactoryBean}. * * @param regionFactoryBean {@link ExpiringRegionFactoryBean} to configure. * @return the given {@link ExpiringRegionFactoryBean}. diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/OffHeapConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/OffHeapConfiguration.java index f86e60d4..e5b758c6 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/OffHeapConfiguration.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/OffHeapConfiguration.java @@ -39,7 +39,7 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.context.annotation.ImportBeanDefinitionRegistrar; import org.springframework.core.type.AnnotationMetadata; -import org.springframework.data.gemfire.RegionLookupFactoryBean; +import org.springframework.data.gemfire.ResolvableRegionFactoryBean; import org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport; import org.springframework.data.gemfire.config.annotation.support.EmbeddedServiceConfigurationSupport; import org.springframework.data.gemfire.util.CollectionUtils; @@ -134,7 +134,7 @@ public class OffHeapConfiguration extends EmbeddedServiceConfigurationSupport { return Optional.ofNullable(beanDefinition) .flatMap(it -> resolveBeanClass(it, beanFactory.getBeanClassLoader())) - .filter(beanClass -> RegionLookupFactoryBean.class.isAssignableFrom(beanClass)) + .filter(beanClass -> ResolvableRegionFactoryBean.class.isAssignableFrom(beanClass)) .isPresent(); } diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/RegionConfigurer.java b/src/main/java/org/springframework/data/gemfire/config/annotation/RegionConfigurer.java index 11a2617f..32e920b0 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/RegionConfigurer.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/RegionConfigurer.java @@ -18,7 +18,7 @@ package org.springframework.data.gemfire.config.annotation; import org.apache.geode.cache.Region; import org.springframework.context.annotation.Configuration; -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.support.CacheTypeAwareRegionFactoryBean; @@ -29,7 +29,7 @@ import org.springframework.data.gemfire.config.annotation.support.CacheTypeAware * * @author John Blum * @see org.apache.geode.cache.Region - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean * @see org.springframework.data.gemfire.client.ClientRegionFactoryBean * @see org.springframework.data.gemfire.config.annotation.EnableEntityDefinedRegions * @see CacheTypeAwareRegionFactoryBean @@ -38,14 +38,14 @@ import org.springframework.data.gemfire.config.annotation.support.CacheTypeAware public interface RegionConfigurer { /** - * Configuration callback method providing a reference to a {@link RegionFactoryBean} used to construct, configure + * Configuration callback method providing a reference to a {@link PeerRegionFactoryBean} used to construct, configure * and initialize an instance of a peer {@link Region}. * * @param beanName name of {@link Region} bean declared in the Spring application context. - * @param bean reference to the {@link RegionFactoryBean}. - * @see org.springframework.data.gemfire.RegionFactoryBean + * @param bean reference to the {@link PeerRegionFactoryBean}. + * @see PeerRegionFactoryBean */ - default void configure(String beanName, RegionFactoryBean bean) { + default void configure(String beanName, PeerRegionFactoryBean bean) { } /** diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/support/CacheTypeAwareRegionFactoryBean.java b/src/main/java/org/springframework/data/gemfire/config/annotation/support/CacheTypeAwareRegionFactoryBean.java index 594766c9..b701c712 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/support/CacheTypeAwareRegionFactoryBean.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/support/CacheTypeAwareRegionFactoryBean.java @@ -42,8 +42,8 @@ import org.springframework.data.gemfire.GemfireUtils; import org.springframework.data.gemfire.GenericRegionFactoryBean; import org.springframework.data.gemfire.LocalRegionFactoryBean; import org.springframework.data.gemfire.PartitionedRegionFactoryBean; -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.RegionShortcutWrapper; import org.springframework.data.gemfire.ReplicatedRegionFactoryBean; import org.springframework.data.gemfire.client.ClientRegionFactoryBean; @@ -74,8 +74,8 @@ import org.springframework.util.StringUtils; * @see org.springframework.data.gemfire.GenericRegionFactoryBean * @see org.springframework.data.gemfire.LocalRegionFactoryBean * @see org.springframework.data.gemfire.PartitionedRegionFactoryBean - * @see org.springframework.data.gemfire.RegionFactoryBean - * @see org.springframework.data.gemfire.RegionLookupFactoryBean + * @see PeerRegionFactoryBean + * @see org.springframework.data.gemfire.ResolvableRegionFactoryBean * @see org.springframework.data.gemfire.ReplicatedRegionFactoryBean * @see org.springframework.data.gemfire.client.ClientRegionFactoryBean * @see org.springframework.data.gemfire.config.annotation.RegionConfigurer @@ -84,7 +84,7 @@ import org.springframework.util.StringUtils; * @since 1.9.0 */ @SuppressWarnings("unused") -public class CacheTypeAwareRegionFactoryBean extends RegionLookupFactoryBean +public class CacheTypeAwareRegionFactoryBean extends ResolvableRegionFactoryBean implements EvictingRegionFactoryBean, ExpiringRegionFactoryBean { private GemFireCache gemfireCache; @@ -189,7 +189,7 @@ public class CacheTypeAwareRegionFactoryBean extends RegionLookupFactoryBe /** * Constructs, configures and initializes a new server {@link Region} using a sub-class - * of {@link RegionFactoryBean}. + * of {@link PeerRegionFactoryBean}. * * @param gemfireCache reference to the {@link GemFireCache} used to create/initialize the factory * used to create the server {@link Region}. @@ -203,7 +203,7 @@ public class CacheTypeAwareRegionFactoryBean extends RegionLookupFactoryBe */ protected Region newServerRegion(GemFireCache gemfireCache, String regionName) throws Exception { - RegionFactoryBean serverRegionFactory = newRegionFactoryBean(); + PeerRegionFactoryBean serverRegionFactory = newRegionFactoryBean(); serverRegionFactory.setAttributes(getRegionAttributes()); serverRegionFactory.setBeanFactory(getBeanFactory()); @@ -229,16 +229,16 @@ public class CacheTypeAwareRegionFactoryBean extends RegionLookupFactoryBe } /** - * Constructs a {@link Class sub-type} of the {@link RegionFactoryBean} class based on + * Constructs a {@link Class sub-type} of the {@link PeerRegionFactoryBean} class based on * the {@link #getServerRegionShortcut()} and {@link #getDataPolicy()}. * - * @return a new instance of the {@link RegionFactoryBean}. + * @return a new instance of the {@link PeerRegionFactoryBean}. * @see org.springframework.data.gemfire.LocalRegionFactoryBean * @see org.springframework.data.gemfire.PartitionedRegionFactoryBean * @see org.springframework.data.gemfire.ReplicatedRegionFactoryBean - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean */ - protected RegionFactoryBean newRegionFactoryBean() { + protected PeerRegionFactoryBean newRegionFactoryBean() { RegionShortcutWrapper regionShortcutWrapper = RegionShortcutWrapper.valueOf(getServerRegionShortcut()); @@ -423,10 +423,10 @@ public class CacheTypeAwareRegionFactoryBean extends RegionLookupFactoryBe /** * Null-safe operation used to set an array of {@link RegionConfigurer RegionConfigurers} used to apply - * additional configuration to this {@link RegionLookupFactoryBean} when using Annotation-based configuration. + * additional configuration to this {@link ResolvableRegionFactoryBean} when using Annotation-based configuration. * * @param regionConfigurers array of {@link RegionConfigurer RegionConfigurers} used to apply - * additional configuration to this {@link RegionLookupFactoryBean}. + * additional configuration to this {@link ResolvableRegionFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.RegionConfigurer * @see #setRegionConfigurers(List) */ @@ -436,10 +436,10 @@ public class CacheTypeAwareRegionFactoryBean extends RegionLookupFactoryBe /** * Null-safe operation used to set an {@link Iterable} of {@link RegionConfigurer RegionConfigurers} used to apply - * additional configuration to this {@link RegionLookupFactoryBean} when using Annotation-based configuration. + * additional configuration to this {@link ResolvableRegionFactoryBean} when using Annotation-based configuration. * * @param regionConfigurers {@link Iterable} of {@link RegionConfigurer RegionConfigurers} used to apply - * additional configuration to this {@link RegionLookupFactoryBean}. + * additional configuration to this {@link ResolvableRegionFactoryBean}. * @see org.springframework.data.gemfire.config.annotation.RegionConfigurer */ public void setRegionConfigurers(List regionConfigurers) { diff --git a/src/main/java/org/springframework/data/gemfire/config/xml/AbstractRegionParser.java b/src/main/java/org/springframework/data/gemfire/config/xml/AbstractRegionParser.java index 9e569bf5..9632d60b 100644 --- a/src/main/java/org/springframework/data/gemfire/config/xml/AbstractRegionParser.java +++ b/src/main/java/org/springframework/data/gemfire/config/xml/AbstractRegionParser.java @@ -32,6 +32,7 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.ManagedArray; import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.data.gemfire.PeerRegionFactoryBean; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; @@ -44,7 +45,7 @@ import org.w3c.dom.Element; * @author David Turanski * @author John Blum * @see org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean */ abstract class AbstractRegionParser extends AbstractSingleBeanDefinitionParser { diff --git a/src/main/java/org/springframework/data/gemfire/config/xml/TemplateRegionParser.java b/src/main/java/org/springframework/data/gemfire/config/xml/TemplateRegionParser.java index 20f538fc..ea82d562 100644 --- a/src/main/java/org/springframework/data/gemfire/config/xml/TemplateRegionParser.java +++ b/src/main/java/org/springframework/data/gemfire/config/xml/TemplateRegionParser.java @@ -19,14 +19,14 @@ package org.springframework.data.gemfire.config.xml; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.data.gemfire.RegionAttributesFactoryBean; -import org.springframework.data.gemfire.RegionFactoryBean; +import org.springframework.data.gemfire.PeerRegionFactoryBean; import org.w3c.dom.Element; /** * Bean definition parser for <gfe:*-region-template> SDG XML namespace (XSD) elements. * * @author John Blum - * @see org.springframework.data.gemfire.RegionFactoryBean + * @see PeerRegionFactoryBean * @see AbstractRegionParser * @since 1.5.0 */ @@ -37,7 +37,7 @@ class TemplateRegionParser extends AbstractRegionParser { */ @Override protected Class getRegionFactoryClass() { - return RegionFactoryBean.class; + return PeerRegionFactoryBean.class; } /** diff --git a/src/main/java/org/springframework/data/gemfire/support/DeclarableSupport.java b/src/main/java/org/springframework/data/gemfire/support/DeclarableSupport.java index a59b8bd5..0c7b166c 100644 --- a/src/main/java/org/springframework/data/gemfire/support/DeclarableSupport.java +++ b/src/main/java/org/springframework/data/gemfire/support/DeclarableSupport.java @@ -22,14 +22,14 @@ import static org.springframework.data.gemfire.support.GemfireBeanFactoryLocator import org.apache.geode.cache.CacheCallback; import org.apache.geode.cache.Declarable; import org.springframework.beans.factory.BeanFactory; -import org.springframework.data.gemfire.RegionFactoryBean; +import org.springframework.data.gemfire.PeerRegionFactoryBean; /** * Convenience class for Spring-aware GemFire {@link Declarable} components. Provides subclasses with a reference * to the current Spring {@link BeanFactory} in orde to perform Spring bean lookups or resource loading. * * Note, in most cases, the developer should just declare the same components as Spring beans in the Spring container, - * through {@link RegionFactoryBean}, which gives access to the full Spring container capabilities and does not + * through {@link PeerRegionFactoryBean}, which gives access to the full Spring container capabilities and does not * enforce the {@link Declarable} interface to be implemented. * * @author Costin Leau diff --git a/src/test/java/org/springframework/data/gemfire/GenericRegionFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/GenericRegionFactoryBeanTest.java index 18200a36..edd5a687 100644 --- a/src/test/java/org/springframework/data/gemfire/GenericRegionFactoryBeanTest.java +++ b/src/test/java/org/springframework/data/gemfire/GenericRegionFactoryBeanTest.java @@ -62,14 +62,14 @@ public class GenericRegionFactoryBeanTest { .set("log-level", "warning") .create(); - RegionFactoryBean defaultRegionFactory = new GenericRegionFactoryBean(); + PeerRegionFactoryBean defaultRegionFactory = new GenericRegionFactoryBean(); defaultRegionFactory.setCache(gemfireCache); defaultRegionFactory.setName("DefaultRegion"); defaultRegionFactory.afterPropertiesSet(); defaultRegion = defaultRegionFactory.getObject(); - RegionFactoryBean emptyRegionFactory = new GenericRegionFactoryBean(); + PeerRegionFactoryBean emptyRegionFactory = new GenericRegionFactoryBean(); emptyRegionFactory.setCache(gemfireCache); emptyRegionFactory.setDataPolicy(DataPolicy.EMPTY); emptyRegionFactory.setName("EmptyRegion"); @@ -78,7 +78,7 @@ public class GenericRegionFactoryBeanTest { emptyRegion = emptyRegionFactory.getObject(); - RegionFactoryBean localRegionFactory = new GenericRegionFactoryBean(); + PeerRegionFactoryBean localRegionFactory = new GenericRegionFactoryBean(); localRegionFactory.setCache(gemfireCache); localRegionFactory.setDataPolicy(DataPolicy.NORMAL); localRegionFactory.setName("LocalRegion"); @@ -87,7 +87,7 @@ public class GenericRegionFactoryBeanTest { localRegion = localRegionFactory.getObject(); - RegionFactoryBean normalRegionFactory = new GenericRegionFactoryBean(); + PeerRegionFactoryBean normalRegionFactory = new GenericRegionFactoryBean(); normalRegionFactory.setCache(gemfireCache); normalRegionFactory.setDataPolicy(DataPolicy.NORMAL); normalRegionFactory.setName("NormalRegion"); @@ -96,7 +96,7 @@ public class GenericRegionFactoryBeanTest { normalRegion = normalRegionFactory.getObject(); - RegionFactoryBean persistentPartitionRegionFactory = new GenericRegionFactoryBean(); + PeerRegionFactoryBean persistentPartitionRegionFactory = new GenericRegionFactoryBean(); persistentPartitionRegionFactory.setCache(gemfireCache); persistentPartitionRegionFactory.setDataPolicy(DataPolicy.PERSISTENT_PARTITION); persistentPartitionRegionFactory.setName("PersistentPartitionRegion"); @@ -105,7 +105,7 @@ public class GenericRegionFactoryBeanTest { persistentPartitionRegion = persistentPartitionRegionFactory.getObject(); - RegionFactoryBean preloadedRegionFactory = new GenericRegionFactoryBean(); + PeerRegionFactoryBean preloadedRegionFactory = new GenericRegionFactoryBean(); preloadedRegionFactory.setCache(gemfireCache); preloadedRegionFactory.setDataPolicy(DataPolicy.PRELOADED); preloadedRegionFactory.setName("PreloadedRegion"); @@ -113,7 +113,7 @@ public class GenericRegionFactoryBeanTest { preloadedRegion = preloadedRegionFactory.getObject(); - RegionFactoryBean replicateRegionFactory = new GenericRegionFactoryBean(); + PeerRegionFactoryBean replicateRegionFactory = new GenericRegionFactoryBean(); replicateRegionFactory.setCache(gemfireCache); replicateRegionFactory.setDataPolicy(DataPolicy.REPLICATE); replicateRegionFactory.setName("ReplicateRegion"); diff --git a/src/test/java/org/springframework/data/gemfire/RegionFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/PeerRegionFactoryBeanTest.java similarity index 98% rename from src/test/java/org/springframework/data/gemfire/RegionFactoryBeanTest.java rename to src/test/java/org/springframework/data/gemfire/PeerRegionFactoryBeanTest.java index b52ebbf3..eb94dddf 100644 --- a/src/test/java/org/springframework/data/gemfire/RegionFactoryBeanTest.java +++ b/src/test/java/org/springframework/data/gemfire/PeerRegionFactoryBeanTest.java @@ -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 extends RegionFactoryBean { + protected static class TestRegionFactoryBean extends PeerRegionFactoryBean { } } diff --git a/src/test/java/org/springframework/data/gemfire/config/annotation/RegionConfigurerIntegrationTests.java b/src/test/java/org/springframework/data/gemfire/config/annotation/RegionConfigurerIntegrationTests.java index c0fc2138..b7f7ee94 100644 --- a/src/test/java/org/springframework/data/gemfire/config/annotation/RegionConfigurerIntegrationTests.java +++ b/src/test/java/org/springframework/data/gemfire/config/annotation/RegionConfigurerIntegrationTests.java @@ -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 beanNames = new HashSet<>(); @Override - public void configure(String beanName, RegionFactoryBean bean) { + public void configure(String beanName, PeerRegionFactoryBean bean) { this.beanNames.add(beanName); } diff --git a/src/test/java/org/springframework/data/gemfire/config/support/LuceneIndexRegionBeanFactoryPostProcessorIntegrationTests.java b/src/test/java/org/springframework/data/gemfire/config/support/LuceneIndexRegionBeanFactoryPostProcessorIntegrationTests.java index 15fcd01e..6e34dd60 100644 --- a/src/test/java/org/springframework/data/gemfire/config/support/LuceneIndexRegionBeanFactoryPostProcessorIntegrationTests.java +++ b/src/test/java/org/springframework/data/gemfire/config/support/LuceneIndexRegionBeanFactoryPostProcessorIntegrationTests.java @@ -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; } } } diff --git a/src/test/java/org/springframework/data/gemfire/config/xml/CacheSubscriptionTest.java b/src/test/java/org/springframework/data/gemfire/config/xml/CacheSubscriptionTest.java index 81226f37..6b4d02d7 100644 --- a/src/test/java/org/springframework/data/gemfire/config/xml/CacheSubscriptionTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/xml/CacheSubscriptionTest.java @@ -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); diff --git a/src/test/java/org/springframework/data/gemfire/config/xml/DiskStoreAndEvictionRegionParsingTest.java b/src/test/java/org/springframework/data/gemfire/config/xml/DiskStoreAndEvictionRegionParsingTest.java index 63e4ab18..f1d0010d 100644 --- a/src/test/java/org/springframework/data/gemfire/config/xml/DiskStoreAndEvictionRegionParsingTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/xml/DiskStoreAndEvictionRegionParsingTest.java @@ -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()); diff --git a/src/test/java/org/springframework/data/gemfire/config/xml/GemfireV7GatewayNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/xml/GemfireV7GatewayNamespaceTest.java index 101c9cf3..0fa2f342 100644 --- a/src/test/java/org/springframework/data/gemfire/config/xml/GemfireV7GatewayNamespaceTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/xml/GemfireV7GatewayNamespaceTest.java @@ -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); diff --git a/src/test/java/org/springframework/data/gemfire/config/xml/InvalidRegionDefinitionUsingBeansNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/xml/InvalidRegionDefinitionUsingBeansNamespaceTest.java index eca90c42..1232f97b 100644 --- a/src/test/java/org/springframework/data/gemfire/config/xml/InvalidRegionDefinitionUsingBeansNamespaceTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/xml/InvalidRegionDefinitionUsingBeansNamespaceTest.java @@ -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 extends RegionFactoryBean { } + public static final class TestRegionFactoryBean extends PeerRegionFactoryBean { } } diff --git a/src/test/java/org/springframework/data/gemfire/config/xml/LocalRegionNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/xml/LocalRegionNamespaceTest.java index c1f03931..7e8648e2 100644 --- a/src/test/java/org/springframework/data/gemfire/config/xml/LocalRegionNamespaceTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/xml/LocalRegionNamespaceTest.java @@ -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")); diff --git a/src/test/java/org/springframework/data/gemfire/config/xml/PartitionedRegionNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/xml/PartitionedRegionNamespaceTest.java index 39a20353..ef0483f5 100644 --- a/src/test/java/org/springframework/data/gemfire/config/xml/PartitionedRegionNamespaceTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/xml/PartitionedRegionNamespaceTest.java @@ -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); diff --git a/src/test/java/org/springframework/data/gemfire/config/xml/RegionDefinitionUsingBeansNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/xml/RegionDefinitionUsingBeansNamespaceTest.java index 4caaf7cf..63bd5984 100644 --- a/src/test/java/org/springframework/data/gemfire/config/xml/RegionDefinitionUsingBeansNamespaceTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/xml/RegionDefinitionUsingBeansNamespaceTest.java @@ -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 extends RegionFactoryBean { + public static final class TestRegionFactoryBean extends PeerRegionFactoryBean { } } diff --git a/src/test/java/org/springframework/data/gemfire/config/xml/ReplicatedRegionNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/xml/ReplicatedRegionNamespaceTest.java index 98109f0f..5ff6cff8 100644 --- a/src/test/java/org/springframework/data/gemfire/config/xml/ReplicatedRegionNamespaceTest.java +++ b/src/test/java/org/springframework/data/gemfire/config/xml/ReplicatedRegionNamespaceTest.java @@ -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")); } diff --git a/src/test/java/org/springframework/data/gemfire/test/support/AbstractRegionFactoryBeanTests.java b/src/test/java/org/springframework/data/gemfire/test/support/AbstractRegionFactoryBeanTests.java index c2e54a00..ce30f225 100644 --- a/src/test/java/org/springframework/data/gemfire/test/support/AbstractRegionFactoryBeanTests.java +++ b/src/test/java/org/springframework/data/gemfire/test/support/AbstractRegionFactoryBeanTests.java @@ -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); diff --git a/src/test/resources/org/springframework/data/gemfire/basic-region.xml b/src/test/resources/org/springframework/data/gemfire/basic-region.xml index ed22a356..c7d2d503 100644 --- a/src/test/resources/org/springframework/data/gemfire/basic-region.xml +++ b/src/test/resources/org/springframework/data/gemfire/basic-region.xml @@ -17,7 +17,7 @@ - +