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:
-
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 org.apache.geode.cache.client.ClientRegionShortcut
protected static final org.apache.geode.cache.RegionShortcut
Fields 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
-
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
(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 theGemfirePersistentEntity
to offer additional feature support (e.g.void
registerBeanDefinitions
(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.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, org.springframework.beans.factory.support.BeanDefinitionRegistry registry) Registers an individual bean definition in the Spring container for theRegion
determined 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.ClientRegionShortcut
resolveClientRegionShortcut
(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 GemfireMappingContext
Resolves themapping context
by returning the configuredmapping context
if present, or attempts to lookup themapping context
from the configuredBeanFactory
.protected Iterable<org.springframework.core.type.filter.TypeFilter>
protected List<RegionConfigurer>
protected org.apache.geode.cache.RegionShortcut
resolveServerRegionShortcut
(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, Annotation regionAnnotation, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes) protected org.springframework.beans.factory.support.BeanDefinitionBuilder
setClientRegionAttributes
(EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata, org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder) protected org.springframework.beans.factory.support.BeanDefinitionBuilder
setFixedPartitionRegionAttributes
(org.springframework.core.annotation.AnnotationAttributes regionAnnotationAttributes, org.springframework.beans.factory.support.BeanDefinitionBuilder partitionAttributesFactoryBeanBuilder) 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) protected org.springframework.beans.factory.support.BeanDefinitionBuilder
setRegionAttributes
(org.springframework.beans.factory.support.BeanDefinitionBuilder regionFactoryBeanBuilder, EntityDefinedRegionsConfiguration.RegionBeanDefinitionMetadata regionMetadata) protected org.springframework.beans.factory.support.BeanDefinitionBuilder
setReplicateRegionAttributes
(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, 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
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 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(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry) RegistersRegion
bean definitions in the Spring context for all application domain object that have been identified aspersistent entities
.- Specified by:
registerBeanDefinitions
in interfaceorg.springframework.context.annotation.ImportBeanDefinitionRegistrar
- Parameters:
importingClassMetadata
-Class
with theEnableEntityDefinedRegions
annotation.registry
-BeanDefinitionRegistry
used to register theRegion
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
-
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 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, org.springframework.beans.factory.support.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:
-
BeanDefinitionRegistry
GemfirePersistentEntity
-
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 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:
-
BeanDefinitionRegistry
AnnotationMetadata
GemfirePersistentEntity
-