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:
-
Predicate
CacheLoader
CacheWriter
Region
RegionConfigurer
RepositoryCacheLoaderRegionConfigurer
RepositoryCacheWriterRegionConfigurer
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionInlineCachingRegionConfigurer
(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Constructs a new instance ofInlineCachingRegionConfigurer
initialized with the givenCrudRepository
used for Inline Caching andPredicate
used to identify the targetRegion
on which theCacheLoader
andCacheWriter
will be registered. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(String beanName, org.springframework.data.gemfire.client.ClientRegionFactoryBean<?, ?> bean) void
protected RepositoryCacheLoaderRegionConfigurer<T,
ID> newRepositoryCacheLoaderRegionConfigurer
(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Constructs a new instance ofRepositoryCacheLoaderRegionConfigurer
initialized with the givenCrudRepository
to load (read-through)Region
values on cache misses andPredicate
to identify the targetRegion
on which to register theCacheLoader
.protected RepositoryCacheWriterRegionConfigurer<T,
ID> newRepositoryCacheWriterRegionConfigurer
(org.springframework.data.repository.CrudRepository<T, ID> repository, Predicate<String> regionBeanName) Constructs a new instance ofRepositoryCacheWriterRegionConfigurer
initialized with the givenCrudRepository
to write-through to an external data source andPredicate
to identify the targetRegion
on which to register theCacheWriter
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 ofInlineCachingRegionConfigurer
initialized with the givenCrudRepository
used for Inline Caching andPredicate
used to identify the targetRegion
on which theCacheLoader
andCacheWriter
will be registered.- Parameters:
repository
- Spring DataCrudRepository
used for Inline Caching between aRegion
and external data source.regionBeanName
-Predicate
identifying the targetRegion
on which to enable Inline Caching.- Throws:
IllegalArgumentException
- ifCrudRepository
is null.- See Also:
-
CrudRepository
Predicate
-
-
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 ofRepositoryCacheLoaderRegionConfigurer
initialized with the givenCrudRepository
to load (read-through)Region
values on cache misses andPredicate
to identify the targetRegion
on which to register theCacheLoader
.- Parameters:
repository
-CrudRepository
used to loadRegion
values on cache misses.regionBeanName
-Predicate
used to identify the targetRegion
on which to register theCacheLoader
.- Returns:
- a new
RepositoryCacheLoaderRegionConfigurer
. - See Also:
-
RepositoryCacheLoaderRegionConfigurer
CrudRepository
Predicate
-
newRepositoryCacheWriterRegionConfigurer
protected RepositoryCacheWriterRegionConfigurer<T,ID> newRepositoryCacheWriterRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T, ID> repository, @Nullable Predicate<String> regionBeanName) Constructs a new instance ofRepositoryCacheWriterRegionConfigurer
initialized with the givenCrudRepository
to write-through to an external data source andPredicate
to identify the targetRegion
on which to register theCacheWriter
.- Parameters:
repository
-CrudRepository
used to write-through to the external data source.regionBeanName
-Predicate
used to identify the targetRegion
on which to register theCacheWriter
.- Returns:
- a new
RepositoryCacheWriterRegionConfigurer
. - See Also:
-
RepositoryCacheWriterRegionConfigurer
CrudRepository
Predicate
-
configure
public void configure(String beanName, org.springframework.data.gemfire.client.ClientRegionFactoryBean<?, ?> bean) - Specified by:
configure
in interfaceorg.springframework.data.gemfire.config.annotation.support.Configurer<T>
- Specified by:
configure
in interfaceorg.springframework.data.gemfire.config.annotation.RegionConfigurer
-
configure
public void configure(String beanName, org.springframework.data.gemfire.PeerRegionFactoryBean<?, ?> bean) - Specified by:
configure
in interfaceorg.springframework.data.gemfire.config.annotation.RegionConfigurer
-