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:
  • 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

      protected Class<? extends Annotation> getAnnotationType()
      Returns the Annotation type that configures and creates Regions for application persistent entities.
      Specified by:
      getAnnotationType in class AbstractAnnotationConfigSupport
      Returns:
      the Annotation type that configures and creates Regions for application persistent entities.
      See Also:
    • registerBeanDefinitions

      public void registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Registers Region bean definitions in the Spring context for all application domain object that have been identified as persistent entities.
      Specified by:
      registerBeanDefinitions in interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar
      Parameters:
      importingClassMetadata - Class with the EnableEntityDefinedRegions annotation.
      registry - BeanDefinitionRegistry used to register the Region bean definitions in the Spring context.
      See Also:
      • BeanDefinitionRegistry
      • AnnotationMetadata
    • newGemFireComponentClassTypeScanner

      protected GemFireComponentClassTypeScanner newGemFireComponentClassTypeScanner(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionsAttributes)
    • resolveBasePackages

      protected Set<String> resolveBasePackages(org.springframework.core.type.AnnotationMetadata importingClassMetaData, org.springframework.core.annotation.AnnotationAttributes enableEntityDefinedRegionAttributes)
    • 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

      protected GemfirePersistentEntity<?> getPersistentEntity(Class<?> persistentEntityType)
      Returns the associated persistent entity for the given application domain object type.
      Parameters:
      persistentEntityType - type of the application domain object used to lookup the persistent entity from the {@link @GemfireMappingContext mapping context}.
      Returns:
      the persistent entity for the given application domain object type.
      See Also:
    • resolveMappingContext

      @NonNull protected GemfireMappingContext resolveMappingContext()
      Resolves the mapping context by returning the configured mapping context if present, or attempts to lookup the mapping context from the configured BeanFactory. If the lookup is unsuccessful, then this method will return a new mapping 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 the Region determined from the application domain object, persistent entity.
      Parameters:
      regionMetadata - EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata used to configure the Region bean definition.
      registry - BeanDefinitionRegistry used to register the Region bean definition in the Spring context.
      See Also:
    • resolveRegionConfigurers

      protected List<RegionConfigurer> 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 the GemfirePersistentEntity to offer additional feature support (e.g. dynamic Index creation).
      Parameters:
      importingClassMetadata - AnnotationMetadata for the importing application class.
      registry - BeanDefinitionRegistry used to register Spring bean definitions.
      persistentEntity - GemfirePersistentEntity to process.
      Returns:
      the given GemfirePersistentEntity.
      See Also: