Spring Data for VMware GemFire
Class EntityDefinedRegionsConfiguration
java.lang.Object
org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
org.springframework.data.gemfire.config.annotation.EntityDefinedRegionsConfiguration
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.context.annotation.ImportBeanDefinitionRegistrar,org.springframework.context.EnvironmentAware
- Direct Known Subclasses:
IndexConfiguration
public class EntityDefinedRegionsConfiguration
extends AbstractAnnotationConfigSupport
implements org.springframework.context.annotation.ImportBeanDefinitionRegistrar
The
EntityDefinedRegionsConfiguration class is Spring ImportBeanDefinitionRegistrar used in
the EnableEntityDefinedRegions annotation to dynamically create GemFire/Geode Regions
based on the application persistent entity classes.- Since:
- 1.9.0
- See Also:
-
ClassLoaderAnnotationRegionBeanDefinitionBeanDefinitionBuilderBeanDefinitionRegistryImportBeanDefinitionRegistrarFixedPartitionAttributesFactoryBeanLocalRegionFactoryBeanPartitionAttributesFactoryBeanPartitionedRegionFactoryBeanRegionAttributesFactoryBeanReplicatedRegionFactoryBeanClientRegionFactoryBeanAbstractAnnotationConfigSupportCacheTypeAwareRegionFactoryBeanGemFireComponentClassTypeScannerGemfireMappingContextGemfirePersistentEntityClientRegionLocalRegionPartitionRegionReplicateRegionRegion
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classTheEntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadataclass encapsulates details for creating aRegionfrom application persistent entities.Nested classes/interfaces inherited from class org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
AbstractAnnotationConfigSupport.TypeResolver<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.geode.cache.client.ClientRegionShortcutprotected static final org.apache.geode.cache.RegionShortcutFields inherited from class org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
CURRENT_THREAD_CONTEXT_CLASS_LOADER, INFRASTRUCTURE_ROLES, ORG_SPRINGFRAMEWORK_DATA_GEMFIRE_PACKAGE, ORG_SPRINGFRAMEWORK_PACKAGE, SPRING_DATA_GEMFIRE_PROPERTY_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<? extends Annotation>Returns theAnnotationtypethat configures and createsRegionsfor application persistent entities.protected GemfirePersistentEntity<?>getPersistentEntity(Class<?> persistentEntityType) Returns the associatedpersistent entityfor the given application domain object type.protected GemFireComponentClassTypeScannernewGemFireComponentClassTypeScanner(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionsAttributes) protected GemfirePersistentEntity<?>postProcess(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, GemfirePersistentEntity<?> persistentEntity) Performs addition post processing on theGemfirePersistentEntityto offer additional feature support (e.g.voidregisterBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry) RegistersRegionbean definitions in the Spring context for all application domain object that have been identified aspersistent entities.protected voidregisterRegionBeanDefinition(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry) Registers an individual bean definition in the Spring container for theRegiondetermined from the application domain object,persistent entity.resolveBasePackages(org.springframework.core.type.AnnotationMetadata importingClassMetaData, org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionAttributes) protected org.apache.geode.cache.client.ClientRegionShortcutresolveClientRegionShortcut(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes) protected Iterable<org.springframework.core.type.filter.TypeFilter>resolveExcludes(org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionsAttributes) protected Iterable<org.springframework.core.type.filter.TypeFilter>resolveIncludes(org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionsAttributes) protected GemfireMappingContextResolves themapping contextby returning the configuredmapping contextif present, or attempts to lookup themapping contextfrom the configuredBeanFactory.protected Iterable<org.springframework.core.type.filter.TypeFilter>protected List<RegionConfigurer>protected org.apache.geode.cache.RegionShortcutresolveServerRegionShortcut(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes) protected org.springframework.beans.factory.support.BeanDefinitionBuildersetClientRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder) protected org.springframework.beans.factory.support.BeanDefinitionBuildersetFixedPartitionRegionAttributes(org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder partitionAttributesFactoryBeanBuilder) protected org.springframework.beans.factory.support.BeanDefinitionBuildersetPartitionRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder, org.springframework.beans.factory.support.BeanDefinitionBuilder regionAttributesFactoryBeanBuilder) protected org.springframework.beans.factory.support.BeanDefinitionBuildersetRegionAttributes(org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder, EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata) protected org.springframework.beans.factory.support.BeanDefinitionBuildersetReplicateRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder) Methods inherited from class org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
arrayOfPropertyNamesFor, arrayOfPropertyNamesFor, asArrayProperty, cacheClientProperty, cacheCompressionProperty, cacheOffHeapProperty, cachePeerProperty, cacheProperty, cacheServerProperty, clusterProperty, diskStoreProperty, entitiesProperty, gatewayReceiverProperty, gatewaySenderProperty, getAnnotationAttributes, getAnnotationAttributes, getAnnotationAttributes, getAnnotationTypeName, getAnnotationTypeSimpleName, getBeanClassLoader, getBeanFactory, getEnvironment, getEvaluationContext, getLogger, hasValue, hasValue, hasValue, httpServiceProperty, isAnnotationPresent, isAnnotationPresent, isNotInfrastructureBean, isNotInfrastructureBean, isNotInfrastructureClass, isNotInfrastructureRole, isUserLevelMethod, locatorProperty, logDebug, logDebug, logError, logError, loggingProperty, logInfo, logInfo, logWarning, logWarning, managementProperty, managerProperty, memcachedServiceProperty, namedCacheServerProperty, namedDiskStoreProperty, namedGatewaySenderProperty, namedPoolProperty, newEvaluationContext, newLogger, pdxProperty, poolProperty, propertyName, register, register, requireProperty, resolveAnnotation, resolveBeanClass, resolveBeanClass, resolveBeanClass, resolveBeanClassLoader, resolveBeanClassLoader, resolveBeanClassLoader, resolveBeanClassName, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, safeResolveType, securityProperty, serviceProperty, setBeanClassLoader, setBeanFactory, setEnvironment, sslProperty, statsPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar
registerBeanDefinitions
-
Field Details
-
DEFAULT_CLIENT_REGION_SHORTCUT
protected static final org.apache.geode.cache.client.ClientRegionShortcut DEFAULT_CLIENT_REGION_SHORTCUT -
DEFAULT_SERVER_REGION_SHORTCUT
protected static final org.apache.geode.cache.RegionShortcut DEFAULT_SERVER_REGION_SHORTCUT
-
-
Constructor Details
-
EntityDefinedRegionsConfiguration
public EntityDefinedRegionsConfiguration()
-
-
Method Details
-
getAnnotationType
Returns theAnnotationtypethat configures and createsRegionsfor application persistent entities.- Specified by:
getAnnotationTypein classAbstractAnnotationConfigSupport- Returns:
- the
Annotationtypethat configures and createsRegionsfor application persistent entities. - See Also:
-
registerBeanDefinitions
public void registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry) RegistersRegionbean definitions in the Spring context for all application domain object that have been identified aspersistent entities.- Specified by:
registerBeanDefinitionsin interfaceorg.springframework.context.annotation.ImportBeanDefinitionRegistrar- Parameters:
importingClassMetadata-Classwith theEnableEntityDefinedRegionsannotation.registry-BeanDefinitionRegistryused to register theRegionbean definitions in the Spring context.- See Also:
-
BeanDefinitionRegistryAnnotationMetadata
-
newGemFireComponentClassTypeScanner
protected GemFireComponentClassTypeScanner newGemFireComponentClassTypeScanner(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionsAttributes) -
resolveBasePackages
-
resolveExcludes
protected Iterable<org.springframework.core.type.filter.TypeFilter> resolveExcludes(org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionsAttributes) -
resolveIncludes
protected Iterable<org.springframework.core.type.filter.TypeFilter> resolveIncludes(org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionsAttributes) -
resolveRegionAnnotatedPersistentEntityTypeFilters
protected Iterable<org.springframework.core.type.filter.TypeFilter> resolveRegionAnnotatedPersistentEntityTypeFilters() -
getPersistentEntity
Returns the associatedpersistent entityfor the given application domain object type.- Parameters:
persistentEntityType-typeof the application domain object used to lookup thepersistent entityfrom the {@link @GemfireMappingContext mapping context}.- Returns:
- the
persistent entityfor the given application domain object type. - See Also:
-
resolveMappingContext
Resolves themapping contextby returning the configuredmapping contextif present, or attempts to lookup themapping contextfrom the configuredBeanFactory. If the lookup is unsuccessful, then this method will return a newmapping context.- Returns:
- the resolved
mapping context. - See Also:
-
registerRegionBeanDefinition
protected void registerRegionBeanDefinition(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry) Registers an individual bean definition in the Spring container for theRegiondetermined from the application domain object,persistent entity.- Parameters:
regionMetadata-EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadataused to configure theRegionbean definition.registry-BeanDefinitionRegistryused to register theRegionbean definition in the Spring context.- See Also:
-
BeanDefinitionRegistryGemfirePersistentEntity
-
resolveRegionConfigurers
-
setRegionAttributes
protected org.springframework.beans.factory.support.BeanDefinitionBuilder setRegionAttributes(org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder, EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata) -
resolveClientRegionShortcut
protected org.apache.geode.cache.client.ClientRegionShortcut resolveClientRegionShortcut(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes) -
resolveServerRegionShortcut
protected org.apache.geode.cache.RegionShortcut resolveServerRegionShortcut(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes) -
setClientRegionAttributes
protected org.springframework.beans.factory.support.BeanDefinitionBuilder setClientRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder) -
setPartitionRegionAttributes
protected org.springframework.beans.factory.support.BeanDefinitionBuilder setPartitionRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder, org.springframework.beans.factory.support.BeanDefinitionBuilder regionAttributesFactoryBeanBuilder) -
setFixedPartitionRegionAttributes
protected org.springframework.beans.factory.support.BeanDefinitionBuilder setFixedPartitionRegionAttributes(org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder partitionAttributesFactoryBeanBuilder) -
setReplicateRegionAttributes
protected org.springframework.beans.factory.support.BeanDefinitionBuilder setReplicateRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder) -
postProcess
protected GemfirePersistentEntity<?> postProcess(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, GemfirePersistentEntity<?> persistentEntity) Performs addition post processing on theGemfirePersistentEntityto offer additional feature support (e.g. dynamic Index creation).- Parameters:
importingClassMetadata-AnnotationMetadatafor the importing application class.registry-BeanDefinitionRegistryused to register Spring bean definitions.persistentEntity-GemfirePersistentEntityto process.- Returns:
- the given
GemfirePersistentEntity. - See Also:
-
BeanDefinitionRegistryAnnotationMetadataGemfirePersistentEntity
-