public class InlineCachingRegionConfigurer<T,ID>
extends java.lang.Object
implements org.springframework.data.gemfire.config.annotation.RegionConfigurer
RegionConfigurer
implementation used to enable Inline Caching on a designated Region
.Predicate
,
CacheLoader
,
CacheWriter
,
Region
,
RegionConfigurer
,
RepositoryCacheLoaderRegionConfigurer
,
RepositoryCacheWriterRegionConfigurer
Constructor and Description |
---|
InlineCachingRegionConfigurer(org.springframework.data.repository.CrudRepository<T,ID> repository,
java.util.function.Predicate<java.lang.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. |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.lang.String beanName,
org.springframework.data.gemfire.client.ClientRegionFactoryBean<?,?> bean) |
void |
configure(java.lang.String beanName,
org.springframework.data.gemfire.PeerRegionFactoryBean<?,?> bean) |
protected RepositoryCacheLoaderRegionConfigurer<T,ID> |
newRepositoryCacheLoaderRegionConfigurer(org.springframework.data.repository.CrudRepository<T,ID> repository,
java.util.function.Predicate<java.lang.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 . |
protected RepositoryCacheWriterRegionConfigurer<T,ID> |
newRepositoryCacheWriterRegionConfigurer(org.springframework.data.repository.CrudRepository<T,ID> repository,
java.util.function.Predicate<java.lang.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 . |
public InlineCachingRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable java.util.function.Predicate<java.lang.String> regionBeanName)
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.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.java.lang.IllegalArgumentException
- if CrudRepository
is null.CrudRepository
,
Predicate
protected RepositoryCacheLoaderRegionConfigurer<T,ID> newRepositoryCacheLoaderRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable java.util.function.Predicate<java.lang.String> regionBeanName)
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
.repository
- CrudRepository
used to load Region
values on cache misses.regionBeanName
- Predicate
used to identify the target Region
on which
to register the CacheLoader
.RepositoryCacheLoaderRegionConfigurer
.RepositoryCacheLoaderRegionConfigurer
,
CrudRepository
,
Predicate
protected RepositoryCacheWriterRegionConfigurer<T,ID> newRepositoryCacheWriterRegionConfigurer(@NonNull org.springframework.data.repository.CrudRepository<T,ID> repository, @Nullable java.util.function.Predicate<java.lang.String> regionBeanName)
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
.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
.RepositoryCacheWriterRegionConfigurer
.RepositoryCacheWriterRegionConfigurer
,
CrudRepository
,
Predicate
public void configure(java.lang.String beanName, org.springframework.data.gemfire.client.ClientRegionFactoryBean<?,?> bean)
configure
in interface org.springframework.data.gemfire.config.annotation.RegionConfigurer
configure
in interface org.springframework.data.gemfire.config.annotation.support.Configurer<org.springframework.data.gemfire.client.ClientRegionFactoryBean<?,?>>
public void configure(java.lang.String beanName, org.springframework.data.gemfire.PeerRegionFactoryBean<?,?> bean)
configure
in interface org.springframework.data.gemfire.config.annotation.RegionConfigurer