Class EntityDefinedRegionsConfiguration
java.lang.Object
org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
org.springframework.data.gemfire.config.annotation.EntityDefinedRegionsConfiguration
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,ImportBeanDefinitionRegistrar
,EnvironmentAware
- Direct Known Subclasses:
IndexConfiguration
public class EntityDefinedRegionsConfiguration
extends AbstractAnnotationConfigSupport
implements 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
- Author:
- John Blum
- See Also:
-
ClassLoader
Annotation
Region
BeanDefinition
BeanDefinitionBuilder
BeanDefinitionRegistry
ImportBeanDefinitionRegistrar
FixedPartitionAttributesFactoryBean
LocalRegionFactoryBean
PartitionAttributesFactoryBean
PartitionedRegionFactoryBean
RegionAttributesFactoryBean
ReplicatedRegionFactoryBean
ClientRegionFactoryBean
AbstractAnnotationConfigSupport
CacheTypeAwareRegionFactoryBean
GemFireComponentClassTypeScanner
GemfireMappingContext
GemfirePersistentEntity
ClientRegion
LocalRegion
PartitionRegion
ReplicateRegion
Region
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
TheEntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata
class encapsulates details for creating aRegion
from application persistent entities.Nested classes/interfaces inherited from class org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
AbstractAnnotationConfigSupport.TypeResolver<T>
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final ClientRegionShortcut
protected static final RegionShortcut
Fields inherited from class org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
INFRASTRUCTURE_ROLES, ORG_SPRINGFRAMEWORK_DATA_GEMFIRE_PACKAGE, ORG_SPRINGFRAMEWORK_PACKAGE, SPRING_DATA_GEMFIRE_PROPERTY_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Class<? extends Annotation>
Returns theAnnotation
type
that configures and createsRegions
for application persistent entities.protected GemfirePersistentEntity<?>
getPersistentEntity
(Class<?> persistentEntityType) Returns the associatedpersistent entity
for the given application domain object type.protected GemFireComponentClassTypeScanner
newGemFireComponentClassTypeScanner
(AnnotationMetadata importingClassMetadata, AnnotationAttributes enableEntityDefinedRegionsAttributes) protected GemfirePersistentEntity<?>
postProcess
(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry, GemfirePersistentEntity<?> persistentEntity) Performs addition post processing on theGemfirePersistentEntity
to offer additional feature support (e.g. dynamic Index creation).void
registerBeanDefinitions
(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) RegistersRegion
bean definitions in the Spring context for all application domain object that have been identified aspersistent entities
.protected void
registerRegionBeanDefinition
(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, BeanDefinitionRegistry registry) Registers an individual bean definition in the Spring container for theRegion
determined from the application domain object,persistent entity
.resolveBasePackages
(AnnotationMetadata importingClassMetaData, AnnotationAttributes enableEntityDefinedRegionAttributes) protected ClientRegionShortcut
resolveClientRegionShortcut
(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, AnnotationAttributes regionAnnotationAttributes) protected Iterable<TypeFilter>
resolveExcludes
(AnnotationAttributes enableEntityDefinedRegionsAttributes) protected Iterable<TypeFilter>
resolveIncludes
(AnnotationAttributes enableEntityDefinedRegionsAttributes) protected GemfireMappingContext
Resolves themapping context
by returning the configuredmapping context
if present, or attempts to lookup themapping context
from the configuredBeanFactory
.protected Iterable<TypeFilter>
protected List<RegionConfigurer>
protected RegionShortcut
resolveServerRegionShortcut
(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, AnnotationAttributes regionAnnotationAttributes) protected BeanDefinitionBuilder
setClientRegionAttributes
(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, AnnotationAttributes regionAnnotationAttributes, BeanDefinitionBuilder regionFactoryBeanBuilder) protected BeanDefinitionBuilder
setFixedPartitionRegionAttributes
(AnnotationAttributes regionAnnotationAttributes, BeanDefinitionBuilder partitionAttributesFactoryBeanBuilder) protected BeanDefinitionBuilder
setPartitionRegionAttributes
(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, AnnotationAttributes regionAnnotationAttributes, BeanDefinitionBuilder regionFactoryBeanBuilder, BeanDefinitionBuilder regionAttributesFactoryBeanBuilder) protected BeanDefinitionBuilder
setRegionAttributes
(BeanDefinitionBuilder regionFactoryBeanBuilder, EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata) protected BeanDefinitionBuilder
setReplicateRegionAttributes
(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, AnnotationAttributes regionAnnotationAttributes, 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, getLog, hasValue, hasValue, hasValue, httpServiceProperty, isAnnotationPresent, isAnnotationPresent, isNotInfrastructureBean, isNotInfrastructureBean, isNotInfrastructureClass, isNotInfrastructureClass, isNotInfrastructureRole, isUserLevelMethod, locatorProperty, logDebug, logDebug, logError, logError, loggingProperty, logInfo, logInfo, logWarning, logWarning, managementProperty, managerProperty, memcachedServiceProperty, namedCacheServerProperty, namedDiskStoreProperty, namedGatewaySenderProperty, namedPoolProperty, newEvaluationContext, newLog, pdxProperty, poolProperty, propertyName, redisServiceProperty, register, register, requireProperty, resolveAnnotation, resolveBeanClass, resolveBeanClass, resolveBeanClass, resolveBeanClassLoader, resolveBeanClassLoader, resolveBeanClassName, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, safeResolveType, securityProperty, serviceProperty, setBeanClassLoader, setBeanFactory, setEnvironment, sslProperty, statsProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar
registerBeanDefinitions
-
Field Details
-
DEFAULT_CLIENT_REGION_SHORTCUT
-
DEFAULT_SERVER_REGION_SHORTCUT
-
-
Constructor Details
-
EntityDefinedRegionsConfiguration
public EntityDefinedRegionsConfiguration()
-
-
Method Details
-
getAnnotationType
Returns theAnnotation
type
that configures and createsRegions
for application persistent entities.- Specified by:
getAnnotationType
in classAbstractAnnotationConfigSupport
- Returns:
- the
Annotation
type
that configures and createsRegions
for application persistent entities. - See Also:
-
registerBeanDefinitions
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) RegistersRegion
bean definitions in the Spring context for all application domain object that have been identified aspersistent entities
.- Specified by:
registerBeanDefinitions
in interfaceImportBeanDefinitionRegistrar
- Parameters:
importingClassMetadata
-Class
with theEnableEntityDefinedRegions
annotation.registry
-BeanDefinitionRegistry
used to register theRegion
bean definitions in the Spring context.- See Also:
-
newGemFireComponentClassTypeScanner
protected GemFireComponentClassTypeScanner newGemFireComponentClassTypeScanner(AnnotationMetadata importingClassMetadata, AnnotationAttributes enableEntityDefinedRegionsAttributes) -
resolveBasePackages
protected Set<String> resolveBasePackages(AnnotationMetadata importingClassMetaData, AnnotationAttributes enableEntityDefinedRegionAttributes) -
resolveExcludes
protected Iterable<TypeFilter> resolveExcludes(AnnotationAttributes enableEntityDefinedRegionsAttributes) -
resolveIncludes
protected Iterable<TypeFilter> resolveIncludes(AnnotationAttributes enableEntityDefinedRegionsAttributes) -
resolveRegionAnnotatedPersistentEntityTypeFilters
-
getPersistentEntity
Returns the associatedpersistent entity
for the given application domain object type.- Parameters:
persistentEntityType
-type
of the application domain object used to lookup thepersistent entity
from the {@link @GemfireMappingContext mapping context}.- Returns:
- the
persistent entity
for the given application domain object type. - See Also:
-
resolveMappingContext
Resolves themapping context
by returning the configuredmapping context
if present, or attempts to lookup themapping context
from 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, BeanDefinitionRegistry registry) Registers an individual bean definition in the Spring container for theRegion
determined from the application domain object,persistent entity
.- Parameters:
regionMetadata
-EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata
used to configure theRegion
bean definition.registry
-BeanDefinitionRegistry
used to register theRegion
bean definition in the Spring context.- See Also:
-
resolveRegionConfigurers
-
setRegionAttributes
protected BeanDefinitionBuilder setRegionAttributes(BeanDefinitionBuilder regionFactoryBeanBuilder, EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata) -
resolveClientRegionShortcut
protected ClientRegionShortcut resolveClientRegionShortcut(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, AnnotationAttributes regionAnnotationAttributes) -
resolveServerRegionShortcut
protected RegionShortcut resolveServerRegionShortcut(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, AnnotationAttributes regionAnnotationAttributes) -
setClientRegionAttributes
protected BeanDefinitionBuilder setClientRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, AnnotationAttributes regionAnnotationAttributes, BeanDefinitionBuilder regionFactoryBeanBuilder) -
setPartitionRegionAttributes
protected BeanDefinitionBuilder setPartitionRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, AnnotationAttributes regionAnnotationAttributes, BeanDefinitionBuilder regionFactoryBeanBuilder, BeanDefinitionBuilder regionAttributesFactoryBeanBuilder) -
setFixedPartitionRegionAttributes
protected BeanDefinitionBuilder setFixedPartitionRegionAttributes(AnnotationAttributes regionAnnotationAttributes, BeanDefinitionBuilder partitionAttributesFactoryBeanBuilder) -
setReplicateRegionAttributes
protected BeanDefinitionBuilder setReplicateRegionAttributes(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, AnnotationAttributes regionAnnotationAttributes, BeanDefinitionBuilder regionFactoryBeanBuilder) -
postProcess
protected GemfirePersistentEntity<?> postProcess(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry, GemfirePersistentEntity<?> persistentEntity) Performs addition post processing on theGemfirePersistentEntity
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:
-