public class GemfireRepositoryFactoryBean<T extends Repository<S,ID>,S,ID> extends RepositoryFactoryBeanSupport<T,S,ID> implements ApplicationContextAware
FactoryBean adapter for GemfireRepositoryFactory.GemFireCache,
Region,
FactoryBean,
ApplicationContext,
ApplicationContextAware,
GemfireMappingContext,
GemfirePersistentEntity,
GemfirePersistentProperty,
GemfireRepositoryQuery,
QueryPostProcessor,
MappingContext,
Repository,
RepositoryDefinition,
QueryCreationListener,
RepositoryFactoryBeanSupport,
RepositoryFactorySupport| Modifier and Type | Class and Description |
|---|---|
protected class |
GemfireRepositoryFactoryBean.QueryPostProcessorRegistrationOnQueryCreationListener |
OBJECT_TYPE_ATTRIBUTE| Constructor and Description |
|---|
GemfireRepositoryFactoryBean(Class<? extends T> repositoryInterface)
Constructs a new instance of
GemfireRepositoryFactoryBean initialized with the given Repository
interface. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Initializes the
GemfireRepositoryFactoryBean by configuring Regions and resolving
the GemfireMappingContext. |
protected void |
configureRegions()
Configures a reference to a
Set of all Regions defined, declared and registered in
the Spring ApplicationContext as well as in the Apache Geode GemFireCache. |
protected RepositoryFactorySupport |
createRepositoryFactory()
Creates a new instance of
GemfireRepositoryFactory used to create an Apache Geode Repository. |
protected Optional<ApplicationContext> |
getApplicationContext()
Returns an
Optional reference to the configured Spring ApplicationContext. |
protected Optional<org.apache.geode.cache.GemFireCache> |
getCache()
Returns an
Optional reference to the configured Apache Geode GemFireCache. |
protected MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> |
getGemfireMappingContext()
Returns a reference to the Spring Data
MappingContext used to perform application domain object type
to data store mappings. |
protected Iterable<org.apache.geode.cache.Region<?,?>> |
getRegions()
|
protected MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> |
resolveGemfireMappingContext()
Attempts to resolve the
MappingContext used to map entities
to Apache Geode. |
void |
setApplicationContext(ApplicationContext applicationContext)
Sets a reference to the Spring
ApplicationContext. |
void |
setCache(org.apache.geode.cache.GemFireCache cache)
Set a reference to the Apache Geode
GemFireCache. |
void |
setGemfireMappingContext(MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> mappingContext)
Configures the
MappingContext used to perform application domain object type to data store mappings. |
addRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setBeanFactory, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setMappingContext, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragmentspublic GemfireRepositoryFactoryBean(Class<? extends T> repositoryInterface)
GemfireRepositoryFactoryBean initialized with the given Repository
interface.repositoryInterface - interface specifying the application data access operations contract;
must not be null.IllegalArgumentException - if the Repository interface is null.Classpublic void setApplicationContext(@Nullable ApplicationContext applicationContext) throws BeansException
ApplicationContext.setApplicationContext in interface ApplicationContextAwareapplicationContext - reference to the Spring ApplicationContext.BeansExceptionApplicationContextAware.setApplicationContext(ApplicationContext),
ApplicationContextprotected Optional<ApplicationContext> getApplicationContext()
Optional reference to the configured Spring ApplicationContext.Optional reference to the configured Spring ApplicationContext.ApplicationContext,
Optionalpublic void setCache(@Nullable org.apache.geode.cache.GemFireCache cache)
GemFireCache.cache - reference to the Apache Geode GemFireCache.GemFireCacheprotected Optional<org.apache.geode.cache.GemFireCache> getCache()
Optional reference to the configured Apache Geode GemFireCache.Optional reference to the configured Apache Geode GemFireCache.GemFireCache@Autowired(required=false) public void setGemfireMappingContext(@Nullable MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> mappingContext)
MappingContext used to perform application domain object type to data store mappings.mappingContext - MappingContext to configure.GemfireMappingContext,
MappingContext@Nullable protected MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> getGemfireMappingContext()
MappingContext used to perform application domain object type
to data store mappings.MappingContext.GemfireMappingContext,
MappingContext,
setGemfireMappingContext(MappingContext)protected Iterable<org.apache.geode.cache.Region<?,?>> getRegions()
Regions defined in the Spring ApplicationContext.Region,
Iterablepublic void afterPropertiesSet()
GemfireRepositoryFactoryBean by configuring Regions and resolving
the GemfireMappingContext.afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID>configureRegions(),
resolveGemfireMappingContext(),
InitializingBean.afterPropertiesSet()protected void configureRegions()
Set of all Regions defined, declared and registered in
the Spring ApplicationContext as well as in the Apache Geode GemFireCache.protected RepositoryFactorySupport createRepositoryFactory()
GemfireRepositoryFactory used to create an Apache Geode Repository.createRepositoryFactory in class RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID>RepositoryFactoryBeanSupport.createRepositoryFactory(),
RepositoryFactorySupportprotected MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> resolveGemfireMappingContext()
MappingContext used to map entities
to Apache Geode.MappingContext.IllegalStateException - if the MappingContext cannot be resolved.GemfireMappingContext,
MappingContextCopyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.