Class CachingDefinedRegionsConfiguration

java.lang.Object
org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport
org.springframework.data.gemfire.config.annotation.CachingDefinedRegionsConfiguration
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.annotation.ImportAware, org.springframework.context.EnvironmentAware

@Configuration public class CachingDefinedRegionsConfiguration extends AbstractAnnotationConfigSupport implements org.springframework.context.annotation.ImportAware
The CachingDefinedRegionsConfiguration class is a Spring @Configuration class that applies configuration to a Spring (Data GemFire/Geode) application to create GemFire/Geode cache Regions based on the use of Spring's Cache Abstraction to enable caching for application service classes and methods.
Since:
2.0.0
See Also:
  • Constructor Details

    • CachingDefinedRegionsConfiguration

      public CachingDefinedRegionsConfiguration()
  • Method Details

    • getAnnotationType

      protected Class<? extends Annotation> getAnnotationType()
      Returns the Annotation type that configures and creates Regions for application service Methods that are annotated with Spring's Cache Abstraction Annotations.
      Specified by:
      getAnnotationType in class AbstractAnnotationConfigSupport
      Returns:
      the Annotation type that configures and creates Regions for application service Methods that are annotated with Spring's Cache Abstraction Annotations.
      See Also:
    • getCacheNameResolver

      protected CachingDefinedRegionsConfiguration.CacheNameResolver getCacheNameResolver()
      Returns the configured CachingDefinedRegionsConfiguration.CacheNameResolver to resolve all the declared cache name on Spring application beans/components declared and registered in the Spring container (context).
      Returns:
      the configured CachingDefinedRegionsConfiguration.CacheNameResolver to resolve all teh caches used by the Spring application.
      See Also:
    • setClientRegionShortcut

      public void setClientRegionShortcut(org.apache.geode.cache.client.ClientRegionShortcut clientRegionShortcut)
      Configures the ClientRegionShortcut specifying the data management policy to use when creating a client Region.
      Parameters:
      clientRegionShortcut - ClientRegionShortcut specifying the data management policy to use when creating a client Region.
      See Also:
      • ClientRegionShortcut
    • getClientRegionShortcut

      protected Optional<org.apache.geode.cache.client.ClientRegionShortcut> getClientRegionShortcut()
      Returns the configured ClientRegionShortcut specifying the data management policy to use when creating a client Region.
      Returns:
      an Optional ClientRegionShortcut specifying the data management policy to use when creating a client Region.
      See Also:
    • resolveClientRegionShortcut

      protected org.apache.geode.cache.client.ClientRegionShortcut resolveClientRegionShortcut()
      Resolves the ClientRegionShortcut specifying the data management policy to use when creating a client Region; defaults to ClientRegionShortcut.PROXY.
      Returns:
      the resolved ClientRegionShortcut specifying the data management policy to use when creating a client Region; defaults to ClientRegionShortcut.PROXY.
      See Also:
    • setPoolName

      public void setPoolName(String poolName)
      Configures the name of the dedicated Pool used by all caching-defined client Regions to send and receive data between the client and server.
      Parameters:
      poolName - String containing the name of the dedicated Pool for all caching-defined client Regions.
    • getPoolName

      protected Optional<String> getPoolName()
      Returns the name of the dedicated Pool used by all caching-defined client Regions to send and receive data between the client and server.
      Returns:
      an Optional name of the dedicated Pool used by all caching-defined client Regions.
      See Also:
    • resolvePoolName

      protected String resolvePoolName()
      Resolves the name of the dedicated Pool used by all caching-defined client Regions to send and receive data between the client and server; defaults to DEFAULT.
      Returns:
      the name of the dedicated Pool used by all caching-defined client Regions; defaults to DEFAULT.
      See Also:
    • setServerRegionShortcut

      public void setServerRegionShortcut(org.apache.geode.cache.RegionShortcut serverRegionShortcut)
      Configures the RegionShortcut specifying the data management policy to use when creating a server (peer) Region.
      Parameters:
      serverRegionShortcut - RegionShortcut specifying the data management policy to use when creating a server (peer) Region.
      See Also:
      • RegionShortcut
    • getServerRegionShortcut

      protected Optional<org.apache.geode.cache.RegionShortcut> getServerRegionShortcut()
      Returns the configured RegionShortcut specifying the data management policy to use when creating a server (peer) Region.
      Returns:
      an Optional RegionShortcut specifying the data management policy to use when creating a server (peer) Region.
      See Also:
    • resolveServerRegionShortcut

      protected org.apache.geode.cache.RegionShortcut resolveServerRegionShortcut()
      Resolves the RegionShortcut specifying the data management policy to use when creating a server (peer) Region; defaults to RegionShortcut.PARTITION.
      Returns:
      the resolved RegionShortcut specifying the data management policy to use when creating a server (peer) Region; defaults to RegionShortcut.PARTITION.
      See Also:
    • setImportMetadata

      public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
      Specified by:
      setImportMetadata in interface org.springframework.context.annotation.ImportAware
    • cachingAnnotationsRegionBeanRegistrar

      @Bean public org.springframework.beans.factory.config.BeanPostProcessor cachingAnnotationsRegionBeanRegistrar(org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory)
    • cachingDefinedRegionsCompositeLifecycleBean

      @Bean public org.springframework.context.Lifecycle cachingDefinedRegionsCompositeLifecycleBean()