diff --git a/docs/src/reference/docbook/index.xml b/docs/src/reference/docbook/index.xml index d34b81e3..474d7210 100644 --- a/docs/src/reference/docbook/index.xml +++ b/docs/src/reference/docbook/index.xml @@ -1,8 +1,7 @@ + xmlns:xi="http://www.w3.org/2001/XInclude"> Spring Data GemFire Reference Guide ${version} @@ -30,11 +29,6 @@ Gierke SpringSource, a division of Pivotal - - Lyndon - Adams - Pivotal - @@ -74,6 +68,7 @@ + diff --git a/docs/src/reference/docbook/introduction/introduction.xml b/docs/src/reference/docbook/introduction/introduction.xml index a717c170..3ae01ba7 100644 --- a/docs/src/reference/docbook/introduction/introduction.xml +++ b/docs/src/reference/docbook/introduction/introduction.xml @@ -1,14 +1,16 @@ - Introduction - - This reference guide for the Spring Data GemFire project explains how to use Spring framework to - configure and develop applications with vFabric GemFire. - It presents the basic concepts, semantics and provides numerous examples to help you get started. - + Introduction + + + This reference guide for Spring Data GemFire explains how to use the Spring Framework to configure + and develop applications with Pivotal GemFire. It presents the basic concepts, semantics and provides + numerous examples to help you get started. + + + + Spring Data GemFire started as a top-level Spring project called Spring GemFire (SGF) and since then + has been moved under the Spring Data umbrella project and renamed accordingly. + - Spring Data GemFire started as a top level Spring project called - Spring GemFire (SGF) and has since moved under the Spring Data umbrella project - and has been renamed accordingly. - diff --git a/docs/src/reference/docbook/introduction/new-features.xml b/docs/src/reference/docbook/introduction/new-features.xml index 45a01980..6ea22ac5 100644 --- a/docs/src/reference/docbook/introduction/new-features.xml +++ b/docs/src/reference/docbook/introduction/new-features.xml @@ -1,112 +1,248 @@ - - New Features + + New Features - - As of the 1.2.0 release, this project, formerly known as Spring GemFire, has been renamed to Spring Data GemFire to reflect that it is now a component of the + + As of the 1.2.0 release, this project, formerly known as Spring GemFire, has been renamed to Spring Data GemFire + to reflect that it is now a component of the + Spring Data project. + - Spring Data +
+ New in the 1.2.0 Release - project. - + + + + Full support for GemFire configuration via the SDG gfe namespace. Now GemFire + components may be configured completely without requiring a native cache.xml + file. + + + + WAN Gateway support for GemFire 6.6.x. See . + + + + Spring Data Repository support using a dedicated SDG namespace, gfe-data. + See + + + + Namespace support for registering GemFire Functions. See + + + + A top-level <disk-store> element has been added to the SDG + gfe namespace to allow sharing of persist stores among Regions, + and other components that support persistent backup or overflow. + See + + The <*-region> elements no longer allow a nested + <disk-store> + + + + + GemFire Sub-Regions are supported via nested <*-region> elements. + + + A <local-region> element has been added to configure a Local Region. + + +
-
- New in the 1.3.0 Release +
+ New in the 1.2.1 Release - - - Annotation support for GemFire functions. It is now possible to - declare and register functions written as POJOs with annotations. In - addition function executions are defined as annotated interfaces, - similar to the way Spring Data repositories work. See - + + + Support for the re-designed WAN Gateway in GemFire 7.0. + + +
- - We have added a <datasource> tag to the - gfe-data XML namespace. This simplifies - establishing a basic client connection to a GemFire data - grid. - +
+ New in the 1.3.0 Release - - To support JSON features introduced in GemFire 7.0, we have - added a ,<json-region-autoproxy> tag to the gfe-data XML - namespace, enabling Spring AOP to perform the necessary conversions - automatically on region operations. - + + + + Annotation support for GemFire Functions. It is now possible to declare and register Functions + written as POJOs using annotations. In addition, Function executions are defined as + annotated interfaces, similar to the way Spring Data Repositories work. + See . + + + + + Added a <datasource> element to the SDG gfe-data namespace to + simplify establishing a basic client connection + to a GemFire data grid. + + + + + Added a <json-region-autoproxy> element to the SDG gfe-data + namespace to support JSON features introduced + in GemFire 7.0, enabling Spring AOP to perform the necessary conversions automatically + on Region operations. + + + + Upgraded to GemFire 7.0.1 and added namespace support for new AsyncEventQueue attributes. + + + Added support for setting subscription interest policy on Regions. + + +
- - Upgraded to GemFire 7.0.1 and added namespace support for new AsyncEventQueue attributes - - - Added support for setting subscription interest policy on regions - - -
+
+ New in the 1.3.1 Release -
- New in the 1.2.1 Release + + + + Support for void returns on Function executions. See + for complete details. + + + +
- - - WAN Gateway Support for GemFire 7.0 - - -
+
+ New in the 1.3.2 Release -
- New in the 1.2.0 Release + + + + Support for persisting Local Regions. See and + . + + + + + Support for entry time-to-live and entry idle-time on a GemFire Client Cache. + See + + + + + Support for multiple Spring Data GemFire web-based applications using a single GemFire cluster, + operating concurrently inside tc Server. + + + +
- - - Full support for GemFire configuration via the - gfe namespace. Now GemFire components may be - configured completely without requiring a native cache.xml - file. - +
+ New in the 1.3.3 Release - - WAN Gateway support for GemFire 6.6.x. See - + + + + Support for concurrency-checks-enabled on all GemFire Cache Region definitions using the SDG + gfe namespace. See . + + + + + Support for Cache Loaders and Cache Writers on Client, Local Regions. + See . + + + + + Support for registering CacheListeners, AsyncEventQueues and Gateway Senders + on GemFire Cache Sub-Regions. + + + + + Support for PDX persistent keys in GemFire Regions. + + + + + Support for correct Partition Region bean creation in a Spring context when collocation + is specified with the colocated-with attribute. + + + + + Full support for GemFire Cache Sub-Regions using proper, nested <*-region> + element syntax in the SDG gfe namespace. + + + +
- - Spring Data Repository support with a dedicated namespace, - gfe-data. See - +
+ New in the 1.3.4 Release - - Namespace support for registering GemFire functions. See - + + + Upgraded Spring Data GemFire to Spring Framework 3.2.8. + + + Upgraded Spring Data GemFire to Spring Data Commons 1.7.1. + + +
- - A top level <disk-store> element has - been added to the gfe namespace to allow sharing - of persist stores among regions, and other components that support - persistent backup. See - The <*-region> elements no longer - allow a nested <disk-store> - +
+ New in the 1.4.0 Release - - GemFire subregions are supported via nested - <*-region> elements - + + + Upgrades Spring Data GemFire to GemFire 7.0.2. + + + Upgrades Spring Data GemFire to Spring Data Commons 1.8.0. + + + + Integrates Spring Data GemFire with Spring Boot, which includes both a + spring-boot-starter-data-gemfire POM along with a Spring Boot Sample + application demonstrating GemFire Cache Transactions configured with SDG bootstrapped + with Spring Boot. + + + + Support for bootstrapping a Spring Context in a GemFire Server when started from Gfsh. + + + Support for persisting application domain object/entities to multiple GemFire Cache Regions. + + + + Support for persisting application domain object/entities to GemFire Cache Sub-Regions, avoiding + collisions when Sub-Regions are uniquely identifiable, but identically named. + + + + + Adds strict XSD type rules to, and full support for, Data Policies and Region Shortcuts on all + GemFire Cache Region types. + + + + + Changed the default behavior of SDG <*-region> elements from lookup + to always create a new Region along with an option to restore old behavior using the + ignore-if-exists attribute. + + + + + Enables Spring Data GemFire to be fully built and ran on JDK 7 and JDK 8 (Note, however, GemFire + has not yet been fully tested and supported on JDK 8; + See GemFire User Guide + for additional details. + + + +
- - A <local-region> element has been added - to configure a local region - -
-
diff --git a/docs/src/reference/docbook/introduction/requirements.xml b/docs/src/reference/docbook/introduction/requirements.xml index 9dd08e96..497a37b7 100644 --- a/docs/src/reference/docbook/introduction/requirements.xml +++ b/docs/src/reference/docbook/introduction/requirements.xml @@ -1,9 +1,11 @@ - - Requirements + + Requirements - Spring Data GemFire requires JDK level 6.0 and above, Spring - Framework 3 and - vFabric GemFire 6.6 and above - (version 7 or above is recommended). - - \ No newline at end of file + + Spring Data GemFire requires JDK 6.0 or above, + Spring Framework 3 and + Pivotal GemFire + 6.6 or above (version 7 or above is recommended). + + + diff --git a/docs/src/reference/docbook/links.xml b/docs/src/reference/docbook/links.xml index 02701117..2c251581 100644 --- a/docs/src/reference/docbook/links.xml +++ b/docs/src/reference/docbook/links.xml @@ -1,27 +1,23 @@ - - Useful Links + + Useful Links + + + + Spring Data GemFire Home Page + + + Pivotal GemFire Home Page + + + Pivotal GemFire Documentation + + + Pivotal GemFire Community Home Page + + + Spring Data GemFire Forum + + - - - Spring Data GemFire Home Page - - - vFabric GemFire Home Page - - - vFabric GemFire Documentation - - - GemFire Community Home Page - - - Spring Data GemFire Forum - - diff --git a/docs/src/reference/docbook/preface.xml b/docs/src/reference/docbook/preface.xml index 67818662..2fd4e08f 100644 --- a/docs/src/reference/docbook/preface.xml +++ b/docs/src/reference/docbook/preface.xml @@ -1,18 +1,20 @@ Preface + - Spring Data GemFire focuses on integrating Spring Framework's powerful, non-invasive programming model - and concepts with vFabric GemFire, simplifying configuration, development and providing high-level abstractions. - This document assumes the reader already has a basic familiarity with the Spring Framework and vFabric GemFire - concepts and APIs. + Spring Data GemFire focuses on integrating the Spring Framework's powerful, non-invasive programming model + and concepts with Pivotal GemFire, simplifying configuration, development and providing high-level abstractions. + This document assumes the reader already has a basic familiarity with the Spring Framework and Pivotal GemFire + concepts and APIs. - + - While every effort has been made to ensure that this documentation is comprehensive and there are no errors, - some topics might require more explanation and some typos might have crept in. If you do spot any - mistakes or even more serious errors and you can spare a few cycles during lunch, please do bring the error - to the attention of the Spring Data GemFire team by raising an - issue. Thank you. + While every effort has been made to ensure this documentation is comprehensive and there are no errors, + some topics might require more explanation and some typos might have crept in. If you do spot any mistakes + or even more serious errors and you can spare a few cycles, please do bring the errors to the attention + of the Spring Data GemFire team by raising an issue. + Thank you. + diff --git a/docs/src/reference/docbook/reference/bootstrap.xml b/docs/src/reference/docbook/reference/bootstrap.xml index 48748b24..f3239a94 100644 --- a/docs/src/reference/docbook/reference/bootstrap.xml +++ b/docs/src/reference/docbook/reference/bootstrap.xml @@ -2,25 +2,22 @@ + xmlns:xi="http://www.w3.org/2001/XInclude"> Bootstrapping GemFire through the Spring Container - Spring Data GemFire provides full configuration and initialization of - the GemFire data grid through Spring's IoC container and provides several - classes that simplify the configuration of GemFire components including - caches, regions, WAN gateways, persistence backup, and other distributed - system components to support a variety of scenarios with minimal - effort. + + Spring Data GemFire provides full configuration and initialization of the GemFire data grid through + Spring's IoC container and provides several classes that simplify the configuration of GemFire components + including Caches, Regions, WAN Gateways, Persistence Backup, and other Distributed System components + to support a variety of scenarios with minimal effort. + - This section assumes basic familiarity with GemFire. For more - information see the product - documentation. + + This section assumes basic familiarity with GemFire. For more information see the + product + documentation. +
diff --git a/docs/src/reference/docbook/reference/data.xml b/docs/src/reference/docbook/reference/data.xml index 70aeff87..f948d388 100644 --- a/docs/src/reference/docbook/reference/data.xml +++ b/docs/src/reference/docbook/reference/data.xml @@ -1,130 +1,151 @@ - + Working with the GemFire APIs - Once the GemFire cache and regions have been configured they can - injected and used inside application objects. This chapter describes the - integration with Spring's transaction management functionality and - DaoException hierarchy. It also covers support for - dependency injection of GemFire managed objects. + + Once the GemFire Cache and Regions have been configured they can be injected and used inside application objects. + This chapter describes the integration with Spring's Transaction Management functionality + and DaoException hierarchy. It also covers support for dependency injection + of GemFire managed objects. +
- Exception translation + Exception Translation - Using a new data access technology requires not just accommodating - to a new API but also handling exceptions specific to that technology. To - accommodate this case, Spring Framework provides a technology agnostic, - consistent exception hierarchy - that abstracts one from proprietary (and usually checked) exceptions to a - set of focused runtime exceptions. As mentioned in the Spring Framework - documentation, exception - translation can be applied transparently to your data access - objects through the use of the @Repository annotation - and AOP by defining a PersistenceExceptionTranslationPostProcessor bean. - The same exception translation functionality is enabled when using GemFire - as long as at least a CacheFactoryBean is declared, e.g., using a <gfe:cache/> declaration) - as it acts as an exception translator which is automatically detected by the Spring infrastructure - and used accordingly. + + Using a new data access technology requires not only accommodating a new API but also handling exceptions + specific to that technology. To accommodate this case, Spring Framework provides a technology agnostic, + consistent exception hierarchy + that abstracts the application from proprietary (and usually checked) exceptions to a set of focused + runtime exceptions. As mentioned in the Spring Framework documentation, + exception translation + can be applied transparently to your data access objects through the use of the @Repository + annotation and AOP by defining a PersistenceExceptionTranslationPostProcessor bean. + The same exception translation functionality is enabled when using GemFire as long as at least a + CacheFactoryBean is declared, e.g. using a <gfe:cache/> + declaration, as it acts as an exception translator which is automatically detected by the + Spring infrastructure and used accordingly. +
GemfireTemplate - As with many other high-level abstractions provided by the Spring projects, Spring Data GemFire provides a - template that simplifies GemFire data access. The class provides several one-line - methods, for common region operations but also the ability to - execute code against the native GemFire API without - having to deal with GemFire checked exceptions for example through the GemfireCallback. + + As with many other high-level abstractions provided by the Spring projects, Spring Data GemFire provides a + template that simplifies GemFire data access. The class provides several + one-line methods, for common region operations but also the ability to + execute code against the native GemFire API without having to deal with GemFire + checked exceptions for example through the GemfireCallback. + - The template class requires a GemFire - Region instance and once configured is - thread-safe and should be reused across multiple classes: + + The template class requires a GemFire Region instance and once configured is + thread-safe and should be reused across multiple classes: + - <bean id="gemfireTemplate" class="org.springframework.data.gemfire.GemfireTemplate" p:region-ref="someRegion"/> + <bean id="gemfireTemplate" class="org.springframework.data.gemfire.GemfireTemplate" p:region-ref="someRegion"/> - Once the template is configured, one can use it alongside - GemfireCallback to work directly with the - GemFire Region, without having to deal with - checked exceptions, threading or resource management concerns: + + Once the template is configured, one can use it alongside GemfireCallback + to work directly with the GemFire Region, without having to deal with + checked exceptions, threading or resource management concerns: + - template.execute(new GemfireCallback<Iterable<String>>() { - public Iterable<String> doInGemfire(Region reg) throws GemFireCheckedException, GemFireException { - // working against a Region of String - Region<String, String> region = reg; + template.execute(new GemfireCallback<Iterable<String>>() { + public Iterable<String> doInGemfire(Region reg) throws GemFireCheckedException, GemFireException { + // working against a Region of String + Region<String, String> region = reg; - region.put("1", "one"); - region.put("3", "three"); + region.put("1", "one"); + region.put("3", "three"); - return region.query("length < 5"); - } + return region.query("length < 5"); + } }); - For accessing the full power of the GemFire query language, one can use the find and findUnique which, as opposed to the - query method, can execute queries across multiple regions, execute projections, and the like. The find method should be - used when the query selects multiple items (through SelectResults) and the latter, findUnique, as the name suggests, when only one object is returned. - + + For accessing the full power of the GemFire query language, one can use the find + and findUnique which, as opposed to the query method, + can execute queries across multiple regions, execute projections, and the like. The find + method should be used when the query selects multiple items (throughSelectResults) + and the latter, findUnique, as the name suggests, when only one object is returned. +
- Support for Spring Cache Abstraction - - Since 1.1, Spring GemFire provides an implementation for Spring 3.1 - cache abstraction. - To use GemFire as a backing implementation, simply add GemfireCacheManager to your configuration: - - Support for Spring Cache Abstraction + + + Since 1.1, Spring Data GemFire provides an implementation of the Spring 3.1 + cache abstraction. + To use GemFire as a backing implementation, simply add GemfireCacheManager to your + configuration: + + + + http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd + http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd"> + - - - + + + + -]]> - - +]]>
- Transaction Management + Transaction Management - One of the most popular features of Spring Framework is transaction - management. If you are not familiar with it, we strongly recommend looking - into it as it offers a consistent programming model that works transparently across multiple APIs that can be configured either programmatically or declaratively (the most popular choice). + + One of the most popular features of Spring Framework is + transaction management. + If you are not familiar with it, we strongly recommend + reading + about it as it offers a consistent programming model that works transparently across multiple APIs and can be + configured either programmatically or declaratively (the most popular choice). + - For GemFire, Spring Data GemFire provides a dedicated, per-cache, transaction manager that once declared, allows region operations to be executed atomically through Spring: + + For GemFire, Spring Data GemFire provides a dedicated, per-cache, transaction manager that, once declared, + allows Region operations to be executed atomically through Spring: + - <gfe:transaction-manager id="tx-manager" cache-ref="cache"/> - The example above can be simplified even more by eliminating the cache-ref attribute if the GemFire cache is defined under the default - name gemfireCache. As with the other Spring Data GemFire namespace elements, if the cache name is not configured, the aforementioned naming convention will used. - Additionally, the transaction manager name, if not specified is gemfireTransactionManager. + <gfe:transaction-manager id="tx-manager" cache-ref="cache"/> - Note that currently GemFire supports optimistic transactions with - read committed isolation. Furthermore, to guarantee - this isolation, developers should avoid making - in-place changes, that is manually modifying the - values present in the cache. To prevent this from happening, the - transaction manager configured the cache to use copy on - read semantics, meaning a clone of the actual value is created, - each time a read is performed. This behavior can be disabled if needed - through the copyOnRead property. For more information - on the semantics of the underlying GemFire transaction manager, see the - GemFire documentation. + + The example above can be simplified even more by eliminating the cache-ref attribute + if the GemFire Cache is defined under the default namegemfireCache. As with the other + Spring Data GemFire namespace elements, if the Cache bean name is not configured, the aforementioned naming + convention will used. Additionally, the transaction manager name isgemfireTransactionManager + if not explicitly specified. + + + + Currently, GemFire supports optimistic transactions with read committed isolation. + Furthermore, to guarantee this isolation, developers should avoid making in-place changes + that manually modify values present in the Cache. To prevent this from happening, the transaction manager + configures the Cache to use copy on read semantics, meaning a clone of the actual value + is created, each time a read is performed. This behavior can be disabled if needed through the + copyOnRead property. For more information on the semantics of the underlying GemFire + transaction manager, see the GemFire + documentation. +
- +
Wiring <interfacename>Declarable</interfacename> components @@ -330,4 +351,5 @@ DBLoader code.
-
\ No newline at end of file + +
diff --git a/docs/src/reference/docbook/reference/gemfire-bootstrap.xml b/docs/src/reference/docbook/reference/gemfire-bootstrap.xml new file mode 100644 index 00000000..323a524f --- /dev/null +++ b/docs/src/reference/docbook/reference/gemfire-bootstrap.xml @@ -0,0 +1,180 @@ + + + GemFire Bootstrapping a Spring ApplicationContext with Gfsh + +
+ Introduction + + + Normally, a Spring-based application is used to bootstrap GemFire + using Spring Data GemFire's XML namespace elements. Just by specifying a <gfe:cache/> + element in Spring Data GemFire configuration meta-data, a Singleton GemFire, peer Cache instance will be + created and initialized, using default settings, in the same JVM process as your application. + + + + However, sometimes it is a requirement, perhaps imposed by your IT operations team, that GemFire must be + fully managed and operated using the GemFire tool suite, such as with + Gfsh + for instance. Using Gfsh, even though the application and GemFire will share the same + JVM process, GemFire will instead bootstrap your Spring application context rather than the other way around. + So, using this approach GemFire, instead of an application server, or a Java main class using Spring Boot, + will bootstrap and host your application. + + + + Keep in mind, however, that GemFire is not an application server. In addition, there are limitations + to using this approach where GemFire Cache configuration is concerned. + +
+ +
+ Using GemFire to Bootstrap a Spring Context Started with Gfsh + + + In order to bootstrap a Spring application context in GemFire when starting a GemFire Server process + using Gfsh, a user must make use of GemFire's + Initalizer + functionality. An Initializer can be used to specify a callback application that + is launched after the Cache is initialized by GemFire. + + + + An Initializer is specified within an + initializer + element using a minimal snippet of GemFire's native configuration meta-data inside + a cache.xml file. The cache.xml file is required in order to + bootstrap the Spring application context, much like a minimal snippet of Spring XML config is needed to + bootstrap a Spring application context configured with component scanning + (e.g. <context:component-scan base-packages="..."/>) + + + + As of Spring Data GemFire 1.4, such an Initializer is already conveniently provided + by the framework, the org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer. + The typical, yet minimal configuration for this class inside GemFire's cache.xml file + will look like the following: + + + + + + + + org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer + + classpath:application-context.xml + + +]]> + + + + The SpringContextBootstrappingInitializer class follows similar conventions as + Spring's ContextLoaderListener class for bootstrapping a Spring context inside a Web Application, where + application context configuration files are specified with the contextConfigLocations + Servlet Context Parameter. In addition, the SpringContextBootstrappingInitializer + class can also be used with a basePackages parameter to specify a comma-separated list + of base package containing the appropriately annotated application components that the Spring container + will search using component scanning and create Spring beans for: + + + + + + + + org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer + + org.mycompany.myapp.services,org.mycompany.myapp.dao,... + + +]]> + + + + Then, with a properly configured and constructed CLASSPATH along with the + cache.xml file shown above specified as a command-line option when starting + a GemFire Server in Gfsh, the command-line would be: + + + gfsh>start server --name=Server1 --log-level=config ... + --classpath="/path/to/spring-data-gemfire-1.4.0.jar:/path/to/application/classes.jar" + --cache-xml-file="/path/to/gemfire/cache.xml" + + + + The application-context.xml can be any valid Spring context configuration meta-data + including all the SDG namespace elements. The only limitation with this approach is that the GemFire + Cache cannot be configured using the Spring Data GemFire namespace. In other words, none of the + <gfe:cache/> element attributes, such as cache-xml-location, + properties-ref, critical-heap-percentage, pdx-serializer-ref, + lock-lease, etc can be specified. If used, these attributes will be ignored. + The main reason for this is that GemFire itself has already created an initialized the Cache before + the Initializer gets invoked. As such, the Cache will already exist and since it is + a "Singleton", it cannot be re-initialized or have any of it's configuration augmented. + +
+ +
+ Lazy-Wiring GemFire Components + + + Spring Data GemFire already provides existing support for wiring GemFire components (such as CacheListeners, + CacheLoaders or CacheWriters) that are declared and created by GemFire in cache.xml + using the WiringDeclarableSupport class as described in + . + However, this only works when Spring does the bootstrapping (i.e. bootstraps GemFire). When your Spring + application context is the one bootstrapped by GemFire, then these GemFire components go unnoticed since + the Spring application context does not even exist yet! The Spring application context will not get created + until GemFire calls the Initializer, which is after all the other GemFire components + and configuration has already been created and initialized. + + + + So, in order to solve this problem, a new LazyWiringDeclarableSupport class was + introduced, that is, in a sense, Spring application context aware. The intention of this abstract + base class is that any implementing class will register itself to be configured by the Spring + application context created by GemFire after the Initializer is called. In essence, + this give your GemFire managed component a chance to be configured and auto-wired with Spring beans defined + in the Spring application context. + + + + For instance, you might necessarily (although, rare) have defined both a Region and CacheListener component + in GemFire cache.xml. The CacheLoader may need access to an application DAO, or perhaps + Spring application context defined JDBC Data Source for loading "Users" into a GemFire Cache + REPLICATE Region on start. Of course, one should be careful in mixing the different + life-cycles of GemFire and the Spring Container together in this manner as not all use cases and scenarios + are supported. The GemFire cache.xml configuration would be similar to the following + (which comes from SDG's test suite): + + + + + + + + + java.lang.String + org.springframework.data.gemfire.repository.sample.User + + org.springframework.data.gemfire.support.SpringContextBootstrappingInitializerIntegrationTest$UserDataStoreCacheLoader + + + + + org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer + + org.springframework.data.gemfire.support.sample + + +]]> + + +
+ +
diff --git a/docs/src/reference/docbook/reference/introduction.xml b/docs/src/reference/docbook/reference/introduction.xml index e42e03a9..edb0a938 100644 --- a/docs/src/reference/docbook/reference/introduction.xml +++ b/docs/src/reference/docbook/reference/introduction.xml @@ -1,39 +1,42 @@ - Document structure + xmlns="http://docbook.org/ns/docbook"> + Document Structure - The following chapters explain the core functionality offered by - Spring Data GemFire. + + The following chapters explain the core functionality offered by Spring Data GemFire. + - describes the configuration support - provided for bootstrapping, initializing, configuring, and accessing GemFire - caches, cache servers, regions, and related distributed system - components + + describes the configuration support provided for bootstrapping, configuring, + initializing and accessing GemFire Caches, Cache Servers, Regions, and related Distributed System components. + - explains the integration between the GemFire - APIs and the various data access features available in Spring, such as - transaction management and exception translation. + + explains the integration between the GemFire APIs and the various data access features + available in Spring, such as transaction management and exception translation. + - describes the enhancements for GemFire - (de)serialization and management of associated objects. + + describes the enhancements for GemFire (de)serialization and management + of associated objects. + - describes persistence mapping for POJOs - stored in GemFire using Spring Data + + describes persistence mapping for POJOs stored in GemFire using Spring Data. + - describes how to create and use - GemFire Repositories using Spring Data + + describes how to create and use GemFire Repositories using Spring Data. + - describes how to create and use - GemFire Functions using Spring Data + + describes how to create and use GemFire Functions using annotations. + + + + describes the samples provided with the distribution to illustrate + the various features available in Spring Data GemFire. + - describes the samples provided with the - distribution to illustrate the various features available in Spring Data - GemFire. diff --git a/docs/src/reference/docbook/reference/region.xml b/docs/src/reference/docbook/reference/region.xml index f4f3a5f4..91b50745 100644 --- a/docs/src/reference/docbook/reference/region.xml +++ b/docs/src/reference/docbook/reference/region.xml @@ -95,259 +95,226 @@ semantics or setup infrastructure. -
- Configuring Regions +
+ Configuring Regions - Spring Data GemFire provides comprehensive support for configuring - any type of GemFire Region via the following elements: - - Local Region <local-region> - + + Spring Data GemFire provides comprehensive support for configuring any type of GemFire Region + via the following elements: - - Replicated Region - <replicated-region> - + + + Local Region <local-region> + + + Replicated Region <replicated-region> + + + Partitioned Region <partitioned-region> + + + Client Region <client-region> + + - - Partitioned Region - <partitioned-region> - + For a comprehensive description of + + Region types + + please consult the GemFire product documentation. + - - Client Region <client-region> - - For a comprehensive description of Region - types please consult the GemFire product documentation. +
+ Common Region Attributes -
- Common Region Attributes + + The following table(s) list attributes available for various region types: - The following table(s) list attributes available for various - region types: - Common Region Attributes +
+ Common Region Attributes + + + + + + + Name + Values + Description + + + + + cache-ref + + GemFire Cache bean name + + + The name of the bean defining the GemFire Cache (by default 'gemfireCache'). + + + + close + + boolean, default:false (Note: The default was true prior to 1.3.0) + + + Indicates whether the Region should be closed at shutdown. + + + + concurrency-checks-enables + + boolean, default:true + + + Determines whether members perform checks to provide consistent handling + for concurrent or out-of-order updates to distributed Regions. + + + + data-policy + + See GemFire's + Data Policy + + + + The Region's Data Policy. Note, not all Data Policies are supported for every Region type. + + + + destroy + + boolean, default:false + + + Indicates whether the Region should be destroyed at shutdown. + + + + disk-store-ref + + The name of a configured Disk Store. + + A reference to a bean created via the + disk-store element. + + + + disk-synchronous + + boolean, default:false + + + Indicates whether Disk Store writes are synchronous. + + + + enable-gateway + + boolean, default:false + + + Indicates whether the Region will synchronize entries over a WAN Gateway. + + + + hub-id + + The name of the Gateway Hub. + + + This will automatically set enable-gateway to true. If enable-gateway is explicitly + set to false, an exception will be thrown. + + + + id + + Any valid bean name. + + + Will also be the Region name by default. + + + + ignore-jta + + boolean, default:false + + + Indicates whether the Region participates in JTA transactions. + + + + index-update-type + + synchronous or asynchronous, default:asynchronous + + + Indicates whether indices will be updated synchronously or asynchronously + on entry creation. + + + + initial-capacity + + integer, default:16 + + + The initial memory allocation for number of Region entries. + + + + key-constraint + + Any valid, fully-qualified Java class name. + + The expected key type. + + + name + + Any valid Region name. + + + The name of the Region definition. If not specified, it will assume the value of the + id attribute (the bean name). + + + + persistent + + boolean, default:false + + + Indicates whether the Region persists entries to a Disk Store (disk). + + + + statistics + + boolean, default:false + + + Indicates whether the Region reports statistics. + + + + value-constraint + + Any valid, fully-qualified Java class name. + + The expected value type. + + + +
+
+
- - - - - - - - - - Name - - Values - - Description - - - - - - cache-ref - - - GemFire cache bean name - - - The name of the bean defining - the GemFire cache (by default 'gemfireCache'). - - - - close - - - boolean, default:false (Note: The default was true - prior to 1.3.0) - - - Indicates whether the region - should be closed at shutdown - - - - data-policy - - - See GemFire's Data - Policy - - - The region's data policy. Note - not all data policies are supported for every region - type - - - - destroy - - - boolean, default:false - - - Indicates whether the region - should be destroyed at shutdown - - - - disk-store-ref - - - The name of a configured disk store - - - A reference to a bean created - via the disk-store element. Note: This will - automatically enable persistence. If persistent is explicitly - set to false, an exception will be thrown. - - - - disk-synchronous - - - boolean, default:false - - - Indicates whether disk store - writes are synchronous. Note: This will automatically enable - persistence. If persistent is explicitly set to false, an - exception will be thrown. - - - - enable-gateway - - - boolean, default:false - - - Indicates whether the region - will synchronize entries over a WAN gateway. - - - - hub-id - - - The name of the Gateway Hub - - - This will automatically set - enable-gateway to true. If enable-gateway is explicitly set to - false, an exception will be thrown. - - - - id - - - any valid bean name - - - Will also be the region name by - default - - - - ignore-jta - - - boolean, default:false - - - Indicates whether the region - participates in JTA transactions - - - - index-update-type - - - synchronous or asynchronous, - default:asynchronous - - - Indicates whether indices will - be updated synchronously or asynchronously on entry - creation - - - - initial-capacity - - - integer, default:16 - - - The initial memory allocation - for number of entries - - - - key-constraint - - - any valid java class name - - - The expected key type - - - - name - - - any valid region name - - - The name of the region - definition. If no specified, it will assume the value of the - id attribute (the bean name). - - - - persistent - - - boolean, default:false - - - Indicates whether the region - persists entries to a disk store - - - - statistics - - - boolean, default:false - - - Indicates whether the region - reports statistics - - - - value-constraint - - - any valid java class name - - - The expected value type - - - - -
- -
+
Cache Listeners Cache Listeners are registered with a region to handle region