DATAGEDOE-58 - Add support for configuring client and server Region data management policies in Caching-defined Regions.
This improvement allows users to configure both the client and server Region data management policies using the new clientRegionShortcut and serverRegionShortcut attributes on the EnableCachingDefinedRegions annotation, which default to o.a.g.cache.client.ClientRegionShortcut#PROXY and o.a.g.cache.RegionShortcut#PARTITION, respectively. Additionally, a user may configure the name of a dedicated Pool to use for all caching-defined client Regions. Move all common Annotation-based configuration logic from CachingDefinedRegionsConfiguration to AbstractAnnotationConfigSupport.
This commit is contained in:
@@ -1572,11 +1572,11 @@ the following CQ...
|
||||
[source, java]
|
||||
----
|
||||
@SpringBootApplication
|
||||
@ClientCacheApplication(subcriptionEnabled = true);
|
||||
@ClientCacheApplication(subcriptionEnabled = true)
|
||||
@EnableContinuousQueries
|
||||
class PublisherPrintApplication {
|
||||
|
||||
@ContinuousQuery(name = "DemandExceedsSupply" query =
|
||||
@ContinuousQuery(name = "DemandExceedsSupply", query =
|
||||
"SELECT book.* FROM /Books book, /Inventory inventory
|
||||
WHERE book.title = 'How to crush it in the Book business like Amazon"
|
||||
AND inventory.isbn = book.isbn
|
||||
|
||||
@@ -516,7 +516,8 @@ _Spring Data Geode_ provides an implementation of the _Spring_
|
||||
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#cache[Cache Abstraction]
|
||||
to position Apache Geode as a _caching provider_ in Spring's caching infrastructure.
|
||||
|
||||
To use Apache Geode as a backing implementation, simply add `GemfireCacheManager` to your configuration:
|
||||
To use Apache Geode as a backing implementation, a "_caching provider_" _in Spring's Cache Abstraction_,
|
||||
simply add `GemfireCacheManager` to your configuration:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -542,7 +543,7 @@ To use Apache Geode as a backing implementation, simply add `GemfireCacheManager
|
||||
----
|
||||
|
||||
NOTE: The `cache-ref` attribute on the `CacheManager` bean definition is not necessary if the default cache bean name
|
||||
is used (i.e. "gemfireCache"), that is, `<gfe:cache>` without an explicit ID.
|
||||
is used (i.e. "gemfireCache"), i.e. `<gfe:cache>` without an explicit ID.
|
||||
|
||||
When the `GemfireCacheManager` (Singleton) bean instance is declared and declarative caching is enabled
|
||||
(either in XML with `<cache:annotation-driven/>` or in JavaConfig with _Spring's_ `@EnableCaching` annotation),
|
||||
@@ -552,7 +553,7 @@ using Geode Regions.
|
||||
These caches (i.e. Regions) must exist before the caching annotations that use them otherwise an error will occur.
|
||||
|
||||
By way of example, suppose you have a Customer Service application with a `CustomerService` application component
|
||||
that does caching...
|
||||
that performs caching...
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@@ -587,7 +588,7 @@ XML:
|
||||
|
||||
<gfe:cache/>
|
||||
|
||||
<gfe:partitioned-region id="accontsRegion" name="Accounts" persistent="true" ...>
|
||||
<gfe:partitioned-region id="accountsRegion" name="Accounts" persistent="true" ...>
|
||||
...
|
||||
</gfe:partitioned-region>
|
||||
</beans>
|
||||
@@ -608,7 +609,9 @@ class ApplicationConfiguration {
|
||||
|
||||
@Bean
|
||||
GemfireCacheManager cacheManager() {
|
||||
return new GemfireCacheManager(gemfireCache());
|
||||
GemfireCacheManager cacheManager = GemfireCacheManager();
|
||||
cacheManager.setCache(gemfireCache());
|
||||
return cacheManager;
|
||||
}
|
||||
|
||||
@Bean("Accounts")
|
||||
|
||||
Reference in New Issue
Block a user