Class GemfireRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>

java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.gemfire.repository.support.GemfireRepositoryFactoryBean<T,S,ID>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationEventPublisherAware, org.springframework.data.repository.core.support.RepositoryFactoryInformation<S,ID>

public class GemfireRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID> extends org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID> implements org.springframework.context.ApplicationContextAware
Spring FactoryBean adapter for GemfireRepositoryFactory.
See Also:
  • Constructor Details

  • Method Details

    • setApplicationContext

      public void setApplicationContext(@Nullable org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Sets a reference to the Spring ApplicationContext.
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Parameters:
      applicationContext - reference to the Spring ApplicationContext.
      Throws:
      org.springframework.beans.BeansException
      See Also:
      • ApplicationContextAware.setApplicationContext(ApplicationContext)
      • ApplicationContext
    • getApplicationContext

      protected Optional<org.springframework.context.ApplicationContext> getApplicationContext()
      Returns an Optional reference to the configured Spring ApplicationContext.
      Returns:
      an Optional reference to the configured Spring ApplicationContext.
      See Also:
    • setCache

      public void setCache(@Nullable org.apache.geode.cache.GemFireCache cache)
      Set a reference to the Apache Geode GemFireCache.
      Parameters:
      cache - reference to the Apache Geode GemFireCache.
      See Also:
      • GemFireCache
    • getCache

      protected Optional<org.apache.geode.cache.GemFireCache> getCache()
      Returns an Optional reference to the configured Apache Geode GemFireCache.
      Returns:
      an Optional reference to the configured Apache Geode GemFireCache.
      See Also:
      • GemFireCache
    • setGemfireMappingContext

      @Autowired(required=false) public void setGemfireMappingContext(@Nullable org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> mappingContext)
      Configures the MappingContext used to perform application domain object type to data store mappings.
      Parameters:
      mappingContext - MappingContext to configure.
      See Also:
    • getGemfireMappingContext

      @Nullable protected org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> getGemfireMappingContext()
      Returns a reference to the Spring Data MappingContext used to perform application domain object type to data store mappings.
      Returns:
      a reference to the MappingContext.
      See Also:
    • getRegions

      protected Iterable<org.apache.geode.cache.Region<?,?>> getRegions()
      Returns an Iterable of Regionsdefined in the Spring ApplicationContext.
      Returns:
      a reference to all Regions defined in the Spring ApplicationContext.
      See Also:
    • afterPropertiesSet

      public void afterPropertiesSet()
      Initializes the GemfireRepositoryFactoryBean by configuring Regions and resolving the GemfireMappingContext.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
      See Also:
    • configureRegions

      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.
    • createRepositoryFactory

      protected org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory()
      Creates a new instance of GemfireRepositoryFactory used to create an Apache Geode Repository.
      Specified by:
      createRepositoryFactory in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
      See Also:
      • RepositoryFactoryBeanSupport.createRepositoryFactory()
      • RepositoryFactorySupport
    • resolveGemfireMappingContext

      protected org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> resolveGemfireMappingContext()
      Attempts to resolve the MappingContext used to map entities to Apache Geode.
      Returns:
      a reference to the resolved MappingContext.
      Throws:
      IllegalStateException - if the MappingContext cannot be resolved.
      See Also: