Class InlineCachingRegionConfigurer<T,ID>

java.lang.Object
org.springframework.geode.cache.InlineCachingRegionConfigurer<T,ID>
All Implemented Interfaces:
org.springframework.core.Ordered, org.springframework.data.gemfire.config.annotation.RegionConfigurer, org.springframework.data.gemfire.config.annotation.support.Configurer<org.springframework.data.gemfire.client.ClientRegionFactoryBean<?,?>>

public class InlineCachingRegionConfigurer<T,ID> extends Object implements org.springframework.data.gemfire.config.annotation.RegionConfigurer
A RegionConfigurer implementation used to enable Inline Caching on a designated Region.
Since:
1.1.0
See Also:
  • Constructor Details

    • InlineCachingRegionConfigurer

      public InlineCachingRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable Predicate<String> regionBeanName)
      Constructs a new instance of InlineCachingRegionConfigurer initialized with the given CrudRepository used for Inline Caching and Predicate used to identify the target Region on which the CacheLoader and CacheWriter will be registered.
      Parameters:
      repository - Spring Data CrudRepository used for Inline Caching between a Region and external data source.
      regionBeanName - Predicate identifying the target Region on which to enable Inline Caching.
      Throws:
      IllegalArgumentException - if CrudRepository is null.
      See Also:
  • Method Details

    • newRepositoryCacheLoaderRegionConfigurer

      protected RepositoryCacheLoaderRegionConfigurer<T,ID> newRepositoryCacheLoaderRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable Predicate<String> regionBeanName)
      Constructs a new instance of RepositoryCacheLoaderRegionConfigurer initialized with the given CrudRepository to load (read-through) Region values on cache misses and Predicate to identify the target Region on which to register the CacheLoader.
      Parameters:
      repository - CrudRepository used to load Region values on cache misses.
      regionBeanName - Predicate used to identify the target Region on which to register the CacheLoader.
      Returns:
      a new RepositoryCacheLoaderRegionConfigurer.
      See Also:
    • newRepositoryCacheWriterRegionConfigurer

      protected RepositoryCacheWriterRegionConfigurer<T,ID> newRepositoryCacheWriterRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable Predicate<String> regionBeanName)
      Constructs a new instance of RepositoryCacheWriterRegionConfigurer initialized with the given CrudRepository to write-through to an external data source and Predicate to identify the target Region on which to register the CacheWriter.
      Parameters:
      repository - CrudRepository used to write-through to the external data source.
      regionBeanName - Predicate used to identify the target Region on which to register the CacheWriter.
      Returns:
      a new RepositoryCacheWriterRegionConfigurer.
      See Also:
    • configure

      public void configure(String beanName, org.springframework.data.gemfire.client.ClientRegionFactoryBean<?,?> bean)
      Specified by:
      configure in interface org.springframework.data.gemfire.config.annotation.support.Configurer<T>
      Specified by:
      configure in interface org.springframework.data.gemfire.config.annotation.RegionConfigurer
    • configure

      public void configure(String beanName, org.springframework.data.gemfire.PeerRegionFactoryBean<?,?> bean)
      Specified by:
      configure in interface org.springframework.data.gemfire.config.annotation.RegionConfigurer