Spring Boot for VMware GemFire
Package org.springframework.geode.cache
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:
-
PredicateCacheLoaderCacheWriterRegionRegionConfigurerRepositoryCacheLoaderRegionConfigurerRepositoryCacheWriterRegionConfigurer
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionInlineCachingRegionConfigurer(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Constructs a new instance ofInlineCachingRegionConfigurerinitialized with the givenCrudRepositoryused for Inline Caching andPredicateused to identify the targetRegionon which theCacheLoaderandCacheWriterwill be registered. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(String beanName, org.springframework.data.gemfire.client.ClientRegionFactoryBean<?, ?> bean) voidprotected RepositoryCacheLoaderRegionConfigurer<T,ID> newRepositoryCacheLoaderRegionConfigurer(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Constructs a new instance ofRepositoryCacheLoaderRegionConfigurerinitialized with the givenCrudRepositoryto load (read-through)Regionvalues on cache misses andPredicateto identify the targetRegionon which to register theCacheLoader.protected RepositoryCacheWriterRegionConfigurer<T,ID> newRepositoryCacheWriterRegionConfigurer(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Constructs a new instance ofRepositoryCacheWriterRegionConfigurerinitialized with the givenCrudRepositoryto write-through to an external data source andPredicateto identify the targetRegionon which to register theCacheWriter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.gemfire.config.annotation.support.Configurer
getOrder
-
Constructor Details
-
InlineCachingRegionConfigurer
public InlineCachingRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T, ID> repository, @Nullable Predicate<String> regionBeanName) Constructs a new instance ofInlineCachingRegionConfigurerinitialized with the givenCrudRepositoryused for Inline Caching andPredicateused to identify the targetRegionon which theCacheLoaderandCacheWriterwill be registered.- Parameters:
repository- Spring DataCrudRepositoryused for Inline Caching between aRegionand external data source.regionBeanName-Predicateidentifying the targetRegionon which to enable Inline Caching.- Throws:
IllegalArgumentException- ifCrudRepositoryis null.- See Also:
-
CrudRepositoryPredicate
-
-
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 ofRepositoryCacheLoaderRegionConfigurerinitialized with the givenCrudRepositoryto load (read-through)Regionvalues on cache misses andPredicateto identify the targetRegionon which to register theCacheLoader.- Parameters:
repository-CrudRepositoryused to loadRegionvalues on cache misses.regionBeanName-Predicateused to identify the targetRegionon which to register theCacheLoader.- Returns:
- a new
RepositoryCacheLoaderRegionConfigurer. - See Also:
-
RepositoryCacheLoaderRegionConfigurerCrudRepositoryPredicate
-
newRepositoryCacheWriterRegionConfigurer
protected RepositoryCacheWriterRegionConfigurer<T,ID> newRepositoryCacheWriterRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T, ID> repository, @Nullable Predicate<String> regionBeanName) Constructs a new instance ofRepositoryCacheWriterRegionConfigurerinitialized with the givenCrudRepositoryto write-through to an external data source andPredicateto identify the targetRegionon which to register theCacheWriter.- Parameters:
repository-CrudRepositoryused to write-through to the external data source.regionBeanName-Predicateused to identify the targetRegionon which to register theCacheWriter.- Returns:
- a new
RepositoryCacheWriterRegionConfigurer. - See Also:
-
RepositoryCacheWriterRegionConfigurerCrudRepositoryPredicate
-
configure
public void configure(String beanName, org.springframework.data.gemfire.client.ClientRegionFactoryBean<?, ?> bean) - Specified by:
configurein interfaceorg.springframework.data.gemfire.config.annotation.support.Configurer<T>- Specified by:
configurein interfaceorg.springframework.data.gemfire.config.annotation.RegionConfigurer
-
configure
public void configure(String beanName, org.springframework.data.gemfire.PeerRegionFactoryBean<?, ?> bean) - Specified by:
configurein interfaceorg.springframework.data.gemfire.config.annotation.RegionConfigurer
-