diff --git a/src/main/asciidoc/appendix/appendix-schema.adoc b/src/main/asciidoc/appendix/appendix-schema.adoc
index 350356d7..1c68ca7e 100644
--- a/src/main/asciidoc/appendix/appendix-schema.adoc
+++ b/src/main/asciidoc/appendix/appendix-schema.adoc
@@ -1,7 +1,6 @@
[[appendix-schema]]
[appendix]
-= Spring Data Geode Schema
-:resourcesDir: {basedocdir}/../resources
+= {sdg-name} Schema
-- http://www.springframework.org/schema/gemfire/spring-gemfire.xsd[Spring Data for Apache Geode Core Schema (`gfe`-namespace)]
-- http://www.springframework.org/schema/gemfire/spring-data-gemfire.xsd[Spring Data for Apache Geode Data Access Schema (`gfe-data`-namespace)]
+* {spring-data-schema-location}[{sdg-name} Core Schema (`gfe` XML namespace)]
+* {spring-data-access-schema-location}[{sdg-name} Data Access Schema (`gfe-data` XML namespace)]
diff --git a/src/main/asciidoc/images/epub-cover.png b/src/main/asciidoc/images/epub-cover.png
new file mode 100644
index 00000000..6e118989
Binary files /dev/null and b/src/main/asciidoc/images/epub-cover.png differ
diff --git a/src/main/asciidoc/images/epub-cover.svg b/src/main/asciidoc/images/epub-cover.svg
new file mode 100644
index 00000000..b39994db
--- /dev/null
+++ b/src/main/asciidoc/images/epub-cover.svg
@@ -0,0 +1,10 @@
+
+
+
diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc
index 6ffaea5e..77218d29 100644
--- a/src/main/asciidoc/index.adoc
+++ b/src/main/asciidoc/index.adoc
@@ -1,74 +1,92 @@
-= Spring Data for Apache Geode - Reference Guide
-Costin Leau; David Turanski; John Blum; Oliver Gierke
-:revnumber: {version}
+= Spring Data for {data-store-name} Reference Guide
+Costin Leau; David Turanski; John Blum; Oliver Gierke; Jay Bryant
:revdate: {localdate}
-:spring-data-commons-docs: {basedocdir}/../../../../spring-data-commons/src/main/asciidoc
-:toc:
-:!toc-placement:
+:revnumber: {version}
+:linkcss:
+:doctype: book
+:docinfo: shared
+:toc: left
+:toclevels: 4
+:source-highlighter: prettify
+:icons: font
+:imagesdir: images
+:apache-geode-version: 16
+:apache-geode-docs: http://geode.apache.org/docs/guide/{apache-geode-version}
+:apache-geode-javadoc: http://geode.apache.org/releases/latest/javadoc
+:apache-geode-website: http://geode.apache.org
+:apache-geode-wiki: https://cwiki.apache.org/confluence/display/GEODE
+:data-store-name-symbolic: geode
+:data-store-name-simple: Geode
+:data-store-name: Apache {data-store-name-simple}
+:data-store-version: 1.6.0
+:pivotal-gemfire-version: 95
+:pivotal-gemfire-docs: http://gemfire.docs.pivotal.io/{pivotal-gemfire-version}
+:pivotal-gemfire-javadoc: http://gemfire-{pivotal-gemfire-version}-javadocs.docs.pivotal.io/
+:pivotal-gemfire-website: https://pivotal.io/pivotal-gemfire
+:pivotal-gemfire-wiki: https://cwiki.apache.org/confluence/display/GEODE
+:sdg-acronym: SDG
+:sdg-javadoc: https://docs.spring.io/spring-data/{data-store-name-symbolic}/docs/current/api
+:sdg-name: Spring Data for {data-store-name}
+:spring-data-access-schema-location: http://www.springframework.org/schema/data/gemfire/spring-data-gemfire.xsd
+:spring-data-access-schema-namespace: http://www.springframework.org/schema/data/gemfire
+:spring-data-commons-docs: https://docs.spring.io/spring-data/commons/docs/current/reference
+:spring-data-commons-docs-html: {spring-data-commons-docs}/html
+:spring-data-commons-javadoc: https://docs.spring.io/spring-data/commons/docs/current/api
+:spring-data-schema-location: http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
+:spring-data-schema-namespace: http://www.springframework.org/schema/gemfire
+:spring-data-website: https://spring.io/projects/spring-data
+:spring-framework-docs: https://docs.spring.io/spring/docs/current/spring-framework-reference
+:spring-framework-javadoc: https://docs.spring.io/spring/docs/current/javadoc-api
+:spring-framework-website: https://spring.io/projects/spring-framework
+:x-data-store-docs: {apache-geode-docs}
+:x-data-store-javadoc: {apache-geode-javadoc}
+:x-data-store-website: {apache-geode-website}
+:x-data-store-wiki: {apache-geode-wiki}
+ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1600]]
-(C) 2010-2017 The original authors.
+(C) 2010-2018 The original authors.
NOTE: Copies of this document may be made for your own use and for distribution to others provided that you do not
charge any fee for such copies and further provided that each copy contains this Copyright Notice
whether distributed in print or electronically.
-toc::[]
-
[[preface]]
include::{basedocdir}/preface.adoc[]
-ifndef::leveloffset[:leveloffset: 0]
-
-:leveloffset: +1
-
-include::{basedocdir}/introduction/introduction.adoc[]
-include::{basedocdir}/introduction/requirements.adoc[]
-include::{basedocdir}/introduction/new-features.adoc[]
-
-:leveloffset: -1
+include::{basedocdir}/introduction/introduction.adoc[leveloffset=+1]
+include::{basedocdir}/introduction/requirements.adoc[leveloffset=+1]
+include::{basedocdir}/introduction/new-features.adoc[leveloffset=+1]
[[reference]]
= Reference Guide
-:leveloffset: +1
-
-include::{basedocdir}/reference/introduction.adoc[]
-include::{basedocdir}/reference/bootstrap.adoc[]
-include::{basedocdir}/reference/bootstrap-annotations.adoc[]
-include::{basedocdir}/reference/data.adoc[]
-include::{basedocdir}/reference/serialization.adoc[]
-include::{basedocdir}/reference/mapping.adoc[]
-include::{basedocdir}/reference/repositories.adoc[]
-include::{basedocdir}/reference/function-annotations.adoc[]
-include::{basedocdir}/reference/lucene.adoc[]
-include::{basedocdir}/reference/gemfire-bootstrap.adoc[]
-include::{basedocdir}/reference/samples.adoc[]
-
-:leveloffset: -1
+include::{basedocdir}/reference/introduction.adoc[leveloffset=+1]
+include::{basedocdir}/reference/bootstrap.adoc[leveloffset=+1]
+include::{basedocdir}/reference/bootstrap-annotations.adoc[leveloffset=+1]
+include::{basedocdir}/reference/data.adoc[leveloffset=+1]
+include::{basedocdir}/reference/serialization.adoc[leveloffset=+1]
+include::{basedocdir}/reference/mapping.adoc[leveloffset=+1]
+include::{basedocdir}/reference/repositories.adoc[leveloffset=+1]
+include::{basedocdir}/reference/function-annotations.adoc[leveloffset=+1]
+include::{basedocdir}/reference/lucene.adoc[leveloffset=+1]
+include::{basedocdir}/reference/gemfire-bootstrap.adoc[leveloffset=+1]
+include::{basedocdir}/reference/samples.adoc[leveloffset=+1]
[[resources]]
= Resources
In addition to this reference documentation, there are a number of other resources that may help you learn
-how to use Apache Geode with the _Spring Framework_. These additional, third-party resources are enumerated
-in this section.
+how to use {data-store-product-name} with the _Spring Framework_. These additional, third-party resources
+are enumerated in this section.
-:leveloffset: +1
-
-include::{basedocdir}/links.adoc[]
-
-:leveloffset: -1
+include::{basedocdir}/links.adoc[leveloffset=+1]
[[appendices]]
= Appendices
:!sectnums:
-:leveloffset: +1
-
-include::{spring-data-commons-docs}/repository-namespace-reference.adoc[]
-include::{spring-data-commons-docs}/repository-populator-namespace-reference.adoc[]
-include::{spring-data-commons-docs}/repository-query-keywords-reference.adoc[]
-include::{spring-data-commons-docs}/repository-query-return-types-reference.adoc[]
-include::{basedocdir}/appendix/appendix-schema.adoc[]
-
-:leveloffset: -1
+include::{spring-data-commons-docs}/repository-namespace-reference.adoc[leveloffset=+1]
+include::{spring-data-commons-docs}/repository-populator-namespace-reference.adoc[leveloffset=+1]
+include::{spring-data-commons-docs}/repository-query-keywords-reference.adoc[leveloffset=+1]
+include::{spring-data-commons-docs}/repository-query-return-types-reference.adoc[leveloffset=+1]
+include::{basedocdir}/appendix/appendix-schema.adoc[leveloffset=+1]
diff --git a/src/main/asciidoc/introduction/introduction.adoc b/src/main/asciidoc/introduction/introduction.adoc
index 3d317875..d8f22fd6 100644
--- a/src/main/asciidoc/introduction/introduction.adoc
+++ b/src/main/asciidoc/introduction/introduction.adoc
@@ -1,6 +1,6 @@
[[introduction]]
= Introduction
-This reference guide for _Spring Data Geode_ explains how to use the _Spring Framework_ to configure and develop
-applications with Apache Geode. It presents the basic concepts, semantics and provides numerous examples
-to help you get started.
+The {sdg-name} reference guide explains how to use the Spring Framework
+to configure and develop applications with {data-store-name}. It presents the basic concepts
+and provides numerous examples to help you get started quickly.
diff --git a/src/main/asciidoc/introduction/new-features.adoc b/src/main/asciidoc/introduction/new-features.adoc
index 815e9ae7..8ee04620 100644
--- a/src/main/asciidoc/introduction/new-features.adoc
+++ b/src/main/asciidoc/introduction/new-features.adoc
@@ -1,46 +1,186 @@
[[new-features]]
= New Features
-NOTE: As of version `2.0.0`, _Spring Data Geode_ is now a top-level module in the
-http://projects.spring.io/spring-data/[Spring Data] project.
+NOTE: As of the 1.2.0.RELEASE, this project, formerly known as Spring GemFire, has been renamed to {sdg-name}
+to reflect that it is now a module of the {spring-data-website}[Spring Data] project and built on
+{x-data-store-website}[{data-store-name}].
-[[new-in-1-0-0]]
-== New in the 1.0.0.RELEASE
+[[new-in-1-2-0]]
+== New in the 1.2 Release
-* Upgrades to Apache Geode 1.0.0-incubating (GA) release.
-* Upgrades to Spring Framework 4.3.4.RELEASE.
-* Significant additions to the new Annotation-based configuration model.
-* Support for CDI.
-* Ability to configure Apache Geode's Off-Heap memory support.
-* Fix for premature destruction of client Pools before the Region's configured to use these Pools.
-* Support Repositories with multiple SD modules on the classpath.
-* Support for `forwardExpirationDestroy` in the `AsyncEventQueueFactoryBean` API and XML namespace.
-* Handle case-insensitive OQL queries defined as Repository query methods.
-* Enable explicit Cache names referring to Regions to be specified when using GemfireCacheManager.
-* Fix for ordered GemfireRepository.findAll(Sort) queries.
-* GemfireCache.evict(key) now calls Region.remove(key).
-* Fix RegionNotFoundException when executing Repository queries on client Regions configured with a Pool
-targeted for a specific server group.
-* Geode package namespace changed from com.gemstone.gemfire to org.apache.geode.
-* Support for the Geode Integrated Security framework.
+* Full support for {data-store-name} configuration through the SDG `gfe` XML namespace. Now {data-store-name} components
+may be configured completely without requiring a native `cache.xml` file.
+* WAN Gateway support for {data-store-name} 6.6.x. See <>
+* Spring Data Repository support using a dedicated SDG XML namespace, *gfe-data*. See <>
+* `gfe-data` XML Namespace support for registering {data-store-name} Functions. See <>
+* A top-level `` element has been added to the SDG `gfe` XML namespace to allow sharing of persist stores
+among regions as well as other {data-store-name} components that support persistent backup or overflow.
+See <>
++
+WARNING: `<*-region>` elements no longer allow a nested `` element.
++
+* {data-store-name} Sub-Regions are supported by nested `<*-region>` elements.
+* A `` element has been added to configure a Local Region.
+* Support for the re-designed WAN Gateway in {data-store-name} 7.0.
+[[new-in-1-3-0]]
+== New in the 1.3 Release
-[[new-in-1-1-0]]
-== New in the 1.1.0.RELEASE
+* Upgraded to Spring Framework 3.2.8.
+* Upgraded to Spring Data Commons 1.7.1.
+* Annotation support for {data-store-name} Functions. It is now possible to declare and register Functions
+written as POJOs by using annotations. In addition, Function executions are defined as
+annotated interfaces, similar to the way Spring Data Repositories work. See <>.
+* Added a `` element to the SDG XML namespace to simplify establishing a basic <>
+to a {data-store-name} data grid.
+* Added a `` element to the SDG `gfe-data` XML namespace to <>
+features introduced in {data-store-name} 7.0, enabling Spring AOP to perform the necessary conversions automatically
+on Region data access operations.
+* Upgraded to {data-store-name} 7.0.1 and added XML namespace support for new `AsyncEventQueue` attributes.
+* Added support for setting subscription interest policy on Regions.
+* Support for void returns on Function executions. See <> for complete details.
+* Support for persisting Local Regions. See <>.
+* Support for entry time-to-live (TTL) and entry idle-time (TTI) on a {data-store-name} Client Cache. See <>
+* Support for multiple {sdg-name} web-based applications by using a single {data-store-name} cluster,
+operating concurrently inside tc Server.
+* Support for `concurrency-checks-enabled` on all Cache Region definitions by using the SDG `gfe` XML namespace.
+See <>
+* Support for `CacheLoaders` and `CacheWriters` on client, Local Regions.
+* Support for registering `CacheListeners`, `AsyncEventQueues`, and `GatewaySenders` on {data-store-name} Cache Sub-Regions.
+* Support for PDX persistent keys in Regions.
+* Support for correct Partition Region bean creation in a Spring context when collocation is specified with
+the `colocated-with` attribute.
+* Full support for Cache Sub-Regions using proper, nested `<*-region>` element syntax in the SDG `gfe` XML namespace.
-* Upgrades to Aapche Geode 1.1.0 (GA) release.
-* Upgrades to Spring Framework 4.3.7.RELEASE.
-* Upgrades to Spring Data Commons Ingalls-SR1.
-* Additional improvements in the new Annotation-based configuration model.
-* Support Apache Geode's Apache Lucene Integration.
+[[new-in-1-4-0]]
+== New in the 1.4 Release
+* Upgraded to {data-store-name} 7.0.2.
+* Upgraded to Spring Framework 3.2.13.RELEASE.
+* Upgraded to Spring Data Commons 1.8.6.RELEASE.
+* Integrated {sdg-name} with Spring Boot, which includes both a `spring-boot-starter-data-gemfire` POM
+and a Spring Boot sample application that demonstrates {data-store-name} Cache Transactions configured with SDG
+and bootstrapped with Spring Boot.
+* Added support for bootstrapping a Spring `ApplicationContext` in a {data-store-name} Server when started from `Gfsh`.
+See <>
+* Added support for persisting application domain object and entities to multiple {data-store-name} Cache Regions.
+See <>
+* Added support for persisting application domain object and entities to {data-store-name} Cache Sub-Regions,
+avoiding collisions when Sub-Regions are uniquely identifiable, but identically named.
+See <>
+* Added strict XSD type rules to Data Policies and Region Shortcuts on all {data-store-name} Cache Region types.
+* Changed the default behavior of SDG `<*-region>` elements from lookup to always create a new Region
+with an option to restore the old behavior using the `ignore-if-exists` attribute.
+See <>
+and <>
+* {sdg-name} can now be fully built and run on JDK 7 and JDK 8.
+
+[[new-in-1-5-0]]
+== New in the 1.5 Release
+
+* Maintained compatibility with {data-store-name} 7.0.2.
+* Upgraded to _Spring Framework_ 4.0.9.RELEASE.
+* Upgraded to _Spring Data Commons_ 1.9.4.RELEASE.
+* Converted Reference Guide to Asciidoc.
+* Renewed support for deploying {sdg-name} in an OSGi container.
+* Removed all default values specified in {sdg-name} XML namespace Region-type elements
+to rely on {data-store-name} defaults instead.
+* Added convenience to automatically create `DiskStore` directory locations.
+* SDG annotated Function implementations can now be executed from `Gfsh`.
+* Enabled {data-store-name} `GatewayReceivers` to be started manually.
+* Added support for Auto Region Lookups. See <>
+* Added support for Region Templates. See <>
+
+[[new-in-1-6-0]]
+== New in the 1.6 Release
+
+* Upgraded to {data-store-name} 8.0.0.
+* Maintained compatibility with Spring Framework 4.0.9.RELEASE.
+* Upgraded to Spring Data Commons 1.10.2.RELEASE.
+* Added support for {data-store-name} 8's new Cluster-based Configuration Service.
+* Enabled 'auto-reconnect' functionality to be employed in Spring-configured {data-store-name} Servers.
+* Allowed the creation of concurrent and parallel `AsyncEventQueues` and `GatewaySenders`.
+* Added support for {data-store-name} 8's Region data compression.
+* Added attributes to set both critical and warning percentages on `DiskStore` usage.
+* Supported the capability to add `EventSubstitutionFilters` to `GatewaySenders`.
+
+[[new-in-1-7-0]]
+== New in the 1.7 Release
+
+* Upgraded to {data-store-name} 8.1.0.
+* Upgraded to Spring Framework 4.1.9.RELEASE.
+* Upgraded to Spring Data Commons 1.11.6.RELEASE.
+* Added early access support for Apache Geode.
+* Added support for adding Spring-defined `CacheListeners`, `CacheLoaders`, and `CacheWriters` on existing Regions
+configured in Spring XML, `cache.xml`, or even with {data-store-name}'s Cluster Configuration Service.
+* Added Spring JavaConfig support to `SpringContextBootstrappingInitializer`.
+* Added support for custom `ClassLoaders` in `SpringContextBootstrappingInitializer` to load Spring-defined bean classes.
+* Added support for `LazyWiringDeclarableSupport` re-initialization and complete replacement for `WiringDeclarableSupport`.
+* Added `locators` and `servers` attributes to the `` element, allowing variable Locator and Server
+endpoint lists configured with Spring's property placeholders.
+* Enables the use of the `` element with non-Spring-configured {data-store-name} Servers.
+* Added multi-index definition and creation support.
+* <>
+* <>
+* Added support for Cache and Region data snapshots. See <>
+
+[[new-in-1-8-0]]
+== New in the 1.8 Release
+
+* Upgraded to {data-store-name} 8.2.0.
+* Upgraded to Spring Framework 4.2.9.RELEASE.
+* Upgraded to Spring Data Commons 1.12.11.RELEASE.
+* Added Maven POM to build SDG with Maven.
+* Added support for CDI.
+* Enabled a `ClientCache` to be configured without a `Pool`.
+* Defaulted `` and `` elements `use-bean-factory-locator` attribute to *false*.
+* Added `durable-client-id` and `durable-client-timeout` attributes to ``.
+* Made `GemfirePersistentProperty` now properly handle other non-entity, scalar-like types
+(e.g. `BigDecimal` and `BigInteger`).
+* Prevented SDG-defined `Pools` from being destroyed before `Regions` that use those `Pools`.
+* Handled case-insensitive {data-store-name} OQL queries defined as Repository query methods.
+* Changed `GemFireCache.evict(key)` to call `Region.remove(key)` in SDG's Spring _Cache Abstraction_ support.
+* Fixed `RegionNotFoundException` with Repository queries on a client `Region` associated with a specific `Pool`
+configured for {data-store-name} server groups.
+* Changed `GatewaySenders/Receivers` to no longer be tied to the Spring container.
+
+[[new-in-1-9-0]]
+== New in the 1.9 Release
+
+* Upgraded to {data-store-name} 8.2.11.
+* Upgraded to Spring Framework 4.3.18.RELEASE.
+* Upgraded to Spring Data Commons 1.13.13.RELEASE.
+* Introduced an entirely new Annotation-based configuration model inspired by Spring Boot.
+* Added support for suspend and resume in the `GemfireTransactionManager`.
+* Added support in Repositories to use the bean `id` property as the Region key when the `@Id` annotation
+is not present.
+* Used `MappingPdxSerializer` as the default {data-store-name} serialization strategy when `@EnablePdx` is used.
+* Enabled `GemfireCacheManager` to explicitly list Region names to be used in the Spring's _Caching Abstraction_.
+* Configured {data-store-name} Caches, CacheServers, Locators, Pools, Regions, Indexes, DiskStores, Expiration, Eviction,
+Statistics, Mcast, HttpService, Auth, SSL, Logging, System Properties.
+* Added Repository support with multiple Spring Data modules on the classpath.
[[new-in-2-0-0]]
-== New in the 2.0.0.RELEASE
+== New in the 2.0 Release
-* Upgrades to Apache Geode 1.2.0 (GA) release.
-* Upgrades to Spring Framework 5.0.0.RELEASE.
-* Upgrades to Spring Data Commons Kay.
-* Spring Data Geode joins the Spring Data Release Train (Kay) as a new Spring Data module.
-* Additional improvements in the new Annotation-based configuration model.
-* Support Apache Geode's Apache Lucene Integration.
+* Upgraded to {data-store-name} 9.1.1.
+* Upgraded to Spring Data Commons 2.0.8.RELEASE.
+* Upgraded to Spring Framework 5.0.7.RELEASE.
+* Reorganized the SDG codebase by packaging different classes and components by concern.
+* Added extensive support for Java 8 types, particularly in the SD Repository abstraction.
+* Changed to the Repository interface and abstraction, e.g. IDs are no longer required to be `java.io.Serializable`.
+* Set `@EnableEntityDefinedRegions` annotation `ignoreIfExists` attribute to `true` by default.
+* Set `@Indexed` annotation `override` attribute to `false` by default.
+* Renamed `@EnableIndexes` to `@EnableIndexing`.
+* Introduced a `InterestsBuilder` class to easily and conveniently express Interests in keys and values between client
+and server when using JavaConfig.
+* Added support in the Annotation configuration model for Off-Heap, Redis Adapter,
+and {data-store-name}'s new Security framework.
+
+[[new-in-2-1-0]
+== New in the 2.1 Release
+
+* Upgraded to {data-store-name} 9.5.1.
+* Upgraded to Spring Framework 5.1.0.RELEASE.
+* Upgraded to Spring Data Commons 2.1.0.RELEASE.
+*
diff --git a/src/main/asciidoc/introduction/requirements.adoc b/src/main/asciidoc/introduction/requirements.adoc
index 0b0aaa02..518f73ca 100644
--- a/src/main/asciidoc/introduction/requirements.adoc
+++ b/src/main/asciidoc/introduction/requirements.adoc
@@ -1,5 +1,5 @@
[[requirements]]
= Requirements
-_Spring Data Geode_ requires JDK 8.0, http://projects.spring.io/spring-framework[Spring Framework] 5
-and http://geode.apache.org/[Apache Geode] 1.2.0.
+{sdg-name} requires Java 8.0, {spring-framework-website}[Spring Framework] 5
+and {x-data-store-website}[{data-store-name}] {data-store-version}.
diff --git a/src/main/asciidoc/links.adoc b/src/main/asciidoc/links.adoc
index c5a092a4..49f75267 100644
--- a/src/main/asciidoc/links.adoc
+++ b/src/main/asciidoc/links.adoc
@@ -1,14 +1,14 @@
[[sgf-links]]
= Useful Links
-* http://projects.spring.io/spring-data-gemfire[Spring Data GemFire Project Page]
-* https://github.com/spring-projects/spring-data-geode[Spring Data Geode source code]
-* https://jira.spring.io/browse/DATAGEODE[Spring Data Geode JIRA]
-* http://stackoverflow.com/questions/tagged/spring-data-gemfire[Spring Data GemFire on StackOverflow]
-* http://forum.spring.io/forum/spring-projects/data/gemfire[Archive of the Spring Data GemFire Forum on Spring IO]
-* http://geode.apache.org/[Apache Geode Home Page]
-* http://geode.apache.org/docs/[Apache Geode Documentation]
-* http://geode.apache.org/community/[Apache Geode Community]
+* http://projects.spring.io/spring-data-gemfire[{sdg-name} Project Page]
+* https://github.com/spring-projects/spring-data-gemfire[{sdg-name} source code]
+* https://jira.spring.io/browse/SGF[{sdg-name} JIRA]
+* http://stackoverflow.com/questions/tagged/spring-data-gemfire[{sdg-name} on StackOverflow]
+* http://forum.spring.io/forum/spring-projects/data/gemfire[Archive of the {sdg-name} Forum on Spring IO]
+* {x-data-store-website}[{data-store-name} Home Page]
+* {x-data-store-docs}/getting_started/book_intro.html[{data-store-name} Documentation]
+* {apache-geode-website}/community/[Apache Geode Community]
* https://github.com/apache/geode[Apache Geode source code]
-* https://issues.apache.org/jira/browse/GEODE/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel[Apache Geode JIRA]
-* http://stackoverflow.com/search?q=Apache%20Geode[Apache Geode on StackOverflow]
+* https://issues.apache.org/jira/projects/GEODE/issues[Apache Geode JIRA]
+* http://stackoverflow.com/questions/tagged/gemfire[{data-store-name} on StackOverflow]
diff --git a/src/main/asciidoc/preface.adoc b/src/main/asciidoc/preface.adoc
index dc397e7b..bbd9c0fe 100644
--- a/src/main/asciidoc/preface.adoc
+++ b/src/main/asciidoc/preface.adoc
@@ -1,16 +1,14 @@
= Preface
-_Spring Data Geode_ focuses on integrating the _Spring Framework's_ powerful, non-invasive programming model
-and concepts with Apache Geode to simplify configuration and development of Java applications using Geode.
+{sdg-name} focuses on integrating the Spring Framework's powerful, non-invasive programming model
+and concepts with {data-store-name} to simplify configuration and development of Java applications
+when using {data-store-name} as you data management solution.
-This document assumes the reader already has a basic familiarity with the _Spring Framework_ and Apache Geode
-concepts and APIs.
+This document assumes you already have a basic understanding of, and some familiarity with, the core Spring Framework
+and {data-store-name} concepts.
-While every effort has been made to ensure this documentation is comprehensive and complete, with no errors,
-some topics are beyond the scope of this document and may require more explanation (e.g. data distribution management
-with partitioning for HA while still preserving consistency). Additionally, some typos might have crept in.
-If you do spot mistakes or even more serious errors and you can spare a few cycles, please do bring these issues
-to the attention of the _Spring Data Geode_ team by raising an appropriate
-https://jira.spring.io/browse/DATAGEODE[issue].
-
-Thank you.
+While every effort has been made to ensure this documentation is comprehensive and complete without errors,
+some topics are beyond the scope of this document and may require more explanation (for example, data distribution management
+using partitioning with HA while still preserving consistency). Additionally, some typographical errors might have crept in.
+If you do spot mistakes or even more serious errors, please bring these issues to the attention of the Spring Data team
+by raising an appropriate https://jira.spring.io/browse/SGF[issue in JIRA].
diff --git a/src/main/asciidoc/reference/bootstrap-annotations.adoc b/src/main/asciidoc/reference/bootstrap-annotations.adoc
index af512b4c..d7ac76dd 100644
--- a/src/main/asciidoc/reference/bootstrap-annotations.adoc
+++ b/src/main/asciidoc/reference/bootstrap-annotations.adoc
@@ -1,100 +1,105 @@
[[bootstrap-annotation-config]]
-= Bootstrapping Apache Geode using Spring Annotations
+= Bootstrapping {data-store-name} using Spring Annotations
-_Spring Data for Apache Geode_ (SDG) 2.0 introduces a **new** Annotation-based configuration model
-to bootstrap and configure Apache Geode using the Spring container.
+{sdg-name} (SDG) 2.0 introduces a new annotation-based configuration model
+to configure and bootstrap {data-store-name} using the Spring container.
-The primary motivation for introducing an Annotation-based approach to the configuration of Apache Geode in
-a Spring context is to enable application developers to _**get up and running** as **quickly**
-and as **easily** as possible_.
+The primary motivation for introducing an annotation-based approach to the configuration of {data-store-name}
+in a Spring context is to enable application developers to _get up and running_ as _quickly_
+and as _easily_ as possible.
[[bootstrap-annotation-config-introduction]]
== Introduction
-Apache Geode can be very difficult to setup and use correctly given all the
-http://geode.apache.org/docs/guide/12/reference/topics/gemfire_properties.html[configuration properties],
-configuration options
-(http://geode.apache.org/releases/latest/javadoc/index.html[Java API]
-http://geode.apache.org/docs/guide/12/reference/topics/chapter_overview_cache_xml.html[cache.xml],
-http://geode.apache.org/docs/guide/12/tools_modules/gfsh/chapter_overview.html[_Gfsh_]
-with http://geode.apache.org/docs/guide/12/configuring/chapter_overview.html[_Cluster Configuration_],
-<>)
-in addition to different supported _topologies_
-(http://geode.apache.org/docs/guide/12/topologies_and_comm/cs_configuration/chapter_overview.html[client/server],
-http://geode.apache.org/docs/guide/12/topologies_and_comm/p2p_configuration/chapter_overview.html[P2P],
-http://geode.apache.org/docs/guide/12/topologies_and_comm/multi_site_configuration/chapter_overview.html[WAN])
-and https://cwiki.apache.org/confluence/display/GEODE/Geode+Internal+Architecture?src=contextnavpagetreemode[_Distributed System Design Patterns_]
-(e.g. shared-nothing architecture). The Annotation-based configuration model aims to simplify all this plus more.
+{data-store-name} can be difficult to setup and use correctly, given all the
+{x-data-store-docs}/reference/topics/gemfire_properties.html[configuration properties]
+and different configuration options:
-The Annotation-based configuration model is an alternative to XML-based configuration using _Spring Data Geode's_
-XML Namespace. With XML, an application developer would use the `spring-gemfire` (`gfe`) schema for configuration
-and the `spring-data-gemfire` (`gfe-data`) schema for data access related concerns. See <> for more details.
+* {x-data-store-javadoc}[Java API]
+* {x-data-store-docs}/reference/topics/chapter_overview_cache_xml.html[cache.xml]
+* {x-data-store-docs}/tools_modules/gfsh/chapter_overview.html[_Gfsh_]
+with {x-data-store-docs}/configuring/chapter_overview.html[cluster configuration]
+* <>)
-NOTE: As of SDG 2.0, the new Annotation-based configuration model does not yet have configuration support
-for Apache Geode's WAN components and topology.
+Further complexity comes from the different supported topologies:
+* ({x-data-store-docs}/topologies_and_comm/cs_configuration/chapter_overview.html[client/server]
+* {x-data-store-docs}/topologies_and_comm/p2p_configuration/chapter_overview.html[P2P]
+* {x-data-store-docs}/topologies_and_comm/multi_site_configuration/chapter_overview.html[WAN])
+* {x-data-store-wiki}/Geode+Internal+Architecture?src=contextnavpagetreemode[distributed system design patterns]
+(such as shared-nothing architecture).
-Like _Spring Boot_, _Spring Data Geode's_ Annotation-based configuration model was designed as an opinionated,
-_convention over configuration_ approach for using Apache Geode. Indeed, this Annotation-based configuration model
-was inspired by _Spring Boot_ as well as several other Spring and _Spring Data_ projects.
+The annotation-based configuration model aims to simplify all this and more.
-By following convention, all Annotations provide reasonable and sensible defaults for all configuration attributes
-out-of-the-box. The default value for a given Annotation attribute directly corresponds to the default value
-provided in Apache Geode for the same configuration property or setting.
+The annotation-based configuration model is an alternative to XML-based configuration using {sdg-name}'s XML namespace.
+With XML, you could use the `gfe` XML schema for configuration and the `gfe-data` XML schema for data access
+related concerns. See "<>" for more details.
-The intention is to let an application developer enable an Apache Geode feature or an embedded service by simply
-declaring the Annotation on his/her Spring `@Configuration` or `@SpringBootApplication` class without needing to
-unnecessarily configure a large number of attributes or properties just to use the feature.
+NOTE: As of SDG 2.0, the annotation-based configuration model does not yet support the configuration of
+{data-store-name}'s WAN components and topology.
-Again, _getting up and running as quickly and as easily as possible_ is the primary objective.
+Like Spring Boot, {sdg-name}'s annotation-based configuration model was designed as an opinionated,
+convention-over-configuration approach for using {data-store-name}. Indeed, this annotation-based configuration model
+was inspired by Spring Boot as well as several other Spring and Spring Data projects, collectively.
-However, the option to customize the configuration meta-data and behavior of Apache Geode is there should an application
-developer need it and _Spring Data Geode's_ Annotation-based configuration will quietly back away. The application
-developer simply just needs to specify the configuration attributes s/he wishes to adjust. And, as we will see below,
-there are several ways to configure an Apache Geode feature or embedded service using Annotations.
+By following convention, all annotations provide reasonable and sensible defaults for all configuration attributes.
+The default value for a given annotation attribute directly corresponds to the default value provided in
+{data-store-name} for the same configuration property.
-All the **new** SDG Annotations can be found in the `org.springframework.data.gemfire.config.annotation` package.
+The intention is to let you enable a {data-store-name} feature or an embedded service by declaring the annotation
+on your Spring `@Configuration` or `@SpringBootApplication` class without needing to unnecessarily configure
+a large number of properties just to use the feature.
+
+Again, _getting started_, _quickly_ and as _easily_, is the primary objective.
+
+However, the option to customize the configuration metadata and behavior of {data-store-name} is there if you need it,
+and {sdg-name}'s annotation-based configuration quietly backs away. You need only specify the configuration attributes
+you wish to adjust. Also, as we will see later in this document, there are several ways to configure a {data-store-name}
+feature or embedded service by using the annotations.
+
+You can find all the new SDG Java Annotations in the `org.springframework.data.gemfire.config.annotation` package.
[[bootstrap-annotation-config-geode-applications]]
-== Bootstrapping Apache Geode applications with Spring
+== Bootstrapping {data-store-name} Applications with Spring
-Like all _Spring Boot_ applications that begin by annotating the application class with `@SpringBootApplication`,
-a _Spring Boot_ application can easily become an Apache Geode cache application simply by declaring
-1 of 3 main Annotations:
+Like all Spring Boot applications that begin by annotating the application class with `@SpringBootApplication`,
+a Spring Boot application can easily become a {data-store-name} cache application by declaring any one of three
+main annotations:
-1. `@ClientCacheApplication`
-2. `@PeerCacheApplication`
-3. `@CacheServerApplication`
+* `@ClientCacheApplication`
+* `@PeerCacheApplication`
+* `@CacheServerApplication`
-These 3 Annotations are the Spring/Apache Geode application developer's starting point.
+These three annotations are the Spring application developer's starting point when working with {data-store-name}.
-To realize the intent behind these Annotations, a user must understand that there are 2 types of cache instances
-that can be created with Apache Geode: a _client_ or a _peer_.
+To realize the intent behind these annotations, you must understand that there are two types of cache instances
+that can be created with {data-store-name}: a client cache or a peer cache.
-A _Spring Boot_ application can be configured as an Apache Geode cache client (i.e. with an instance of `ClientCache`),
-which communicates with an existing, standalone cluster of Apache Geode servers used to manage the application's data.
-The _client/server_ topology is the most typical system architecture employed when using Apache Geode and the user
-can make her _Spring Boot_ application a cache client simply by annotating it with `@ClientCacheApplication`.
+You can configure a Spring Boot application as a {data-store-name} cache client with an instance of `ClientCache`,
+which can communicate with an existing cluster of {data-store-name} servers used to manage the application's data.
+The client-server topology is the most common system architecture employed when using {data-store-name} and you
+can make your Spring Boot application a cache client, with a `ClientCache` instance, simply by annotating it with
+`@ClientCacheApplication`.
-Alternatively, a _Spring Boot_ application may be a peer member of an Apache Geode cluster. That is, the application
-itself is just another server in the cluster of servers that will manage data. The _Spring Boot_ application creates
-an "embedded" peer `Cache` instance when a developer annotates his/her application class with `@PeerCacheApplication`.
+Alternatively, a Spring Boot application may be a peer member of a {data-store-name} cluster. That is, the application
+itself is just another server in a cluster of servers that manages data. The Spring Boot application creates
+an "embedded", peer `Cache` instance when you annotate your application class with `@PeerCacheApplication`.
-By extension, the application may also serve as a `CacheServer` serving cache clients, allowing clients to connect
-and perform data access operations on the server. This is accomplished by annotating the application class with
-`@CacheServerApplication` instead of `@PeerCacheApplication`, which will create a peer `Cache` instance along with
+By extension, a peer cache application may also serve as a `CacheServer` too, allowing cache clients to connect
+and perform data access operations on the server. This is accomplished by annotating the application class with
+`@CacheServerApplication` in place of `@PeerCacheApplication`, which creates a peer `Cache` instance along with
the `CacheServer`.
-NOTE: An Apache Geode Server is not necessarily a "_Cache Server_" by default. That is, a server is not necessarily
-setup to serve cache clients just because it is a "server". An Apache Geode Server can just be a peer member/data node
-of the cluster that manages data without serving any clients while other peer members in the cluster are indeed setup
-to serve clients in addition to managing data. It also possible to setup certain peer members as non-data node,
-http://geode.apache.org/docs/guide/12/developing/region_options/data_hosts_and_accessors.html[data accessors]
-that can service clients as `CacheServers` as well, but is beyond the scope of this document.
+NOTE: A {data-store-name} server is not necessarily a cache server by default. That is, a server is not necessarily
+set up to serve cache clients just because it is a server. A {data-store-name} server can be a peer member (data node)
+of the cluster managing data without serving any clients while other peer members in the cluster are indeed set up
+to serve clients in addition to managing data. It is also possible to set up certain peer members in the cluster as
+non-data nodes, called {x-data-store-docs}/developing/region_options/data_hosts_and_accessors.html[data accessors],
+which do not store data, but act as a proxy to service clients as `CacheServers`. This is beyond the scope
+of this document.
-By way of example, if I wanted to create a _Spring Boot_, Apache Geode cache client application, I would start with...
+By way of example, if you want to create a Spring Boot cache client application, start with the following:
-.Spring-based Apache Geode `ClientCache` application
+.Spring-based {data-store-name} `ClientCache` application
[source, java]
----
@SpringBootApplication
@@ -102,10 +107,11 @@ By way of example, if I wanted to create a _Spring Boot_, Apache Geode cache cli
class ClientApplication { .. }
----
-And, if I wanted to create a _Spring Boot_ application with an embedded peer `Cache` instance, where my application
-will be a server and peer member of a cluster, or distributed system formed by Apache Geode, then I would start with...
+Or, if you want to create a Spring Boot application with an embedded peer `Cache` instance, where your application
+will be a server and peer member of a cluster, or distributed system, formed by {data-store-name},
+start with the following:
-.Spring-based Apache Geode embedded peer `Cache` application
+.Spring-based {data-store-name} embedded peer `Cache` application
[source, java]
----
@SpringBootApplication
@@ -113,11 +119,11 @@ will be a server and peer member of a cluster, or distributed system formed by A
class ServerApplication { .. }
----
-Alternatively, a user may use the `@CacheServerApplication` annotation instead of `@PeerCacheApplication` to create
-both an "embedded" peer `Cache` instance along with a `CacheServer` running on "_localhost_", listening on
-the default cache server port, *40404*...
+Alternatively, you can use the `@CacheServerApplication` annotation in place of `@PeerCacheApplication` to create
+both an embedded peer `Cache` instance and a `CacheServer` running on `localhost`, listening on the default
+cache server port, `40404`, as follows:
-.Spring-based Apache Geode embedded `CacheServer` Application
+.Spring-based {data-store-name} embedded peer `Cache` application with `CacheServer`
[source, java]
----
@SpringBootApplication
@@ -126,36 +132,37 @@ class ServerApplication { .. }
----
[[bootstrap-annotation-config-client-server-applications]]
-== Going in-detail on _client/server_ applications
+== Client/Server Applications In-Detail
-There are multiple ways that a client can connect to and communicate with servers in an Apache Geode cluster.
-The most common and recommended approach is to use Apache Geode Locators.
+There are multiple ways that a client can connect to and communicate with servers in a {data-store-name} cluster.
+The most common and recommended approach is to use {data-store-name} Locators.
-NOTE: A cache client can connect to 1 or more Locators in the Apache Geode cluster instead of directly to a
-`CacheServer`. The advantage of using Locators over direct `CacheServer` connections is that Locators provide meta-data
-about the cluster to which clients are connected. This meta-data includes information like which servers contain
-the data of interests to the client, or which servers have the least amount of load. A Locator also provides fail-over
-capabilities in case a `CacheServer` goes down. By enabling the PR single-hop capability in the client `Pool`,
-the client is routed directly to the server containing the data the client needs access to, to obtain the data requested.
+NOTE: A cache client can connect to one or more Locators in the {data-store-name} cluster instead of directly to a
+`CacheServer`. The advantage of using Locators over direct `CacheServer` connections is that Locators provide metadata
+about the cluster to which the client is connected. This metadata includes information such as which servers contain
+the data of interest or which servers have the least amount of load. A Locator also provides fail-over capabilities
+in case a `CacheServer` crashes. By enabling the PR single-hop feature in the client `Pool`, the client is routed
+directly to the server containing the data requested and needed by the client.
-NOTE: Locators are also peer members in a cluster. Locators actually constitute what makes up a cluster of Apache Geode
-nodes; i.e. all nodes connected by a Locator make up a cluster of peers and new members use Locators to join a cluster
+NOTE: Locators are also peer members in a cluster. Locators actually constitute what makes up a cluster of {data-store-name}
+nodes. That is, all nodes connected by a Locator are peers in the cluster, and new members use Locators to join a cluster
and find other members.
-Since Apache Geode sets up a "DEFAULT" `Pool` connected to a `CacheServer` running on "_localhost_", listening on port
-**40404** by default when a `ClientCache` instance is created, and a `CacheServer` listens on port **40404** accepting
-connections on all system NICs, there is nothing special a user needs to do to utilize the _client/server_ topology.
-Simply annotate your server-side _Spring Boot_ application with `@CacheServerApplication` and your client-side
-_Spring Boot_ application with `@ClientCacheApplication` and you are ready to go.
+By default, {data-store-name} sets up a "DEFAULT" `Pool` connected to a `CacheServer` running on `localhost`,
+listening on port `40404` when a `ClientCache` instance is created. A `CacheServer` listens on port `40404`,
+accepting connections from all system NICs. You do not need to do anything special to use the client-server topology.
+Simply annotate your server-side Spring Boot application with `@CacheServerApplication` and your client-side Spring Boot
+application with `@ClientCacheApplication`, and you are ready to go.
-You can even start your servers using _Gfsh's_ `start server` command if you prefer. Your _Spring Boot_
-`@ClientCacheApplication` will still connect to the server regardless of how it is started. Although, we think you
-will prefer to configure and start your servers using the _Spring Data Geode_ approach, with Annotations.
+If you prefer, you can even start your servers with Gfsh's `start server` command. Your Spring Boot `@ClientCacheApplication`
+can still connect to the server regardless of how it was started. However, you may prefer to configure and start
+your servers by using the {sdg-name} approach since a properly annotated Spring Boot application class is far more
+intuitive and easier to debug.
-As an application developer, you will no doubt want to customize the "DEFAULT" `Pool` setup by Apache Geode
-to possibly connect to 1 or more Locators, for instance...
+As an application developer, you will no doubt want to customize the "DEFAULT" `Pool` set up by {data-store-name}
+to possibly connect to one or more Locators, as the following example demonstrates:
-.Spring-based Apache Geode `ClientCache` application using Locators
+.Spring-based {data-store-name} `ClientCache` application using Locators
[source, java]
----
@SpringBootApplication
@@ -166,21 +173,23 @@ to possibly connect to 1 or more Locators, for instance...
class ClientApplication { .. }
----
-Along with the `locators` attribute, the `@ClientCacheApplication` annotation has a `servers` attribute that can be used
-to specify 1 or more nested `@Server` annotations that enable the cache client to connect directly to 1 or more servers,
-if necessary.
+Along with the `locators` attribute, the `@ClientCacheApplication` annotation has a `servers` attribute as well.
+The `servers` attribute can be used to specify one or more nested `@Server` annotations that let the cache client
+connect directly to one or more servers, if necessary.
-NOTE: You can only use either the `locators` or `servers` attribute, but not both, which is enforced by Apache Geode.
+NOTE: You can use either the `locators` or `servers` attribute, but not both (this is enforced by {data-store-name}).
-A user may also configure additional `Pools`, other than the "DEFAULT" `Pool` provided by Apache Geode when
-a `ClientCache` instance is created with the `@ClientCacheApplication` annotation, by using the `@EnablePool`
+You can also configure additional `Pool` instances (other than the "DEFAULT" `Pool` provided by {data-store-name}
+when a `ClientCache` instance is created with the `@ClientCacheApplication` annotation) by using the `@EnablePool`
and `@EnablePools` annotations.
NOTE: `@EnablePools` is a composite annotation that aggregates several nested `@EnablePool` annotations on
-a single class. Java 8 and earlier does not allow more than 1 annotation of the same type to be declared
-on a class.
+a single class. Java 8 and earlier does not allow more than one annotation of the same type to be declared
+on a single class.
-.Spring-based Apache Geode `ClientCache` application using multiple named `Pools`
+The following example uses the `@EnablePool` and `@EnablePools` annotations:
+
+.Spring-based {data-store-name} `ClientCache` application using multiple named `Pools`
[source, java]
----
@SpringBootApplication
@@ -200,14 +209,14 @@ on a class.
class ClientApplication { .. }
----
-The `name` attribute is the only required attribute of the `@EnablePool` annotation. As we will see below, the value
-of `name` corresponds to both the name of the `Pool` bean created in the Spring context as well as the name used to
-reference the corresponding configuration properties. It is also the name of the `Pool` registered and used
-in Apache Geode.
+The `name` attribute is the only required attribute of the `@EnablePool` annotation. As we will see later, the value
+of the `name` attribute corresponds to both the name of the `Pool` bean created in the Spring container as well as
+the name used to reference the corresponding configuration properties. It is also the name of the `Pool` registered
+and used by {data-store-name}.
-Similarly, on the server, a user can configure multiple `CacheServers` that a client can connect to...
+Similarly, on the server, you can configure multiple `CacheServers` that a client can connect to, as follows:
-.Spring-based Apache Geode `CacheServer` application using multiple named `CacheServers`
+.Spring-based {data-store-name} `CacheServer` application using multiple named `CacheServers`
[source, java]
----
@SpringBootApplication
@@ -222,65 +231,66 @@ class ServerApplication { .. }
----
NOTE: Like `@EnablePools`, `@EnableCacheServers` is a composite annotation for aggregating multiple `@EnableCacheServer`
-annotations on a single class. Again, Java 8 and earlier does not allow more than 1 annotation of the same type
-to be declared on a class.
+annotations on a single class. Again, Java 8 and earlier does not allow more than one annotation of the same type
+to be declared on a single class.
-One thing an observant reader may have noticed is, in all cases, the user is specifying hard-coded values for hostnames,
-ports as well other configuration-oriented Annotation attributes. This is not ideal when a user's application gets
+One thing an observant reader may have noticed is that, in all cases, you have specified hard-coded values for all
+hostnames, ports, and configuration-oriented annotation attributes. This is not ideal when the application gets
promoted and deployed to different environments, such as from DEV to QA to STAGING to PROD.
-How does an application developer handle dynamic configuration determined at runtime?
+The next section covers how to handle dynamic configuration determined at runtime.
[[bootstrap-annotation-config-configurers]]
== Runtime configuration using `Configurers`
-Another goal when designing the Annotation-based configuration model was to preserve _Type-Safety_ in the Annotation
-attributes. For example, if the configuration attribute could be expressed as an `int`, like a port number, then
-the attribute's type should be an `int`.
+Another goal when designing the annotation-based configuration model was to preserve type safety in the annotation
+attributes. For example, if the configuration attribute could be expressed as an `int` (such as a port number),
+then the attribute's type should be an `int`.
Unfortunately, this is not conducive to dynamic and resolvable configuration at runtime.
-One of the finer features of Spring is the ability to use _property placeholders_ and/or _SpEL expressions_
-in properties or attributes of the configuration meta-data when configuring beans in a Spring context.
-Although, this would require all Annotation attributes to be `Strings` thereby giving up _Type-Safety_; not acceptable!
+One of the finer features of Spring is the ability to use property placeholders and SpEL expressions
+in properties or attributes of the configuration metadata when configuring beans in the Spring container.
+However, this would require all annotation attributes to be of type `String`, thereby giving up type safety,
+which is not desirable.
-So, _Spring Data Geode_ borrows from another commonly used pattern in Spring, `Configurers`. Many different
-`Configurer` interfaces are provided out-of-the-box in Spring Web MVC, such as the
-https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.html[`org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer`].
+So, {sdg-name} borrows from another commonly used pattern in Spring, `Configurers`. Many different `Configurer`
+interfaces are provided in Spring Web MVC, including the
+{spring-framework-javadoc}/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.html[`org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer`].
-The `Configurers` design pattern are a way to allow application developers to receive a callback to customize
-the configuration of a component, or bean on startup. The framework calls back to user-provided code to adjust
-the configuration at runtime. One of the more common uses of this pattern is to supply conditional configuration
-based on the application's runtime environment.
+The `Configurers` design pattern enables application developers to receive a callback to customize the configuration
+of a component or bean on startup. The framework calls back to user-provided code to adjust the configuration
+at runtime. One of the more common uses of this pattern is to supply conditional configuration based on
+the application's runtime environment.
-_Spring Data Geode_ provides several `Configurer` callback interfaces to customize different aspects of Annotation-based
-configuration meta-data at runtime, before the _Spring_ managed beans that the Annotations create are initialized:
+{sdg-name} provides several `Configurer` callback interfaces to customize different aspects of the annotation-based
+configuration metadata at runtime, before the Spring managed beans that the annotations create are initialized:
-* `ClientCacheConfigurer`
-* `PeerCacheConfigurer`
* `CacheServerConfigurer`
+* `ClientCacheConfigurer`
* `ContinuousQueryListenerContainerConfigurer`
* `DiskStoreConfigurer`
* `IndexConfigurer`
+* `PeerCacheConfigurer`
* `PoolConfigurer`
* `RegionConfigurer`
-For example, we can use the `CacheServerConfigurer` and `ClientCacheConfigurer` to customize the port numbers
-used by our _Spring Boot_ `CacheServer` and `ClientCache` applications, respectively.
+For example, you can use the `CacheServerConfigurer` and `ClientCacheConfigurer` to customize the port numbers
+used by your Spring Boot `CacheServer` and `ClientCache` applications, respectively.
-First, in our server application...
+Consider the following example from a server application:
.Customizing a Spring Boot `CacheServer` application with a `CacheServerConfigurer`
[source, java]
----
@SpringBootApplication
-@CacheServerApplication(name = "SpringServerApplication", logLevel = "info")
+@CacheServerApplication(name = "SpringServerApplication")
class ServerApplication {
@Bean
CacheServerConfigurer cacheServerPortConfigurer(
- @Value("${geode.cache.server.host:localhost}") String cacheServerHost
- @Value("${geode.cache.server.port:40404}") int cacheServerPort) {
+ @Value("${gemfire.cache.server.host:localhost}") String cacheServerHost
+ @Value("${gemfire.cache.server.port:40404}") int cacheServerPort) {
return (beanName, cacheServerFactoryBean) -> {
cacheServerFactoryBean.setBindAddress(cacheServerHost);
@@ -291,19 +301,19 @@ class ServerApplication {
}
----
-Then, in our client application...
+Next, consider the following example from a client application:
.Customizing a Spring Boot `ClientCache` application with a `ClientCacheConfigurer`
[source, java]
----
@SpringBootApplication
-@ClientCacheApplication(logLevel = "info")
+@ClientCacheApplication
class ClientApplication {
@Bean
ClientCacheConfigurer clientCachePoolPortConfigurer(
- @Value("${geode.cache.server.host:localhost}") String cacheServerHost
- @Value("${geode.cache.server.port:40404}") int cacheServerPort) {
+ @Value("${gemfire.cache.server.host:localhost}") String cacheServerHost
+ @Value("${gemfire.cache.server.port:40404}") int cacheServerPort) {
return (beanName, clientCacheFactoryBean) ->
clientCacheFactoryBean.setServers(Collections.singletonList(
@@ -312,39 +322,39 @@ class ClientApplication {
}
----
-By using the provided `Configurers`, a user is able to receive a callback in order to further customize
-the configuration that is enabled by the associated Annotation at runtime, during startup.
+By using the provided `Configurers`, you can receive a callback to further customize the configuration
+that is enabled by the associated annotation at runtime, during startup.
-In addition, when the `Configurer` is declared as a bean in the Spring context, the bean definition can take advantage
-of other Spring container features, such as _property placeholders_, or _SpEL expressions_ using the `@Value` annotation
+In addition, when the `Configurer` is declared as a bean in the Spring container, the bean definition can take advantage
+of other Spring container features, such as property placeholders, SpEL expressions by using the `@Value` annotation
on factory method parameters, and so on.
-All _Spring Data Geode_-provided `Configurers` take 2 bits of information in the callback: the name of the bean created
-in the Spring context by the Annotation along with a reference to the `FactoryBean` used by the Annotation to
-create and configure the Geode component (e.g. a `ClientCache` instance is created and configured with
-SDG's `ClientCacheFactoryBean`).
+All `Configurers` provided by {sdg-name} take two bits of information in the callback: the name of the bean created
+in the Spring container by the annotation and a reference to the `FactoryBean` used by the annotation to
+create and configure the {data-store-name} component (for example, a `ClientCache` instance is created
+and configured with `ClientCacheFactoryBean`).
-NOTE: SDG `FactoryBeans` are part of the SDG public API and are what an application developer would use in Spring's
-https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-java[Java-based container configuration]
-if this **new** Annotation-based configuration model were not provided. Indeed, the Annotations themselves are using
-these very same `FactoryBeans` for their configuration. So, in essence, the Annotations are a facade
-and provide an extra layer of abstraction for convenience.
+NOTE: {sdg-acronym} `FactoryBeans` are part of the {sdg-acronym} public API and are what you would use in Spring's
+{spring-framework-docs}/core.html#beans-java[Java-based container configuration] if this new annotation-based
+configuration model were not provided. Indeed, the annotations themselves are using these same `FactoryBeans`
+for their configuration. So, in essence, the annotations are a facade providing an extra layer of abstraction
+for convenience.
-Given a `Configurer` can be declared as a regular bean definition like any other POJO, it is not difficult to imagine
-a user combining different Spring configuration options, such as the use of _Spring Profiles_ with `Conditions`
-using both Property Placeholders and SpEL expressions as well as other nifty features to create
-even more sophisticated and flexible configuration.
+Given that a `Configurer` can be declared as a regular bean definition like any other POJO, you can combine different
+Spring configuration options, such as the use of Spring Profiles with `Conditions` that use both property placeholders
+and SpEL expressions. These and other nifty features let you create even more sophisticated and flexible configurations.
However, `Configurers` are not the only option.
[[bootstrap-annotation-config-properties]]
== Runtime configuration using `Properties`
-In addition to `Configurers`, each Annotation attribute in the Annotation-based configuration model is associated
-with a corresponding configuration _property_, prefixed with `spring.data.gemfire.`, that can be declared in a
-_Spring Boot_ `application.properties` file.
+In addition to `Configurers`, each annotation attribute in the annotation-based configuration model is associated
+with a corresponding configuration property (prefixed with `spring.data.gemfire.`), which can be declared in a
+Spring Boot `application.properties` file.
-Building on our examples above, the client's `application.properties` would define...
+Building on the earlier examples, the client's `application.properties` file would define the following
+set of properties:
.Client `application.properties`
[source, java]
@@ -363,7 +373,7 @@ spring.data.gemfire.pool.Neptune.servers=saturn[41414],neptune[42424]
spring.data.gemfire.pool.Neptune.min-connections=25
----
-And, the server's application.properties would define...
+The corresponding server's `application.properties` file would define the following properties:
.Server `application.properties`
[source, java]
@@ -375,7 +385,7 @@ spring.data.gemfire.cache.server.Saturn.port=41414
spring.data.gemfire.cache.server.Neptune.port=41414
----
-Then, we can simplify the `@ClientCacheApplication` class to...
+Then you can simplify the `@ClientCacheApplication` class to the following:
.Spring `@ClientCacheApplication` class
[source, java]
@@ -390,13 +400,13 @@ Then, we can simplify the `@ClientCacheApplication` class to...
class ClientApplication { .. }
----
-And, the `@CacheServerApplication` class as...
+Also, the `@CacheServerApplication` class becomes the following:
.Spring `@CacheServerApplication` class
[source, java]
----
@SpringBootApplication
-@CacheServerApplication(name = "SpringApplication")
+@CacheServerApplication(name = "SpringServerApplication")
@EnableCacheServers(servers = {
@EnableCacheServer(name = "Venus"),
@EnableCacheServer(name = "Saturn"),
@@ -405,10 +415,10 @@ And, the `@CacheServerApplication` class as...
class ServerApplication { .. }
----
-The example above illustrates why it is import to "name" your Annotation-based beans (other than, it is required
-in certain cases). Doing so makes it possible to reference the bean in a Spring context from XML, properties
-and even Java. It is even possible to inject Annotation-defined beans into an application class,
-for whatever purpose; for example...
+The preceding example shows why it is important to "name" your annotation-based beans (other than because it is required
+in certain cases). Doing so makes it possible to reference the bean in a Spring context from XML, properties,
+and Java. It is even possible to inject annotation-defined beans into an application class,
+for whatever purpose, as the following example demonstrates:
[source, java]
----
@@ -422,13 +432,13 @@ class MyApplicationComponent {
}
----
-Likewise, naming a Annotation-defined bean allows you to code a `Configurer` to customize a specific, "named" bean
+Likewise, naming an annotation-defined bean lets you code a `Configurer` to customize a specific, "named" bean
since the `beanName` is 1 of 2 arguments passed to the callback.
-Often times, an associated Annotation attribute property takes 2 forms: a "named" property along with
+Oftentimes, an associated annotation attribute property takes two forms: a "named" property along with
an "unnamed" property.
-For example...
+The following example shows such an arrangement:
[source, java]
----
@@ -438,58 +448,61 @@ spring.data.gemfire.cache.server.Saturn...
spring.data.gemfire.cache.server.Neptune...
----
-While there are 3 named `CacheServers` above, there is 1 unnamed `CacheServer` property that serves as the default
-value for any unspecified value for that property even for "named" `CacheServers`. So, while "Venus" sets
-and overrides its own `bind-address`, "Saturn" and "Neptune" inherit from the unnamed
+While there are three named `CacheServers` above, there is one unnamed `CacheServer` property providing the default
+value for any unspecified value for that property, even for "named" `CacheServers`. So, while "Venus" sets
+and overrides its own `bind-address`, "Saturn" and "Neptune" inherit from the "unnamed"
`spring.data.gemfire.cache.server.bind-address` property.
-Refer to an Annotation's _Javadoc_ for which Annotation attributes support property-based configuration, and whether
-they support "named" properties over just default, "unnamed" properties.
+See an annotation's Javadoc for which annotation attributes support property-based configuration and whether
+they support "named" properties over default, "unnamed" properties.
[[bootstrap-annotation-config-properties-of-properties]]
=== `Properties` of `Properties`
-Of course, in Spring fashion, you can even express `Properties` in terms of other `Properties`, whether that is
-using a _Spring Boot_ `application.properties` file or by using the `@Value` annotation in your Java class...
+In the usual Spring fashion, you can even express `Properties` in terms of other `Properties`, whether that is
+by using a Spring Boot `application.properties` file or by using the `@Value` annotation in your Java configuration class.
+The following example shows a nested property being set in an `application.properties` file:
.Properties of Properties
[source, java]
----
-spring.data.gemfire.cache.server.port=${geode.cache.server.port:40404}
+spring.data.gemfire.cache.server.port=${gemfire.cache.server.port:40404}
----
-Or, in Java...
+The following example shows a nested property being set in Java:
+.Property placehodler nesting
[source, java]
----
@Bean
CacheServerConfigurer cacheServerPortConfigurer(
- @Value("${geode.cache.server.port:${some.other.property:40404}}") int cacheServerPort) {
+ @Value("${gemfire.cache.server.port:${some.other.property:40404}}") int cacheServerPort) {
...
}
}
----
-Property placeholder nesting can be arbitrarily deep.
+TIP: Property placeholder nesting can be arbitrarily deep.
[[bootstrap-annotation-config-embedded-services]]
-== Configuring embedded services
+== Configuring Embedded Services
-Apache Geode provides the ability to start many different embedded services required by an application depending on
-the use case.
+{data-store-name} provides the ability to start many different embedded services that are required by an application,
+depending on the use case.
[[bootstrap-annotation-config-embedded-services-locator]]
-=== Configuring an embedded Locator
+=== Configuring an Embedded Locator
-As mentioned previously, Apache Geode Locators are used by clients to connect with and find servers in a cluster
-as well as by new members joining an existing cluster to find other peers.
+As mentioned previously, {data-store-name} Locators are used by clients to connect to and find servers in a cluster.
+In addition, new members joining an existing cluster use Locators to find their peers.
-It is often convenient for application developers as they are developing their _Spring Boot_, _Spring Data Geode_
-applications to startup up a small cluster of 2 or 3 Apache Geode servers. Rather than starting a separate Locator
-process, a user can simply annotate her _Spring Boot_ `@CacheServerApplication` class with `@EnableLocator`.
+It is often convenient for application developers as they are developing their Spring Boot and {sdg-name}
+applications to startup up a small cluster of two or three {data-store-name} servers. Rather than starting
+a separate Locator process, you can annotate your Spring Boot `@CacheServerApplication` class with `@EnableLocator`,
+as follows:
-.Spring, Apache Geode `CacheServer` application running an embedded Locator
+.Spring, {data-store-name} `CacheServer` application running an embedded Locator
[source, java]
----
@SpringBootApplication
@@ -498,18 +511,17 @@ process, a user can simply annotate her _Spring Boot_ `@CacheServerApplication`
class ServerApplication { .. }
----
-The `@EnableLocator` annotation starts an embedded Locator in the Spring, Apache Geode `CacheServer` application
-process running on "_localhost_", listening on the default Locator port **10334**. It is possible to customize
-the `host` (a.k.a bind address) and `port` that the embedded Locator binds to using the corresponding
-Annotation attributes.
+The `@EnableLocator` annotation starts an embedded Locator in the Spring {data-store-name} `CacheServer` application
+running on `localhost`, listening on the default Locator port, `10334`. You can customize the `host` (bind address)
+and `port` that the embedded Locator binds to by using the corresponding annotation attributes.
-Additionally, the `@EnableLocator` attributes may be set with the `spring.data.gemfire.locator.host`
-and `spring.data.gemfire.locator.port` properties in `application.properties` as well.
+Alternatively, you can set the `@EnableLocator` attributes by setting the corresponding
+`spring.data.gemfire.locator.host` and `spring.data.gemfire.locator.port` properties in `application.properties`.
-Then, it is possible to start other _Spring Boot_, `@CacheServerApplication` enabled applications connecting to this
-Locator with...
+Then you can start other Spring Boot `@CacheServerApplication`-enabled applications by connecting to this
+Locator with the following:
-.Spring, Apache Geode `CacheServer` application connecting to a Locator
+.Spring, {data-store-name} `CacheServer` application connecting to a Locator
[source, java]
----
@SpringBootApplication
@@ -517,9 +529,9 @@ Locator with...
class ServerApplication { .. }
----
-You can even combine both application classes shown above into a single class and use your IDE to create different
-run profile configurations to run different instances of the same class with slightly modified configuration using
-Java System Properties...
+You can even combine both application classes shown earlier into a single class and use your IDE to create different
+run profile configurations to launch different instances of the same class with slightly modified configuration
+by using Java system properties, as follows:
.Spring `CacheServer` application running an embedded Locator and connecting to the Locator
[source, java]
@@ -534,12 +546,12 @@ public class ServerApplication {
@EnableLocator
@Profile("embedded-locator")
- static class Configuration {
- }
+ static class Configuration { }
+
}
----
-Then, for each run profile, a user simply sets and changes the following System properties...
+Then, for each run profile, you can set and change the following system properties:
.IDE run profile configuration
[source, java]
@@ -549,34 +561,35 @@ spring.data.gemfire.cache.server.port=41414
spring.profiles.active=embedded-locator
----
-Only 1 of the run profiles for the `ServerApplication` class should be set with the
-`-Dspring.profiles.active=embedded-locator` Java System Property. Then, simply change the `..name`
-and `..cache.server.port` for each of the other run profiles and you'll have yourself a small cluster/distributed system
-of Apache Geode Servers running on your local system. Pretty slick!
+Only 1 of the run profiles for the `ServerApplication` class should set the `-Dspring.profiles.active=embedded-locator`
+Java system property. Then you can change the `..name` and `..cache.server.port` for each of the other run profiles
+and have a small cluster (distributed system) of {data-store-name} servers running on your local system.
NOTE: The `@EnableLocator` annotation was meant to be a development-time annotation only and not something
-an application developer should use in production. It is strongly recommended that Locators be stand-alone,
+an application developer would use in production. We strongly recommend running Locators as standalone,
independent processes in the cluster.
-More details on how Apache Geode Locators work can be found
-http://geode.apache.org/docs/guide/12/topologies_and_comm/topology_concepts/how_member_discovery_works.html[here].
+More details on how {data-store-name} Locators work can be found
+{x-data-store-docs}/topologies_and_comm/topology_concepts/how_member_discovery_works.html[here].
[[bootstrap-annotation-config-embedded-services-manager]]
-=== Configuring an embedded Manager
+=== Configuring an Embedded Manager
-An Apache Geode Manager is another peer member/node in the cluster that is responsible for "management" activities.
-Management activities include things like creating Regions, Indexes, DiskStores, etc along with monitoring the runtime
-operations and behavior of these components.
+A {data-store-name} Manager is another peer member or node in the cluster that is responsible for cluster "management".
+Management involves creating `Regions`, `Indexes`, `DiskStores`, among other things, along with monitoring the runtime
+operations and behavior of the cluster components.
-The Manager allows a JMX-enabled client (e.g. the _Gfsh_ shell tool) to connect to the Manager to manage the cluster.
-It is also possible to connect to a Manager with JDK provided tools like _JConsole_ or _JVisualVM_, given these are
+The Manager lets a JMX-enabled client (such as the _Gfsh_ shell tool) connect to the Manager to manage the cluster.
+It is also possible to connect to a Manager with JDK-provided tools such as JConsole or JVisualVM, given that these are
both JMX-enabled clients as well.
-Perhaps we would also like to make our Spring `@CacheServerApplication` shown above a Manager as well. Simply annotate
-your Spring `@Configuration` or `@SpringBootApplication` class with `@EnableManager` and you are in business.
+Perhaps you would also like to enable the Spring `@CacheServerApplication` shown earlier as a Manager as well. To do so,
+annotate your Spring `@Configuration` or `@SpringBootApplication` class with `@EnableManager`.
-By default, the Manager binds to "_localhost_" listening on the default Apache Geode Manager port **1099**.
-Several aspects of the Manager can be configured with the Annotation attributes or corresponding properties.
+By default, the Manager binds to `localhost`, listening on the default Manager port of `1099`. Several aspects of
+the Manager can be configured with annotation attributes or the corresponding properties.
+
+The following example shows how to create an embedded Manager in Java:
.Spring `CacheServer` application running an embedded Manager
[source, java]
@@ -592,12 +605,12 @@ public class ServerApplication {
@EnableLocator
@EnableManager
@Profile("embedded-locator-manager")
- static class Configuration {
- }
+ static class Configuration { }
+
}
----
-With the above class, you can even use _Gfsh_ to connect to this server and manage it!
+With the preceding class, you can even use _Gfsh_ to connect to the small cluster and manage it, as follows:
[source, java]
----
@@ -608,7 +621,7 @@ $ gfsh
/ /__/ / ____/ _____/ / / / /
/______/_/ /______/_/ /_/ 1.2.1
-Monitor and Manage Apache Geode
+Monitor and Manage {data-store-name}
gfsh>connect
Connecting to Locator at [host=localhost, port=10334] ..
@@ -623,41 +636,41 @@ SpringCacheServerTwo | 10.99.199.5(SpringCacheServerTwo:14844):1025
SpringCacheServerThree | 10.99.199.5(SpringCacheServerThree:14846):1026
----
-Because we also have the embedded Locator enabled, we are able to connect indirectly to the Manager through
-the Locator. A Locator allows JMX clients to connect and find a Manager node in the cluster. If none exist,
-the Locator will assume the role of a Manager. However, if no existing Locator is present, then we would need to
-connect directly to the Manager using...
+Because we also have the embedded Locator enabled, we can connect indirectly to the Manager through the Locator.
+A Locator lets JMX clients connect and find a Manager in the cluster. If none exists, the Locator assumes the role
+of a Manager. However, if no Locator exists, we would need to connect directly to the Manager by using the following:
-.Gfsh `connect` command connecting directly to the Manager
+._Gfsh_ `connect` command connecting directly to the Manager
[source, java]
----
gfsh>connect --jmx-manager=localhost[1099]
----
-NOTE: Like the `@EnableLocator` annotation, the `@EnableManager` annotation was also meant to be a development-time
-only annotation and not something an application developer should use in production. It is strongly recommended
-that Managers, like Locators, be stand-alone, independent and dedicated processes in the cluster.
+NOTE: Like the `@EnableLocator` annotation, the `@EnableManager` annotation is also meant to be a development-time
+only annotation and not something an application developer would use in production. We strongly recommend
+that Managers, like Locators, be standalone, independent and dedicated processes in the cluster.
-More details on Apache Geode Management and Monitoring can be found
-http://geode.apache.org/docs/guide/12/managing/book_intro.html[here].
+More details on {data-store-name} management and monitoring can be found
+{x-data-store-docs}/managing/book_intro.html[here].
[[bootstrap-annotation-config-embedded-services-http]]
-=== Configuring the embedded HTTP Server
+=== Configuring the Embedded HTTP Server
-Apache Geode is also capable of running an embedded HTTP server. The current implementation is backed by
+{data-store-name} is also capable of running an embedded HTTP server. The current implementation is backed by
https://www.eclipse.org/jetty/[Eclipse Jetty].
-The embedded HTTP server is used to host Apache Geode's Management (Admin) REST API (not a publicly advertised API),
-the http://geode.apache.org/docs/guide/12/rest_apps/book_intro.html[Developer REST API]
-and the http://geode.apache.org/docs/guide/12/tools_modules/pulse/pulse-overview.html[Pulse Monitoring Web Application].
+The embedded HTTP server is used to host {data-store-name}'s Management (Admin) REST API (not a publicly advertised API),
+the {x-data-store-docs}/rest_apps/book_intro.html[Developer REST API],
+and the {x-data-store-docs}/tools_modules/pulse/pulse-overview.html[Pulse Monitoring Web Application].
-However, to use any of these Apache Geode provided Web applications, you must have a full installation of Apache Geode
-installed on your system, and you must set the `GEODE_HOME` environment variable to your installation directory.
+However, to use any of these {data-store-name}-provided web applications, you must have a full installation of
+{data-store-name} installed on your system, and you must set the `GEODE_HOME` environment variable to
+your installation directory.
-To enable the embedded HTTP server, simply add the `@EnableHttpService` annotation to any `@PeerCacheApplication`
-or `@CacheServerApplication` annotated class...
+To enable the embedded HTTP server, add the `@EnableHttpService` annotation to any `@PeerCacheApplication`
+or `@CacheServerApplication` annotated class, as follows:
-.Spring `CacheServer` application running an embedded HTTP server
+.Spring `CacheServer` application running the embedded HTTP server
[source, java]
----
@SpringBootApplication
@@ -666,22 +679,22 @@ or `@CacheServerApplication` annotated class...
public class ServerApplication { .. }
----
-By default, the embedded HTTP server listens on port **7070** for HTTP client requests. Of course, you can use
-the Annotation attributes or corresponding configuration properties to adjust the configuration as needed.
+By default, the embedded HTTP server listens on port `7070` for HTTP client requests. Of course, you can use
+the annotation attributes or corresponding configuration properties to adjust the port as needed.
-Follow the links above for more details on HTTP support and the services provided.
+Follow the earlier links for more details on HTTP support and the services provided.
[[bootstrap-annotation-config-embedded-services-memcached]]
=== Configuring the embedded Memcached Server (Gemcached)
-Apache Geode also implements the Memcached protocol with the ability to service Memcached clients. That is Memcached
-clients can connect to an Apache Geode cluster and perform Memcached operations as if the Apache Geode Servers
-in the cluster were actual Memcached Servers.
+{data-store-name} also implements the Memcached protocol with the ability to service Memcached clients. That is,
+Memcached clients can connect to a {data-store-name} cluster and perform Memcached operations as if
+the {data-store-name} servers in the cluster were actual Memcached servers.
-To enable the embedded Memcached Service, simply add the `@EnableMemcachedServer` annotation to any
-`@PeerCacheApplication` or `@CacheServerApplication` annotated class...
+To enable the embedded Memcached service, add the `@EnableMemcachedServer` annotation to any `@PeerCacheApplication`
+or `@CacheServerApplication` annotated class, as follows:
-.Spring `CacheServer` application running an embedded Memcached Server
+.Spring `CacheServer` application running an embedded Memcached server
[source, java]
----
@SpringBootApplication
@@ -690,20 +703,20 @@ To enable the embedded Memcached Service, simply add the `@EnableMemcachedServer
public class ServerApplication { .. }
----
-More details on Apache Geode's _Gemcached_ service can be found
-http://geode.apache.org/docs/guide/12/tools_modules/gemcached/chapter_overview.html[here].
+More details on {data-store-name}'s Memcached service (called "Gemcached") can be found
+{x-data-store-docs}/tools_modules/gemcached/chapter_overview.html[here].
[[bootstrap-annotation-config-embedded-services-redis]]
-=== Configuring the embedded Redis Server
+=== Configuring the Embedded Redis Server
-Apache Geode also implements the Redis Server protocol, which enables Redis clients to connect to and communicate with
-a cluster of Apache Geode Servers to issue Redis commands. As of this writing, the Redis Server protocol support
-in Apache Geode is still experimental.
+{data-store-name} also implements the Redis server protocol, which enables Redis clients to connect to and communicate
+with a cluster of {data-store-name} servers to issue Redis commands. As of this writing, the Redis server protocol
+support in {data-store-name} is still experimental.
-To enable the embedded Redis Service, simply add the `@EnableRedisServer` annotation to any `@PeerCacheApplication`
-or `@CacheServerApplication` annotated class...
+To enable the embedded Redis service, add the `@EnableRedisServer` annotation to any `@PeerCacheApplication`
+or `@CacheServerApplication` annotated class, as follows:
-.Spring `CacheServer` application running an embedded Redis Server
+.Spring `CacheServer` application running an embedded Redis server
[source, java]
----
@SpringBootApplication
@@ -712,16 +725,16 @@ or `@CacheServerApplication` annotated class...
public class ServerApplication { .. }
----
-More details on Apache Geode's Redis Adapter can be found
-http://geode.apache.org/docs/guide/12/tools_modules/redis_adapter.html[here].
+More details on {data-store-name}'s Redis adapter can be found
+{x-data-store-docs}/tools_modules/redis_adapter.html[here].
[[bootstrap-annotation-config-logging]]
== Configuring Logging
-Often times it is necessary to turn up logging in order to understand exactly what Apache Geode is doing and when.
+Oftentimes, it is necessary to turn up logging in order to understand exactly what {data-store-name} is doing and when.
-To enable _Logging_, simply annotate your application class with `@EnableLogging` and set the appropriate attributes
-or associated properties...
+To enable Logging, annotate your application class with `@EnableLogging` and set the appropriate attributes
+or associated properties, as follows:
.Spring `ClientCache` application with Logging enabled
[source, java]
@@ -733,26 +746,27 @@ public class ClientApplication { .. }
----
While the `logLevel` attribute can be specified with all the cache-based application annotations
-(e.g. `@ClientCacheApplication(logLevel="info")`), it is easier to customize logging behavior with
+(for example, `@ClientCacheApplication(logLevel="info")`), it is easier to customize logging behavior with
the `@EnableLogging` annotation.
-Additionally, you can specify the `log-level` using the `spring.data.gemfire.logging.level` property
+Additionally, you can configure the `log-level` by setting the `spring.data.gemfire.logging.level` property
in `application.properties`.
-See the `@EnableLogging` annotation _Javadoc_ for more details.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableLogging.html[`@EnableLogging` annotation Javadoc]
+for more details.
[[bootstrap-annotation-config-statistics]]
== Configuring Statistics
-To gain even deeper insight into Apache Geode at runtime, an application developer can enable _Statistics_.
-Gathering statistical data facilitates system analysis and troubleshooting when complex problems occur,
-which are often distributed in nature and where timing is a crucial factor.
+To gain even deeper insight into {data-store-name} at runtime, you can enable statistics. Gathering statistical data
+facilitates system analysis and troubleshooting when complex problems, which are often distributed in nature
+and where timing is a crucial factor, occur.
-When _Statistics_ are enabled, a user can use Apache Geode's
-http://gemfire.docs.pivotal.io/gemfire/tools_modules/vsd/chapter_overview.html[VSD (_Visual Statistics Display_)] tool
+When statistics are enabled, you can use {data-store-name}'s
+{x-data-store-docs}/tools_modules/vsd/chapter_overview.html[VSD (Visual Statistics Display)] tool
to analyze the statistical data that is collected.
-To enable _Statistics_, simply annotate your application class with `@EnableStatistics`...
+To enable statistics, annotate your application class with `@EnableStatistics`, as follows:
.Spring `ClientCache` application with Statistics enabled
[source, java]
@@ -763,41 +777,43 @@ To enable _Statistics_, simply annotate your application class with `@EnableStat
public class ClientApplication { .. }
----
-Enabling _Statistics_ on a server is particularly valuable when evaluating performance, which is as simple as
-annotating your `@PeerCacheApplication` or `@CacheServerApplication` class with `@EnableStatistics`.
+Enabling statistics on a server is particularly valuable when evaluating performance. To do so,
+annotate your `@PeerCacheApplication` or `@CacheServerApplication` class with `@EnableStatistics`.
-Use the `@EnableStatistics` annotation attributes or associated properties to customize the _Statistics_ gathering
-and collection process.
+You can use the `@EnableStatistics` annotation attributes or associated properties to customize
+the statistics gathering and collection process.
-See the `@EnableStatistics` annotation _Javadoc_ for more details.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableStatistics.html[`@EnableStatistics` annotation Javadoc]
+for more details.
-More details on Apache Geode's _Statistics_ can be found
-http://gemfire.docs.pivotal.io/gemfire/managing/statistics/chapter_overview.html[here].
+More details on {data-store-name}'s statistics can be found
+{x-data-store-docs}/managing/statistics/chapter_overview.html[here].
[[bootstrap-annotation-config-pdx]]
== Configuring PDX
-One of the more powerful features of Apache Geode is
-http://geode.apache.org/docs/guide/12/developing/data_serialization/gemfire_pdx_serialization.html[PDX Serialization].
-While a complete discussion on PDX is beyond the scope of this document, serialization using PDX is a much better
-alternative to _Java Serialization_, with the following benefits...
+One of the more powerful features of {data-store-name} is
+{x-data-store-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX serialization].
+While a complete discussion of PDX is beyond the scope of this document, serialization using PDX is a much better
+alternative to Java serialization, with the following benefits:
-1. PDX uses a centralized _Type Registry_ to keep the serialized bytes of an object more compact.
-2. PDX is a neutral serialization format allowing both Java and Native Clients to operate on the same data set.
-3. PDX supports versioning and allows object fields to be added or removed with affecting existing applications
-using either older or newer versions of the PDX serialized, application domain objects that have changed,
-and without data loss.
-4. PDX allows object fields to be accessed individually or in OQL query projections and predicates without
-the object needing to be de-serialized first.
+* PDX uses a centralized type registry to keep the serialized bytes of an object more compact.
+* PDX is a neutral serialization format, allowing both Java and Native clients to operate on the same data set.
+* PDX supports versioning and lets object fields be added or removed without affecting existing applications
+using either older or newer versions of the PDX serialized objects that have changed, without data loss.
+* PDX lets object fields be accessed individually in OQL query projections and predicates without the object
+needing to be de-serialized first.
-In general, serialization in Apache Geode is needed anytime data is transferred to/from clients and servers or between
-peers in a cluster for normal distribution and replication processes as well as when data is overflowed or persisted
-to disk.
+In general, serialization in {data-store-name} is required any time data is transferred to or from clients and servers
+or between peers in a cluster during normal distribution and replication processes as well as when data is overflowed
+or persisted to disk.
-Enabling PDX serialization is much simpler than modifying all of your application domain object types to be
-`java.io.Serializable`, which maybe undesirable to impose such restrictions on your application domain model.
+Enabling PDX serialization is much simpler than modifying all of your application domain object types to implement
+`java.io.Serializable`, especially when it may be undesirable to impose such restrictions on your
+application domain model or you do not have any control over the objects your are serializing, which is especially
+true when using a 3rd party library (e.g. think of a geo-spatial API with `Coordinate` types).
-To enable PDX, simply annotate your application class with `@EnablePdx`...
+To enable PDX, annotate your application class with `@EnablePdx`, as follows:
.Spring `ClientCache` application with PDX enabled
[source, java]
@@ -808,28 +824,30 @@ To enable PDX, simply annotate your application class with `@EnablePdx`...
public class ClientApplication { .. }
----
-Typically, an application's domain object types will either implement the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/PdxSerializable.html[`org.apache.geode.pdx.PdxSerializable`]
-interface, or an application developer will choose to implement and register a non-invasive implementation of the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/PdxSerializer.html[`org.apache.geode.pdx.PdxSerializer`]
+Typically, an application's domain object types either implements the
+{x-data-store-javadoc}/org/apache/geode/pdx/PdxSerializable.html[`org.apache.geode.pdx.PdxSerializable`]
+interface or you can implement and register a non-invasive implementation of the
+{x-data-store-javadoc}/org/apache/geode/pdx/PdxSerializer.html[`org.apache.geode.pdx.PdxSerializer`]
interface to handle all the application domain object types that need to be serialized.
-Unfortunately, Apache Geode only allows one `PdxSerializer` to be registered, which suggests that all application
-domain object types should be handled by a "single" `PdxSerializer` instance. But, that is a serious anti-pattern
-and unmaintainable practice to be sure.
+Unfortunately, {data-store-name} only lets one `PdxSerializer` be registered, which suggests that all application
+domain object types need to be handled by a single `PdxSerializer` instance. However, that is a serious anti-pattern
+and an unmaintainable practice.
-Even though only a single `PdxSerializer` instance can be registered with Apache Geode, it makes sense to create a
+Even though only a single `PdxSerializer` instance can be registered with {data-store-name}, it makes sense to create a
single `PdxSerializer` implementation per application domain object type.
-By using the https://en.wikipedia.org/wiki/Composite_pattern[Composite Software Design Pattern], the application
-developer can provide an implementation of the `PdxSerializer` interface that aggregates all of the application
-domain object type-specific `PdxSerializer` instances, but acts as a single `PdxSerializer` instance, and register it.
+By using the https://en.wikipedia.org/wiki/Composite_pattern[Composite Software Design Pattern], you can provide
+an implementation of the `PdxSerializer` interface that aggregates all of the application domain object type-specific
+`PdxSerializer` instances, but acts as a single `PdxSerializer` instance and register it.
-You can declare this _Composite_ `PdxSerializer` as a managed bean in the Spring context and refer to this
-_Composite_ `PdxSerializer` by bean name in the `@EnablePdx` annotation using the `serializerBeanName` attribute.
-_Spring Data Geode_ will take care of registering it with Apache Geode on the user's behalf.
+You can declare this composite `PdxSerializer` as a managed bean in the Spring container and refer to this composite
+`PdxSerializer` by its bean name in the `@EnablePdx` annotation using the `serializerBeanName` attribute. {sdg-name}
+takes care of registering it with {data-store-name} on your behalf.
-.Spring `ClientCache` application with PDX enabled, using a custom, composite `PdxSerializer`
+The following example shows how to create a custom composite `PdxSerializer`:
+
+.Spring `ClientCache` application with PDX enabled, using a custom composite `PdxSerializer`
[source, java]
----
@SpringBootApplication
@@ -844,27 +862,29 @@ public class ClientApplication {
}
----
-It is also possible to declare Apache Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[`org.apache.geode.pdx.ReflectionBasedAutoSerializer`]
-as a bean definition in a Spring context. Alternatively, you should use _Spring Data Geode's_ more robust,
-https://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/mapping/MappingPdxSerializer.html[`org.springframework.data.gemfire.mapping.MappingPdxSerializer`],
-which uses _Spring Data_ mapping meta-data and infrastructure applied to the serialization process for more efficient
+It is also possible to declare {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[`org.apache.geode.pdx.ReflectionBasedAutoSerializer`]
+as a bean definition in a Spring context.
+
+Alternatively, you should use {sdg-name}'s more robust
+{sdg-javadoc}/org/springframework/data/gemfire/mapping/MappingPdxSerializer.html[`org.springframework.data.gemfire.mapping.MappingPdxSerializer`],
+which uses Spring Data mapping metadata and infrastructure applied to the serialization process for more efficient
handling than reflection alone.
Many other aspects and features of PDX can be adjusted with the `@EnablePdx` annotation attributes
or associated configuration properties.
-See the `@EnablePdx` annotation _Javadoc_ for more details.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnablePdx.html[`@EnablePdx` annotation Javadoc]
+for more details.
[[bootstrap-annotation-config-ssl]]
== Configuring SSL
-Equally important to serializing data to be transferred over-the-wire is securing the data while in transit.
-Of course, the common way to accomplish this in _Java_ is using the _Secure Sockets Extension_ (SSE)
-and _Transport Layer Security_ (TLS).
+Equally important to serializing data to be transferred over the wire is securing the data while in transit.
+Of course, the common way to accomplish this in Java is by using the Secure Sockets Extension (SSE)
+and Transport Layer Security (TLS).
-To enable SSL, simply annotate your application class with `@EnableSsl` and set the necessary SSL configuration
-attributes or properties (e.g. keystores, usernames/passwords, etc)...
+To enable SSL, annotate your application class with `@EnableSsl`, as follows:
.Spring `ClientCache` application with SSL enabled
[source, java]
@@ -875,13 +895,16 @@ attributes or properties (e.g. keystores, usernames/passwords, etc)...
public class ClientApplication { .. }
----
-Different Apache Geode components: `GATEWAY`, `HTTP`, `JMX`, `LOCATOR`, `SERVER` can be individually configured
-with SSL, or they can all be collectively configured at once to use SSL using the `CLUSTER` enumerated value.
+Then you need to set the necessary SSL configuration attributes or properties: keystores, usernames/passwords, and so on.
-It is easy to specify which Apache Geode components that the SSL configuration settings should applied to using
-the nested `@EnableSsl` annotation `Component` enum...
+You can individually configure different {data-store-name} components (`GATEWAY`, `HTTP`, `JMX`, `LOCATOR`, and `SERVER`)
+with SSL, or you can collectively configure them to use SSL by using the `CLUSTER` enumerated value.
-.Spring `ClientCache` application with SSL enabled by Aache Geode component
+You can specify which {data-store-name} components the SSL configuration settings should applied by using
+the nested `@EnableSsl` annotation, `components` attribute with enumerated values from the `Component` enum,
+as follows:
+
+.Spring `ClientCache` application with SSL enabled by component
[source, java]
----
@SpringBootApplication
@@ -890,36 +913,39 @@ the nested `@EnableSsl` annotation `Component` enum...
public class ClientApplication { .. }
----
-In addition component-level SSL configuration, `ciphers`, `protocols` and `keystore`/`truststore` information can
-also be specified using the corresponding Annotation attribute or associated configuration properties.
+In addition, you can also specify component-level SSL configuration (`ciphers`, `protocols` and `keystore`/`truststore`
+information) by using the corresponding annotation attribute or associated configuration properties.
-See the `@EnableSsl` annotation _Javadoc_ for more details.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableSsl.html[`@EnableSsl` annotation Javadoc]
+for more details.
-More details on Apache Geode SSL support can be found
-http://gemfire.docs.pivotal.io/geode/managing/security/ssl_overview.html[here].
+More details on {data-store-name} SSL support can be found
+{x-data-store-docs}/managing/security/ssl_overview.html[here].
[[bootstrap-annotation-config-gemfire-properties]]
-== Configuring GemFire Properties
+== Configuring {data-store-name} Properties
-While many of the http://geode.apache.org/docs/guide/12/reference/topics/gemfire_properties.html[gemfire.properties]
-are conveniently encapsulated in and abstracted with an Annotation in the SDG Annotation-based configuration model,
-the less commonly used _Geode Properties_ are still accessible from the `@EnableGemFireProperties` annotation.
+While many of the {x-data-store-docs}/reference/topics/gemfire_properties.html[gemfire.properties]
+are conveniently encapsulated in and abstracted with an annotation in the {sdg-acronym} annotation-based
+configuration model, the less commonly used {data-store-name} properties are still accessible from
+the `@EnableGemFireProperties` annotation.
-Using the `@EnableGemFireProperties` annotation on your application class is convenient and a nice alternative to
-creating a `gemfire.properties` file or setting _Geode Properties_ as Java System properties on the command-line
+Annotating your application class with `@EnableGemFireProperties` is convenient and a nice alternative to creating
+a `gemfire.properties` file or setting {data-store-name} properties as Java system properties on the command line
when launching your application.
-TIP: It is recommended that these _Geode Properties_ be set in a `gemfire.properties` file when deploying
-your application to production. But, at development-time, it can be convenient to set these properties individually,
-as needed, for prototyping and testing purposes.
+TIP: We recommend that these {data-store-name} properties be set in a `gemfire.properties` file when deploying
+your application to production. However, at development time, it can be convenient to set these properties individually,
+as needed, for prototyping, debugging and testing purposes.
-A few examples of some of the less common _Geode Properties_ that a user usually need not worry about include,
-but are not limited to: `ack-wait-threshold`, `disable-tcp`, `socket-buffer-size`, etc.
+A few examples of some of the less common {data-store-name} properties that you usually need not worry about include,
+but are not limited to: `ack-wait-threshold`, `disable-tcp`, `socket-buffer-size`, and others.
-To individually set any _Geode Property_, simply annotate your application class with `@EnableGemFireProperties`
-and set the _Geode Properties_ you want to change from the default, out-of-the-box value set by Apache Geode...
+To individually set any {data-store-name} property, annotate your application class with `@EnableGemFireProperties`
+and set the {data-store-name} properties you want to change from the default value set by {data-store-name}
+with the corresponding attribute, as follows:
-.Spring `ClientCache` application with specific _Geode Properties_ set
+.Spring `ClientCache` application with specific {data-store-name} properties set
[source, java]
----
@SpringBootApplication
@@ -928,38 +954,39 @@ and set the _Geode Properties_ you want to change from the default, out-of-the-b
public class ClientApplication { .. }
----
-Keep in mind, some of the _Geode Properties_ are client specific (e.g. `conflateEvents`) while others are
-server specific (e.g. `distributedSystemId`, `enableNetworkPartitionDetection`, `enforceUniqueHost`, `memberTimeout`,
-`redundancyZone`, etc).
+Keep in mind that some of the {data-store-name} properties are client-specific (for example, `conflateEvents`),
+while others are server-specific (for example `distributedSystemId`, `enableNetworkPartitionDetection`,
+`enforceUniqueHost`, `memberTimeout`, `redundancyZone`, and others).
-More details on Apache Geode properties can be found
-http://geode.apache.org/docs/guide/12/reference/topics/gemfire_properties.html[here].
+More details on {data-store-name} properties can be found
+{x-data-store-docs}/reference/topics/gemfire_properties.html[here].
[[bootstrap-annotation-config-regions]]
== Configuring Regions
-So far, outside of PDX, our discussion has centered around configuring Apache Geode's more administrative functions:
-creating a cache instance, starting embedded services, enabling Logging, Statistics and SSL, using `gemfire.properties`
-to affect very low-level configuration and behavior. While all these configuration options are important, none of them
-relate directly to the application. In other words, we still need some place to store our application data and make it
-generally available and accessible.
+So far, outside of PDX, our discussion has centered around configuring {data-store-name}'s more administrative functions:
+creating a cache instance, starting embedded services, enabling logging, statistics, SSL, and using `gemfire.properties`
+to affect low-level configuration and behavior. While all these configuration options are important, none of them
+relate directly to your application. In other words, we still need some place to store our application data
+and make it generally available and accessible.
-Apache Geode organizes data in a cache into
-http://geode.apache.org/docs/guide/12/basic_config/data_regions/chapter_overview.html[Regions]. You can think of a
-Region as a table in a relational database. Generally, a Region should only store a single type of object making it
-more conducive for building effective `Indexes` and writing queries. We will talk about Indexing
+{data-store-name} organizes data in a cache into {x-data-store-docs}/basic_config/data_regions/chapter_overview.html[Regions].
+You can think of a Region as a table in a relational database. Generally, a Region should only store a single type of object,
+which makes it more conducive for building effective indexes and writing queries. We cover indexing
<>.
-Previously, _Spring Data Geode_ users needed to explicitly define and declare the Regions used in their applications
-to store data by writing very verbose Spring configuration meta-data, whether a user was using SDG's `FactoryBeans`
-from the API in Spring's
-https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-java[Java-based container configuration]...
+Previously, {sdg-name} users needed to explicitly define and declare the Regions used in their applications to store data
+by writing very verbose Spring configuration metadata, whether using {sdg-acronym}'s `FactoryBeans` from the API
+in Spring's {spring-framework-docs}/core.html#beans-java[Java-based container configuration]
+or using <>.
-.Example Region bean definition using Spring Java-based container configuration
+The following example demonstrates how to configure a Region bean in Java:
+
+.Example Region bean definition using Spring's Java-based container configuration
[source, java]
----
@Configuration
-class GeodeConfiguration {
+class GemFireConfiguration {
@Bean("Example")
PartitionedRegionFactoryBean exampleRegion(GemFireCache gemfireCache) {
@@ -978,9 +1005,9 @@ class GeodeConfiguration {
}
----
-Or, using <>...
+The following example shows how to configure the same Region bean in XML:
-.Example Region bean definition using the SDG XML Namespace
+.Example Region bean definition using {sdg-acronym}'s XML Namespace
[source, xml]
----
@@ -988,25 +1015,23 @@ Or, using <>...
----
-While neither Java nor XML configuration is all that difficult to do, it is cumbersome, especially if an application
-has a large number of Regions that need to be defined. Many relational database-based applications can literally
+While neither Java nor XML configuration is all that difficult to specify, either one can be cumbersome, especially if
+an application requires a large number of Regions. Many relational database-based applications can literally
have hundreds or even thousands of tables.
-Ugh!
+Now you can define and configure Regions based on their application domain objects (entities) themselves. No longer do
+you need to explicitly define `Region` bean definitions in Spring configuration metadata, unless you require
+finer-grained control.
-Now users can define and configure Regions based on their application domain objects (i.e. entities). No longer will
-a user need to explicitly define `Region` bean definitions in Spring configuration meta-data, unless finer-grained
-control is required.
+To simplify Region creation, {sdg-name} combines the use of Spring Data Repositories with the expressive
+power of annotation-based configuration using the new `@EnableEntityDefinedRegions` annotation.
-To simplify Region creation, _Spring Data Geode_ combines the use of _Spring Data_ _Repositories_ with the expressive
-power of Annotation-based configuration using the **new** `@EnableEntityDefinedRegions` annotation.
+NOTE: Most Spring Data application developers should already be familiar with the
+{spring-data-commons-docs-html}/#repositories[Spring Data Repository abstraction]
+and {sdg-name}'s <>,
+which has been specifically customized to optimize data access operations for {data-store-name}.
-NOTE: Most _Spring Data_ application developers should already be familiar with the
-https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories[_Spring Data Repository_ abstraction]
-and _Spring Data Geode's_ <> of _Spring Data's_ _Repository abstraction_,
-which has been specifically customized to optimize data access operations for Apache Geode.
-
-First, an application developer starts by defining the application domain objects...
+First, an application developer starts by defining the application's domain objects, as follows:
.Application domain object type modeling a Book
[source, java]
@@ -1030,8 +1055,8 @@ class Book {
}
----
-Next, an application developer would define a basic _Repository_ for `Books` by extending _Spring Data Commons_
-`org.springframework.data.repository.CrudRepository` interface...
+Next, you define a basic repository for `Books` by extending Spring Data Commons
+`org.springframework.data.repository.CrudRepository` interface, as follows:
.Repository for Books
[source, java]
@@ -1040,23 +1065,24 @@ interface BookRepository extends CrudRepository { .. }
----
The `org.springframe.data.repository.CrudRepository` is a Data Access Object (DAO) providing basic data access
-operations (CRUD) along with support for simple queries (e.g. `findById(..)`). The user can define additional,
-more sophisticated queries simply by declaring query methods on the _Repository_ interface
-(e.g. `List findByAuthor(Author author);`).
+operations (CRUD) along with support for simple queries (such as `findById(..)`). You can define additional,
+more sophisticated queries by declaring query methods on the repository interface
+(for example, `List findByAuthor(Author author);`).
-Under-the-hood, _Spring Data Geode_ provides an implementation of the applications _Repository_ interface when
-the Spring container is bootstrapped. SDG will even implement the query methods defined by the user so long as
-the user follows simple <>.
+Under the hood, {sdg-name} provides an implementation of your applications repository interfaces when
+the Spring container is bootstrapped. {sdg-acronym} even implements the query methods you define so long as you follow
+the <>.
-Now, when a user defined the `Book` class, she also specified the Region in which instances of `Book` will be mapped
-and stored by declaring the _Spring Data Geode_ mapping annotation, `@Region` on the entity's type. Of course, if
-the entity type (i.e. `Book`) referenced in the type parameter of the _Repository_ interface (i.e. `BookRepository`)
-is not annotated with `@Region`, the name is derived from the simple class name of the entity type (i.e. "Book").
+Now, when you defined the `Book` class, you also specified the Region in which instances of `Book` are mapped (stored)
+by declaring the {sdg-name} mapping annotation, `@Region` on the entity's type. Of course, if the entity type (`Book`,
+in this case) referenced in the type parameter of the repository interface (`BookRepository`, in this case)
+is not annotated with `@Region`, the name is derived from the simple class name of the entity type (also `Book`,
+in this case).
-_Spring Data Geode_ uses the mapping context containing mapping meta-data for all the entities defined in your
-application to determine all the Regions that will be needed at runtime.
+{sdg-name} uses the mapping context, which contains mapping metadata for all the entities defined in your application,
+to determine all the Regions that are needed at runtime.
-To enable and use this feature, simply annotate the application class with `@EnableEntityDefinedRegions`...
+To enable and use this feature, annotate the application class with `@EnableEntityDefinedRegions`, as follows:
.Entity-defined Region Configuration
[source, java]
@@ -1068,19 +1094,21 @@ To enable and use this feature, simply annotate the application class with `@Ena
class ClientApplication { .. }
----
-TIP: Creating Regions from entity classes is the most useful when using _Spring Data Repositories_ in your application.
-_Spring Data Geode's_ _Repository_ support is enabled with the `@EnableGemfireRepositories` annotation, as shown
-in the example above.
+TIP: Creating Regions from entity classes is most useful when using Spring Data Repositories in your application.
+{sdg-name}'s Repository support is enabled with the `@EnableGemfireRepositories` annotation, as shown in
+the preceding example.
-By default, the `@EnableEntityDefinedRegions` annotation will scan for entity classes recursively starting from
+By default, the `@EnableEntityDefinedRegions` annotation scans for entity classes recursively, starting from
the package of the configuration class on which the `@EnableEntityDefinedRegions` annotation is declared.
-However, it is common to limit the search during the scan by setting the `basePackages` attribute with the package names
-containing your application entity classes.
+However, it is common to limit the search during the scan by setting the `basePackages` attribute with
+the package names containing your application entity classes.
-Alternatively, a user can use the more type-safe `basePackageClasses` attribute for specifying the package to scan
-by setting the attribute to an entity type in the package containing the entity's class, or by using a non-entity
-placeholder class in the package specifically created for identifying the package to scan. For example...
+Alternatively, you can use the more type-safe `basePackageClasses` attribute for specifying the package to scan
+by setting the attribute to an entity type in the package that contains the entity's class, or by using a non-entity
+placeholder class specifically created for identifying the package to scan.
+
+The following example shows how to specify the entity types to scan:
.Entity-defined Region Configuration using the Entity class type
[source, java]
@@ -1095,56 +1123,57 @@ placeholder class in the package specifically created for identifying the packag
class ClientApplication { .. }
----
-In addition to specifying the location where to begin the scan, like Spring's `@ComponentScan` annotation, a user can
-specify `include` and `exclude` filters with all the same semantics of the
-`org.springframework.context.annotation.ComponentScan.Filter` annotation.
+In addition to specifying where to begin the scan, like Spring's `@ComponentScan` annotation, you can specify `include`
+and `exclude` filters with all the same semantics of the `org.springframework.context.annotation.ComponentScan.Filter`
+annotation.
-See the `@EnableEntityDefinedRegion` annotation _Javadoc_ for more details.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableEntityDefinedRegions.html[`@EnableEntityDefinedRegions` annotation Javadoc]
+for more details.
[[bootstrap-annotation-config-region-types]]
=== Configuring Type-specific Regions
-Apache Geode supports many different
-http://geode.apache.org/docs/guide/12/developing/region_options/region_types.html[types of Regions].
-Each type corresponds to the Region's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/DataPolicy.html[`DataPolicy`],
-which determines exactly how the data in the Region will be managed (e.g. distributed/replicated, etc).
+{data-store-name} supports many different {x-data-store-docs}/developing/region_options/region_types.html[types of Regions].
+Each type corresponds to the Region's {x-data-store-javadoc}/org/apache/geode/cache/DataPolicy.html[`DataPolicy`],
+which determines exactly how the data in the Region will be managed (i.e. distributed, replicated, and so on).
-NOTE: Other configuration settings also can affect how data is managed like the Region's `scope`.
-See http://geode.apache.org/docs/guide/12/developing/region_options/storage_distribution_options.html[Storage and Distribution Options]
-in the Apache Geode User Guide for more details.
+NOTE: Other configuration settings (such as the Region's `scope`) can also affect how data is managed.
+See {x-data-store-docs}/developing/region_options/storage_distribution_options.html["`Storage and Distribution Options`"]
+in the {data-store-name} User Guide for more details.
-When the user annotates her application domain object types with the generic `@Region` mapping annotation,
-_Spring Data Geode_ will decide which type of `Region` to create. SDG's default strategy takes the cache type
-into consideration when determining the type of `Region` to create.
+When you annotate your application domain object types with the generic `@Region` mapping annotation, {sdg-name} decides
+which type of Region to create. {sdg-acronym}'s default strategy takes the cache type into consideration when determining
+the type of Region to create.
-For example, if the application was declared as a `ClientCache` using the `@ClientCacheApplication` annotation,
-then SDG would create a client `PROXY` `Region`. Or, if the application was declared as a peer `Cache` using either the
-`@PeerCacheApplication` or `@CacheServerApplication` annotations, then SDG would create a server `PARTITION` `Region`.
+For example, if you declare the application as a `ClientCache` by using the `@ClientCacheApplication` annotation,
+{sdg-acronym} creates a client `PROXY` `Region`. Alternatively, if you declare the application as a peer `Cache`
+by using either the `@PeerCacheApplication` or `@CacheServerApplication` annotations, {sdg-acronym} creates
+a server `PARTITION` `Region`.
-Of course, an application developer is always able to override the default when necessary. To override the default
-applied by _Spring Data Geode_, 4 new Region mapping annotations have been introduced:
+Of course, you can always override the default when necessary. To override the default applied by {sdg-name},
+four new Region mapping annotations have been introduced:
-* `ClientRegion`
-* `LocalRegion`
-* `PartitionRegion`
-* `ReplicateRegion`
+* `@ClientRegion`
+* `@LocalRegion`
+* `@PartitionRegion`
+* `@ReplicateRegion`
-The `ClientRegion` mapping annotation is specific to client applications. All other Region mapping annotations
-listed above can only be used in server applications with an embedded peer `Cache`.
+The `@ClientRegion` mapping annotation is specific to client applications. All of the other Region mapping annotations
+listed above can be used only in server applications that have an embedded peer `Cache`.
-It is sometimes necessary for client applications to create and use "local-only" Regions, perhaps to aggregate data
+It is sometimes necessary for client applications to create and use local-only Regions, perhaps to aggregate data
from other Regions in order to analyze the data locally and carry out some function performed by the application
-for the user. In this case, the data may not need to be distributed back to the server, not unless other applications
-need access to the results. This Region might even be temporary and discarded after use, which could be accomplished
-with Idle-Timeout (TTI) and Time-To-Live (TTL) expiration policies on the Region itself.
+on the user's behalf. In this case, the data does not need to be distributed back to the server unless other
+applications need access to the results. This Region might even be temporary and discarded after use, which could be
+accomplished with Idle-Timeout (TTI) and Time-To-Live (TTL) expiration policies on the Region itself.
+(See "`<>`" for more on expiration policies.)
NOTE: Region-level Idle-Timeout (TTI) and Time-To-Live (TTL) expiration policies are independent of and different from
-entry-level TTI/TTL expiration policies.
+entry-level TTI and TTL expiration policies.
-In any case, if a user wanted to create a local-only, client Region where the data is not gong to be distributed to
-a corresponding Region with the same name on the server, the user would simply declare the `@ClientRegion`
-mapping annotation and set the `shortcut` attribute to `ClientRegionShortcut.LOCAL`...
+In any case, if you want to create a local-only client Region where the data is not going to be distributed to
+a corresponding Region with the same name on the server, you can declare the `@ClientRegion` mapping annotation
+and set the `shortcut` attribute to `ClientRegionShortcut.LOCAL`, as follows:
.Spring `ClientCache` application with a local-only, client Region
[source, java]
@@ -1153,38 +1182,38 @@ mapping annotation and set the `shortcut` attribute to `ClientRegionShortcut.LOC
class ClientLocalEntityType { .. }
----
-All `Region` type-specific annotations provide additional attributes that are both common across `Region` types
-as well as specific to only that type of `Region` (e.g. the `collocatedWith` and `redundantCopies` attributes
-in the `PartitionRegion` annotation apply to `PARTITION` Regions only).
+All Region type-specific annotations provide additional attributes that are both common across Region types
+as well as specific to only that type of Region. For example, the `collocatedWith` and `redundantCopies` attributes
+in the `PartitionRegion` annotation apply to `PARTITION` Regions only.
-More details on Apache Geode Region Types can be found
-http://geode.apache.org/docs/guide/12/developing/region_options/region_types.html[here].
+More details on {data-store-name} Region types can be found
+{x-data-store-docs}/developing/region_options/region_types.html[here].
[[bootstrap-annotation-config-region-eviction]]
=== Configuring Eviction
-Managing data with Apache Geode is an active task. More than likely, tuning will be required and a combination
-of features (e.g. both _Eviction_ and <>) will need to
-be employed to effectively manage your data in memory with Apache Geode.
+Managing data with {data-store-name} is an active task. Tuning is generally required, and you must employ a combination
+of features (for example, both eviction and <>)
+to effectively manage your data in memory with {data-store-name}.
-Given that Apache Geode is an _In-Memory Data Grid_ (IMDG), data is managed in "memory" and distributed to other nodes
+Given that {data-store-name} is an In-Memory Data Grid (IMDG), data is managed in-memory and distributed to other nodes
that participate in a cluster in order to minimize latency, maximize throughput and ensure that data is highly available.
-Since not all of an application's data is going to typically fit in memory, even across an entire cluster of nodes,
-much less on a single node, capacity can be increased by adding new nodes to the cluster. This is commonly referred to
-as linear scale-out (rather than scaling up, which means to add more memory, more CPU, more disk, more network bandwidth,
-basically more of every system resource in order to handle the load).
+Since not all of an application's data is going to typically fit in memory (even across an entire cluster of nodes,
+much less on a single node), you can increase capacity by adding new nodes to the cluster. This is commonly referred to
+as linear scale-out (rather than scaling up, which means adding more memory, more CPU, more disk,
+or more network bandwidth -- basically more of every system resource in order to handle the load).
Still, even with a cluster of nodes, it is usually imperative that only the most important data be kept in memory.
-Running out-of-memory, or even venturing near full capacity, is rarely, if ever, a good thing. Stop-the-world GCs
+Running out of memory, or even venturing near full capacity, is rarely, if ever, a good thing. Stop-the-world GCs
or worse, `OutOfMemoryErrors`, will bring your application to a screaming halt.
-So, to help manage memory and keep the most important data around, Apache Geode supports LRU-based _Eviction_.
-That is, Apache Geode evicts Region entries based on when those entries were last accessed by using
-the _Least Recently Used_ algorithm.
+So, to help manage memory and keep the most important data around, {data-store-name} supports Least Recently Used (LRU)
+eviction. That is, {data-store-name} evicts Region entries based on when those entries were last accessed by using
+the Least Recently Used algorithm.
-To enable _Eviction_, simply annotate the application class with `@EnableEviction`...
+To enable eviction, annotate the application class with `@EnableEviction`, as follows:
-.Spring application with Eviction enabled
+.Spring application with eviction enabled
[source, java]
----
@SpringBootApplication
@@ -1198,49 +1227,48 @@ To enable _Eviction_, simply annotate the application class with `@EnableEvictio
class ServerApplication { .. }
----
-Eviction policies are usually set on the Regions in the server(s).
+Eviction policies are usually set on the Regions in the servers.
-As shown above, the `policies` attribute can specify 1 or more nested `@EvictionPolicy` annotations, each 1 individually
-catered to 1 or more Regions where the Eviction policy needs to be applied.
+As shown earlier, the `policies` attribute can specify one or more nested `@EvictionPolicy` annotations, with each one
+being individually catered to one or more Regions where the eviction policy needs to be applied.
-Additionally, a user can reference a custom implementation of Apache Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/util/ObjectSizer.html[`org.apache.geode.cache.util.ObjectSizer`] interface,
-which can be defined as a bean in the Spring context and referenced by name using the `objectSizerName` attribute.
+Additionally, you can reference a custom implementation of {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/cache/util/ObjectSizer.html[`org.apache.geode.cache.util.ObjectSizer`] interface,
+which can be defined as a bean in the Spring container and referenced by name by using the `objectSizerName` attribute.
-An `ObjectSizer` allows the user to define the criteria used to evaluate and determine the the size of objects
-stored in a Region.
+An `ObjectSizer` lets you define the criteria used to evaluate and determine the the size of objects stored in a Region.
-See the `@EnableEviction` annotation _Javadoc_ for a complete list of Eviction configuration options.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableEviction.html[`@EnableEviction` annotation Javadoc]
+for a complete list of eviction configuration options.
-More details on Apache Geode Eviction can be found
-http://geode.apache.org/docs/guide/12/developing/eviction/chapter_overview.html[here].
+More details on {data-store-name} eviction can be found
+{x-data-store-docs}/developing/eviction/chapter_overview.html[here].
[[bootstrap-annotation-config-region-expiration]]
=== Configuring Expiration
-Along with <>, _Expiration_ can also be used to manage memory
-by allowing entries stored in a Region to expire. Both _Time-to-Live_ (TTL) and _Idle-Timeout_ (TTI) based entry
-expiration policies are supported in Apache Geode.
+Along with <>, expiration can also be used to manage memory
+by allowing entries stored in a Region to expire. {data-store-name} supports both Time-to-Live (TTL)
+and Idle-Timeout (TTI) entry expiration policies.
-_Spring Data Geode's_ Annotation-based Expiration configuration is based on
-<> added in
-_Spring Data Geode_ version 1.5.
+{sdg-name}'s annotation-based expiration configuration is based on the
+<>
+added in {sdg-name} version 1.5.
-Essentially, _Spring Data Geode's_ Expiration annotation support is based on a provided, custom implementation of
-Apache Geode's http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CustomExpiry.html[`org.apache.geode.cache.CustomExpiry`] interface.
+Essentially, {sdg-name}'s expiration annotation support is based on a custom implementation of {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/cache/CustomExpiry.html[`org.apache.geode.cache.CustomExpiry`] interface.
This `o.a.g.cache.CustomExpiry` implementation inspects the user's application domain objects stored in a Region
-for the presence of type-level Expiration annotations.
+for the presence of type-level expiration annotations.
-_Spring Data Geode_ provides the following Expiration annotations used on application domain object types,
-out-of-the-box...
+{sdg-name} provides the following expiration annotations:
* `Expiration`
* `IdleTimeoutExpiration`
* `TimeToLiveExpiration`
-An application domain object type can be annotated with 1 or more of the Expiration annotations, like so...
+An application domain object type can be annotated with one or more of the expiration annotations, as follows:
-.Applicaton domain object specific Expiration policy
+.Applicaton domain object specific expiration policy
[source, java]
----
@Region("Books")
@@ -1248,9 +1276,9 @@ An application domain object type can be annotated with 1 or more of the Expirat
class Book { .. }
----
-To enable _Expiration_, simply annotate the application class with `@EnableExpiration`...
+To enable expiration, annotate the application class with `@EnableExpiration`, as follows:
-.Spring application with Expiration enabled
+.Spring application with expiration enabled
[source, java]
----
@SpringBootApplication
@@ -1259,10 +1287,10 @@ To enable _Expiration_, simply annotate the application class with `@EnableExpir
class ServerApplication { .. }
----
-In addition to application domain object type-level Expiration policies, individual Expiration policies on a
-Region-by-Region basis can be configured directly with the `@EnableExpiration` annotation as well.
+In addition to application domain object type-level expiration policies, you can directly and individually configure
+expiration policies on a Region by Region basis using the `@EnableExpiration` annotation, as follows:
-.Spring application with global Expiration policies
+.Spring application with region-specific expiration policies
[source, java]
----
@SpringBootApplication
@@ -1275,28 +1303,30 @@ Region-by-Region basis can be configured directly with the `@EnableExpiration` a
class ServerApplication { .. }
----
-Expiration policies are usually set on the Regions in the server(s).
+The preceding example sets expiration policies for the `Books`, `Customers`, and `Orders` Regions.
-See the `@EnableExpiration` annotation _Javadoc_ for a complete list of Expiration configuration options.
+Expiration policies are usually set on the Regions in the servers.
-More details on Apache Geode Expiration can be found
-http://geode.apache.org/docs/guide/12/developing/expiration/chapter_overview.html[here].
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableExpiration.html[`@EnableExpiration` annotation Javadoc]
+for a complete list of expiration configuration options.
+
+More details on {data-store-name} expiration can be found
+{x-data-store-docs}/developing/expiration/chapter_overview.html[here].
[[bootstrap-annotation-config-region-compression]]
=== Configuring Compression
-In addition to <>
-and <>, a user may also configure his or her data Regions
-to use Compression in order to reduce memory consumption.
+In addition to <>
+and <>, you can also configure your data Regions
+with compression to reduce memory consumption.
-Apache Geode allows users to compress in-memory Region values using pluggable
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/compression/Compressor.html[`Compressors`],
-or different compression codecs. Out-of-the-box, Apache Geode uses Google's http://google.github.io/snappy/[Snappy]
-compression library.
+{data-store-name} lets you compress in memory Region values by using pluggable
+{x-data-store-javadoc}/org/apache/geode/compression/Compressor.html[`Compressors`], or different compression codecs.
+{data-store-name} uses Google's http://google.github.io/snappy/[Snappy] compression library by default.
-To enable Compression support, simply annotate the application class with `@EnableCompression`...
+To enable compression, annotate the application class with `@EnableCompression`, as follows:
-.Spring application with Compression enabled
+.Spring application with Region compression enabled
[source, java]
----
@SpringBootApplication
@@ -1305,44 +1335,46 @@ To enable Compression support, simply annotate the application class with `@Enab
class ClientApplication { .. }
----
-NOTE: Neither the `compressorBeanName` nor the `regionNames` attribute are required.
+NOTE: Neither the `compressorBeanName` nor the `regionNames` attributes are required.
-The `compressorBeanName` defaults to "`SnappyCompressor`" enabling Apache Geode's provided
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/compression/SnappyCompressor.html[`SnappyCompressor`]
-by default.
+The `compressorBeanName` defaults to `SnappyCompressor`, enabling {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/compression/SnappyCompressor.html[`SnappyCompressor`].
-The `regionNames` attribute is an array of Region names specifying the Regions that will have compression enabled.
-By default, all Regions will compress values if the `regionNames` attribute is not explicitly set.
+The `regionNames` attribute is an array of Region names that specify the Regions that have compression enabled.
+By default, all Regions compress values if the `regionNames` attribute is not explicitly set.
-TIP: Alternatively, a user may use the `spring.data.gemfire.cache.compression.compressor-bean-name`
+TIP: Alternatively, you can use the `spring.data.gemfire.cache.compression.compressor-bean-name`
and `spring.data.gemfire.cache.compression.region-names` properties in the `application.properties` file
to set and configure the values of these `@EnableCompression` annotation attributes.
-WARNING: To use Apache Geode's Region Compression feature, you must include the `org.iq80.snappy:snappy` dependency
-in your application _Maven_ `pom.xml` file, or `build.gradle` file when using _Gradle_. This is only necessary
-if you use Apache Geode's default, out-of-the-box support for Region Compression, which uses the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/compression/SnappyCompressor.html[`SnappyCompressor`]
-by default. Of course, if you are using another compression library, you will need to include dependencies
-for that compression library on your application's classpath. Additionally, you will need to implement Apache Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/compression/Compressor.html[`Compressor`] interface
-to adapt your compression library of choice, define it as a bean in the _Spring_ context, and then set
-the `compressorBeanName` to this custom bean definition.
+WARNING: To use {data-store-name}'s Region compression feature, you must include the `org.iq80.snappy:snappy` dependency
+in your application's `pom.xml` file (for Maven) or `build.gradle` file (for Gradle). This is necessary only if you use
+{data-store-name}'s default support for Region compression, which uses the
+{x-data-store-javadoc}/org/apache/geode/compression/SnappyCompressor.html[`SnappyCompressor`] by default.
+Of course, if you use another compression library, you need to include dependencies for that compression library
+on your application's classpath. Additionally, you need to implement {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/compression/Compressor.html[`Compressor`] interface to adapt your compression
+library of choice, define it as a bean in the Spring compressor, and set the `compressorBeanName`
+to this custom bean definition.
-See the `@EnableCompression` annotation _Javadoc_ for more details.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableCompression.html[`@EnableCompression` annotation Javadoc]
+for more details.
-More details on Apache Geode Compression can be found
+More details on {data-store-name} compression can be found
http://gemfire91.docs.pivotal.io/geode/managing/region_compression.html[here].
[[bootstrap-annotation-config-region-off-heap]]
-=== Configuring Off-Heap
+=== Configuring Off-Heap Memory
-Another effective means for reducing pressure on the JVM's Heap memory and minimize GC activity is to use
-Apache Geode's _Off-Heap_ memory support. Rather than storing Region entries on the JVM Heap, entries are stored
-in the system's main memory. Off-Heap generally works best when the objects being stored are uniform in size,
-are mostly less than 128K and do not need to be deserialized frequently, as explained in the Apache Geode
-http://geode.apache.org/docs/guide/14/managing/heap_use/off_heap_management.html[User Guide].
+Another effective means for reducing pressure on the JVM's Heap memory and minimizing GC activity is to use
+{data-store-name}'s off-heap memory support.
-To enable _Off-Heap_ support, simple annotate the application class with `@EnableOffHeap`...
+Rather than storing Region entries on the JVM Heap, entries are stored in the system's main memory. Off-heap memory
+generally works best when the objects being stored are uniform in size, are mostly less than 128K, and do not need
+to be deserialized frequently, as explained in the {data-store-name}
+{x-data-store-docs}/managing/heap_use/off_heap_management.html[User Guide].
+
+To enable off-heap, annotate the application class with `@EnableOffHeap`, as follows:
.Spring application with Off-Heap enabled
[source, java]
@@ -1353,38 +1385,40 @@ To enable _Off-Heap_ support, simple annotate the application class with `@Enabl
class ServerApplication { .. }
----
-The `memorySize` attribute is required. The value for the `memorySize` attribute specifies the amount of main memory
-a Region is allowed to use in either megabytes (`m`) or gigabytes (`g`).
+The `memorySize` attribute is required. The value for the `memorySize` attribute specifies the amount of main memory
+a Region can use in either megabytes (`m`) or gigabytes (`g`).
-The `regionNames` attribute is an array of Region names specifying the Regions that will store entries in main memory.
-By default, all Regions will use main memory if the `regionNames` attribute is not explicitly set.
+The `regionNames` attribute is an array of Region names that specifies the Regions that store entries in main memory.
+By default, all Regions use main memory if the `regionNames` attribute is not explicitly set.
-TIP: Alternatively, a user may use the `spring.data.gemfire.cache.off-heap.memory-size`
-and `spring.data.gemfire.cache.off-heap.region-names` properties in the `application.properties` file
-to set and configure the values of these `@EnableOffHeap` annotation attributes.
+TIP: Alternatively, you can use the `spring.data.gemfire.cache.off-heap.memory-size`
+and `spring.data.gemfire.cache.off-heap.region-names` properties in the `application.properties` file to set
+and configure the values of these `@EnableOffHeap` annotation attributes.
-See the `@EnableOffHeap` annotation _Javadoc_ for more details.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableOffHeap.html[`@EnableOffHeap` annotation Javadoc]
+for more details.
[[bootstrap-annotation-config-region-indexes]]
=== Configuring Indexes
There is not much use in storing data in Regions unless the data can be accessed.
-In addition to `Region.get(key)` operations, particularly when the key of the value of interest is known in advance,
-data is commonly retrieved by executing queries on the Regions containing the data. With Apache Geode, queries are
-written using the _Object Query Language_ (OQL), and the specific data set that a client wishes to access is expressed
-in the query's predicate (e.g. `SELECT * FROM /Books b WHERE b.author.name = 'Jon Doe'`).
+In addition to `Region.get(key)` operations, particularly when the key is known in advance, data is commonly retrieved
+by executing queries on the Regions that contain the data. With {data-store-name}, queries are written by using
+the Object Query Language (OQL), and the specific data set that a client wishes to access is expressed
+in the query's predicate (for example, `SELECT * FROM /Books b WHERE b.author.name = 'Jon Doe'`).
-Generally, querying without Indexes is not very efficient. When executing queries without an Index, Apache Geode
+Generally, querying without indexes is inefficient. When executing queries without an index, {data-store-name}
performs the equivalent of a full table scan.
-Indexes are created and maintained for fields on objects used in query predicates to match the data of interests,
-expressed by the query's projection. Different types of Indexes can be created, such as
-http://geode.apache.org/docs/guide/12/developing/query_index/creating_key_indexes.html[Key]
-and http://geode.apache.org/docs/guide/12/developing/query_index/creating_hash_indexes.html[Hash] Indexes.
+Indexes are created and maintained for fields on objects used in query predicates to match the data of interest, as
+expressed by the query's projection. Different types of indexes, such as
+{x-data-store-docs}/developing/query_index/creating_key_indexes.html[key]
+and {x-data-store-docs}/developing/query_index/creating_hash_indexes.html[hash] indexes, can be created.
-_Spring Data Geode_ makes it very easy to create Indexes on Regions where the data is stored and accessed.
-Rather than explicitly declaring `Index` bean definitions using Spring config as before...
+{sdg-name} makes it easy to create indexes on Regions where the data is stored and accessed. Rather than explicitly
+declaring `Index` bean definitions by using Spring config as before, we can create an `Index` bean definition in Java,
+as follows:
.Index bean definition using Java config
[source, java]
@@ -1404,22 +1438,22 @@ IndexFactoryBean bookIsbnIndex(GemFireCache gemfireCache) {
}
----
-Or, in <>...
+Alternatively, we can use <> to create an `Index` bean definition, as follows:
.Index bean definition using XML
[source, xml]
----
-
+
----
-Indexes can now be defined directly on the fields declared in application domain object types that a user knows
-will be used in query predicates to speedup those queries. Indexes will even be applied for OQL queries generated
-from user-defined query methods on an application's _Repository_ interfaces.
+However, now you can directly define indexes on the fields of your application domain object types for which you know
+will be used in query predicates to speed up those queries. You can even apply indexes for OQL queries generated
+from user-defined query methods on an application's repository interfaces.
-Re-using the example `Book` class from above, we can annotate the fields on `Book` that we know will be used in queries
-we define with query methods in the `BookRepository` interface...
+Re-using the example `Book` entity class from earlier, we can annotate the fields on `Book` that we know are used
+in queries that we define with query methods in the `BookRepository` interface, as follows:
-.Application domain object type modeling a Book using Indexes
+.Application domain object type modeling a book using indexes
[source, java]
----
@Region("Books")
@@ -1444,24 +1478,24 @@ class Book {
----
In our new `Book` class definition, we annotated the `author` field with `@Indexed` and the `title` field
-with `@LuceneIndexed`. Also, the `isbn` field had previously been annotated with _Spring Data's_ `@Id` annotation,
-which identifies the field containing the unique identifier for `Book` instances, and in _Spring Data Geode_,
-the `@Id` annotated field or property is used as the key in the Region when storing the entry.
+with `@LuceneIndexed`. Also, the `isbn` field had previously been annotated with Spring Data's `@Id` annotation,
+which identifies the field containing the unique identifier for `Book` instances, and, in {sdg-name}, the `@Id`
+annotated field or property is used as the key in the Region when storing the entry.
-* `@Id` annotated fields/properties result in the creation of an Apache Geode KEY Index.
-* `@Indexed` annotated fields/properties result in the creation of an Apache Geode HASH Index (default).
-* `@LuceneIndexed` annotated fields/properties result in the creation of an Apache Geode Lucene Index, used in
-text-based searches with Apache Geode's Lucene Integration and support.
+* `@Id` annotated fields or properties result in the creation of an {data-store-name} `KEY` Index.
+* `@Indexed` annotated fields or properties result in the creation of an {data-store-name} `HASH` Index (the default).
+* `@LuceneIndexed` annotated fields or properties result in the creation of an {data-store-name} Lucene Index, used in
+text-based searches with {data-store-name}'s Lucene integration and support.
-When the `@Indexed` annotation is used without setting any attributes, the Index `name`, `expression`, and `fromClause`
-are derived from the field/property of the class on which the `@Indexed` annotation has been added. The `expression`
-is exactly the name of the field or property. The `fromClause` is derived from the `@Region` annotation on
-the domain object's class (or the simple name of the domain object class if the `@Region` annotation was not specified).
+When the `@Indexed` annotation is used without setting any attributes, the index `name`, `expression`, and `fromClause`
+are derived from the field or property of the class on which the `@Indexed` annotation has been added. The `expression`
+is exactly the name of the field or property. The `fromClause` is derived from the `@Region` annotation on
+the domain object's class, or the simple name of the domain object class if the `@Region` annotation was not specified.
-Of course, any of the `@Indexed` annotation attributes may be explicitly set to override the default values
-provided by _Spring Data Geode_.
+Of course, you can explicitly set any of the `@Indexed` annotation attributes to override the default values
+provided by {sdg-name}.
-.Application domain object type modeling a Book using cutomized Indexes
+.Application domain object type modeling a Book with customized indexes
[source, java]
----
@Region("Books")
@@ -1485,14 +1519,14 @@ class Book {
}
----
-The `name` of the Index, which is auto-generated when not explicitly set, is also used as the name of the bean
-registered in the Spring context for the Index. If necessary, this Index bean could even be injected by name
+The `name` of the index, which is auto-generated when not explicitly set, is also used as the name of the bean
+registered in the Spring container for the index. If necessary, this index bean can even be injected by name
into another application component.
-The generated name of the Index follows the pattern: `Idx`.
-For example, the name of the `author` Index would be, "`BooksAuthorHashIdx`".
+The generated name of the index follows this pattern: `Idx`.
+For example, the name of the `author` index would be, `BooksAuthorHashIdx`.
-To enable Indexing, simply annotate the application class with `@EnableIndexing`...
+To enable indexing, annotate the application class with `@EnableIndexing`, as follows:
.Spring application with Indexing enabled
[source, java]
@@ -1505,71 +1539,72 @@ class ServerApplication { .. }
----
NOTE: The `@EnablingIndexing` annotation has no effect unless the `@EnableEntityDefinedRegions` is also declared.
-Essentially, Indexes are defined from fields/properties on the entity class types, and entity classes must be scanned
-in order to inspect the entity's fields and properties for the presence of Index annotations. Without this scan,
-Index annotations would not be found. It is also strongly recommended that you limit the scope of the scan.
+Essentially, indexes are defined from fields or properties on the entity class types, and entity classes must be scanned
+to inspect the entity's fields and properties for the presence of index annotations. Without this scan, index annotations
+cannot be found. We also strongly recommend that you limit the scope of the scan.
-While Lucene queries are not supported on _Spring Data Geode_ _Repositories_ (yet), SDG does provide comprehensive
-https://docs.spring.io/spring-data-gemfire/docs/current/reference/html/#bootstrap:lucene[support] for Apache Geode
-Lucene queries using the familiar Spring _Template_ design pattern.
+While Lucene queries are not (yet) supported on {sdg-name} repositories, SDG does provide comprehensive
+https://docs.spring.io/spring-data-gemfire/docs/current/reference/html/#bootstrap:lucene[support] for {data-store-name}
+Lucene queries by using the familiar Spring template design pattern.
-Finally, we close with a few extra tips to keep in mind when using Indexes:
+Finally, we close this section with a few extra tips to keep in mind when using indexes:
-1. While OQL Indexes are not required to execute OQL Queries, Lucene Indexes are required to execute Lucene,
+* While OQL indexes are not required to execute OQL Queries, Lucene Indexes are required to execute Lucene
text-based searches.
-2. In addition, OQL Indexes are not persisted to disk; they are maintained only in memory. So, when an Apache Geode
-node is restarted, the Index must be rebuilt.
-3. You also need to be aware of the overhead associated in maintaining Indexes, particularly since an Index is stored
-exclusively in memory, and especially when Region entries are updated. Index "maintenance" can be
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/RegionFactory.html#setIndexMaintenanceSynchronous-boolean-[configured]
+* OQL indexes are not persisted to disk. They are only maintained in memory. So, when an {data-store-name}
+node is restarted, the index must be rebuilt.
+* You also need to be aware of the overhead associated in maintaining indexes, particularly since an index is stored
+exclusively in memory and especially when Region entries are updated. Index "maintenance" can be
+{x-data-store-javadoc}/org/apache/geode/cache/RegionFactory.html#setIndexMaintenanceSynchronous-boolean-[configured]
as an asynchronous task.
-Another optimization that may be utilized when re-starting your Spring application where Indexes have to be rebuilt
-is to first define all the Indexes upfront and then create them all at once, which, in _Spring Data Geode_, happens
-when the Spring context is refreshed.
+Another optimization that you can use when restarting your Spring application where indexes have to be rebuilt
+is to first define all the indexes up front and then create them all at once, which, in {sdg-name}, happens
+when the Spring container is refreshed.
-Indexes can be defined upfront then created all at once by setting the `define` attribute on the `@EnableIndexing`
-annotation to `true`.
+You can define indexes up front and then create them all at once by setting the `define` attribute on
+the `@EnableIndexing` annotation to `true`.
-See http://geode.apache.org/docs/guide/12/developing/query_index/create_multiple_indexes.html[Creating Multiple Indexes at Once]
-in Apache Geode's User Guide for more details.
+See {x-data-store-docs}/developing/query_index/create_multiple_indexes.html["`Creating Multiple Indexes at Once`"]
+in {data-store-name}'s User Guide for more details.
-Creating sensible Indexes is an important task since it is possible for an Index to do more harm than good
-if not properly designed.
+Creating sensible indexes is an important task, since it is possible for a poorly designed index
+to do more harm than good.
-See both the `@Indexed` annotation and `@LuceneIndexed` annotation _Javadoc_ for complete list of configuration options.
+See both the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/mapping/annotation/Indexed.html[`@Indexed`] annotation
+and https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/mapping/annotation/LuceneIndexed.html[`@LuceneIndexed`] annotation
+Javadoc for complete list of configuration options.
-More details on Apache Geode OQL Queries can be found
-http://geode.apache.org/docs/guide/12/developing/querying_basics/chapter_overview.html[here].
+More details on {data-store-name} OQL queries can be found
+{x-data-store-docs}/developing/querying_basics/chapter_overview.html[here].
-More details on Apache Geode Indexes can be found
-http://geode.apache.org/docs/guide/12/developing/query_index/query_index.html[here].
+More details on {data-store-name} indexes can be found
+{x-data-store-docs}/developing/query_index/query_index.html[here].
-More details on Apache Geode Lucene Queries can be found
-http://geode.apache.org/docs/guide/12/tools_modules/lucene_integration.html[here].
+More details on {data-store-name} Lucene queries can be found
+{x-data-store-docs}/tools_modules/lucene_integration.html[here].
[[bootstrap-annotation-config-region-continuous-queries]]
=== Configuring Disk Stores
-Regions can be configured to persist data to disk. Regions can also be configured to overflow data to disk when
-Region entries are evicted. In both cases, a `DiskStore` is required to persist or overflow the data. When an
-explicit `DiskStore` has not been set on a Region with persistence or overflow configured, then Apache Geode
-will use the "DEFAULT" `DiskStore`.
+You can configure Regions to persist data to disk. You can also configure Regions to overflow data to disk when
+Region entries are evicted. In both cases, a `DiskStore` is required to persist and/or overflow the data.
+When an explicit `DiskStore` has not been configured for a Region with persistence or overflow, {data-store-name}
+uses the `DEFAULT` `DiskStore`.
-However, it is possible and recommended to define Region-specific `DiskStores` when persisting or overflowing data
-to disk.
+We recommend defining Region-specific `DiskStores` when persisting and/or overflowing data to disk.
-_Spring Data Geode_ provides Annotation support for defining and creating application Region `DiskStores`
+{sdg-name} provides annotation support for defining and creating application Region `DiskStores`
by annotating the application class with the `@EnableDiskStore` and `@EnableDiskStores` annotations.
-TIP: `@EnableDiskStores` is a composite annotation for aggregating 1 or more `@EnableDiskStore` annotations.
+TIP: `@EnableDiskStores` is a composite annotation for aggregating one or more `@EnableDiskStore` annotations.
-For example, while `Book` product information might mostly consist of reference data, from some external data source
-(e.g. Amazon), `Order` data is most likely going to be transactional in nature and something the application is going to
-need to retain, maybe even overflow to disk if the transaction volume is high enough, or so any Book publisher
-and author hopes, anyway.
+For example, while `Book` information might mostly consist of reference data from some external data source
+(such as Amazon), `Order` data is most likely going to be transactional in nature and something the application
+is going to need to retain (and maybe even overflow to disk if the transaction volume is high enough) --
+or so any book publisher and author hopes, anyway.
-Using the `@EnableDiskStore` annotation, I can define and create a `DiskStore` as follows...
+Using the `@EnableDiskStore` annotation, you can define and create a `DiskStore` as follows:
.Spring application defining a `DiskStore`
[source, java]
@@ -1581,20 +1616,19 @@ Using the `@EnableDiskStore` annotation, I can define and create a `DiskStore` a
class ServerApplication { .. }
----
-Again, more than 1 `DiskStore` can be defined using the composite, `@EnableDiskStores` annotation.
+Again, more than one `DiskStore` can be defined by using the composite, `@EnableDiskStores` annotation.
-Like other Annotations in _Spring Data Geode's_ Annotation-based configuration model, both `@EnableDiskStore`
+As with other annotations in {sdg-name}'s annotation-based configuration model, both `@EnableDiskStore`
and `@EnableDiskStores` have many attributes along with associated configuration properties to customize
the `DiskStores` created at runtime.
-Additionally, the `@EnableDiskStores` annotation defines certain, common `DiskStore` attributes that apply to all
+Additionally, the `@EnableDiskStores` annotation defines certain common `DiskStore` attributes that apply to all
`DiskStores` created from `@EnableDiskStore` annotations composed with the `@EnableDiskStores` annotation itself.
-Individual `DiskStore` configuration will override a particular global setting, but the `@EnableDiskStores`
-annotation conveniently defines common configuration attributes applied across all `DiskStores` aggregated by
-the annotation.
+Individual `DiskStore` configuration override a particular global setting, but the `@EnableDiskStores` annotation
+conveniently defines common configuration attributes that apply across all `DiskStores` aggregated by the annotation.
-_Spring Data Geode_ also provides the `DiskStoreConfigurer` callback interface, which can be declared in Java config
-and used instead of configuration properties to customize a `DiskStore` at runtime...
+{sdg-name} also provides the `DiskStoreConfigurer` callback interface, which can be declared in Java configuration
+and used instead of configuration properties to customize a `DiskStore` at runtime, as the following example shows:
.Spring application with custom DiskStore configuration
[source, java]
@@ -1619,40 +1653,38 @@ class ServerApplication {
}
----
-See the `@EnableDiskStore` and `@EnableDiskStores` annotation _Javadoc_ for more details on the available
-attributes as well as associated configuration properties.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableDiskStore.html[`@EnableDiskStore`] and https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableDiskStores.html[`@EnableDiskStores`] annotation
+Javadoc for more details on the available attributes as well as associated configuration properties.
-More details on Apache Geode Region Persistence and Overflow (using Disk Stores) can be found
-http://geode.apache.org/docs/guide/12/developing/storing_data_on_disk/chapter_overview.html[here].
+More details on {data-store-name} Region persistence and overflow (using DiskStores) can be found
+{x-data-store-docs}/developing/storing_data_on_disk/chapter_overview.html[here].
[[bootstrap-annotation-config-continuous-queries]]
== Configuring Continuous Queries
-Another very important and useful feature of Apache Geode is
-http://geode.apache.org/docs/guide/12/developing/continuous_querying/chapter_overview.html[Continuous Querying].
+Another very important and useful feature of {data-store-name} is
+{x-data-store-docs}/developing/continuous_querying/chapter_overview.html[Continuous Queries].
-In a world of Internet-enabled things, events and streams of data are coming in from everywhere. Being able to handle
-and process a large stream of data and react to events in real-time, as they happen, is becoming an increasingly
-important requirement for many applications. One example is self-driving vehicles. Being able to receive, filter,
-transform, analyze and act on data in real-time is a key differentiator and characteristic of real-time enabled
-applications.
+In a world of Internet-enabled things, events and streams of data come from everywhere. Being able to handle
+and process a large stream of data and react to events in real time is an increasingly important requirement
+for many applications. One example is self-driving vehicles. Being able to receive, filter, transform, analyze,
+and act on data in real time is a key differentiator and characteristic of real time applications.
-Fortunately, Apache Geode was ahead of its time in this regard. Using _Continuous Queries_ (CQ), a client application
-can express the data, or events it is interested in and register listeners to handle and process the events as they
-occur. The data that a client application may be interested in is expressed as an OQL query, where the query predicate
-is used to filter, or identify the data of interests. When data is changed or added, and it matches the criteria
-defined in the query predicate of the registered CQ, the client application is notified.
+Fortunately, {data-store-name} was ahead of its time in this regard. By using Continuous Queries (CQ),
+a client application can express the data or events it is interested in and register listeners to handle and process
+the events as they occur. The data that a client application may be interested in is expressed as an OQL query,
+where the query predicate is used to filter or identify the data of interest. When data is changed or added
+and it matches the criteria defined in the query predicate of the registered CQ, the client application is notified.
-_Spring Data Geode_ makes defining and registering CQs along with an associated listener to handle and process CQ
-events without all the cruft of Apache Geode's plumbing, a non-event (no pun intended). SDG's new Annotation-based
-configuration for CQs builds on the existing _Continuous Query_ support in the
-<>.
+{sdg-name} makes it easy to define and register CQs, along with an associated listener to handle and process CQ
+events without all the cruft of {data-store-name}'s plumbing. {sdg-acronym}'s new annotation-based configuration
+for CQs builds on the existing Continuous Query support in the <>.
-For instance, say a Book publisher wants to register interests in and receive notification anytime orders (demand)
-for a `Book` exceeds the current inventory (supply), then the publisher's print application might register
-the following CQ...
+For instance, say a book publisher wants to register interest in and receive notification any time orders (demand)
+for a `Book` exceeds the current inventory (supply). Then the publisher's print application might register
+the following CQ:
-.Spring `ClientCache` application with registered CQ and Listener.
+.Spring `ClientCache` application with registered CQ and listener.
[source, java]
----
@SpringBootApplication
@@ -1672,46 +1704,46 @@ class PublisherPrintApplication {
)
")
void handleSupplyProblem(CqEvent event) {
- // start printing more Books, fast!
+ // start printing more books, fast!
}
}
----
-To enable _Continuous Queries_, simply annotate your application class with `@EnableContinuousQueries`.
+To enable Continuous Queries, annotate your application class with `@EnableContinuousQueries`.
-Defining _Continuous Queries_ is as simple as annotating any Spring `@Component` annotated POJO class methods
-with the `@ContinuousQuery` annotation, in similar fashion to SDG's Function annotated POJO methods. A POJO method
-defined with a CQ using the `@ContinuousQuery` annotation will be called anytime data matching the query predicate
-is added or changed.
+Defining Continuous Queries consists of annotating any Spring `@Component`-annotated POJO class methods
+with the `@ContinuousQuery` annotation (in similar fashion to {sdg-acronym}'s Function-annotated POJO methods).
+A POJO method defined with a CQ by using the `@ContinuousQuery` annotation is called any time data matching
+the query predicate is added or changed.
Additionally, the POJO method signature should adhere to the requirements outlined in the section on
-<>.
+<>.
-See the `@EnableContinuousQueries` and `@ContinuousQuery` annotation _Javadoc_ for more details on
-available attributes and configuration settings.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/config/annotation/EnableContinuousQueries.html[`@EnableContinuousQueries`] and https://docs.spring.io/spring-data/gemfire/docs/current/api/index.html?org/springframework/data/gemfire/config/annotation/EnableContinuousQueries.html[`@ContinuousQuery`] annotation
+Javadoc for more details on available attributes and configuration settings.
-More details on _Spring Data Geode's_ Continuous Query support can be found
+More details on {sdg-name}'s continuous query support can be found
<>.
-More details on Apache Geode's Continuous Queries can be found
-http://geode.apache.org/docs/guide/12/developing/continuous_querying/chapter_overview.html[here].
+More details on {data-store-name}'s Continuous Queries can be found
+{x-data-store-docs}/developing/continuous_querying/chapter_overview.html[here].
[[bootstrap-annotation-config-caching]]
== Configuring Spring's Cache Abstraction
-With _Spring Data Geode_, Apache Geode can be used as a caching provider in Spring's
-https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#cache[Cache Abstraction].
+With {sdg-name}, {data-store-name} can be used as a caching provider in Spring's
+{spring-framework-docs}/integration.html#cache[cache abstraction].
-In _Spring's Cache Abstraction_, the caching annotations (e.g. `@Cacheable`) identify the cache on which a cache lookup
-is performed before invoking a potentially expensive operation, or where the results of an application service method
-are cached after the operation is invoked.
+In Spring's Cache Abstraction, the caching annotations (such as `@Cacheable`) identify the cache on which a cache lookup
+is performed before invoking a potentially expensive operation. The results of an application service method are cached
+after the operation is invoked.
-In _Spring Data Geode_, a Spring `Cache` corresponds directly to a Region. The Region must exist before any
-`@Cacheable` application service methods are called. This is true for any of Spring's caching annotations
-(i.e. `@Cacheable`, `@CachePut` and `@CacheEvict`) that identify the cache to use in the operation.
+In {sdg-name}, a Spring `Cache` corresponds directly to a {data-store-name} Region. The Region must exist before
+any caching annotated application service methods are called. This is true for any of Spring's caching annotations
+(that is, `@Cacheable`, `@CachePut` and `@CacheEvict`) that identify the cache to use in the service operation.
-For instance, our publisher's Point-of-Sale (POS) application might have a feature to determine, or lookup
-the `Price` of a `Book` during a sales transaction.
+For instance, our publisher's Point-of-Sale (PoS) application might have a feature to determine or lookup the `Price`
+of a `Book` during a sales transaction, as the following example shows:
[source, java]
----
@@ -1732,12 +1764,12 @@ class PointOfSaleService
}
----
-To make the application developer's life easier when using _Spring Data Geode_ and Apache Geode with
-_Spring's Cache Abstraction_, 2 new features have been added to the **new** Annotation-based configuration model.
+To make your work easier when you use {sdg-name} with Spring's Cache Abstraction, two new features have been added
+to the annotation-based configuration model.
-Given the following Spring caching configuration...
+Consider the following Spring caching configuration:
-.Enabling Caching using Apache Geode with Spring Data Geode
+.Enabling Caching using {data-store-name} as the caching provider
[source, java]
----
@EnableCaching
@@ -1773,9 +1805,9 @@ class CachingConfiguration {
}
----
-Using _Spring Data Geode's_ new features, the same caching configuration can be simplified to...
+Using {sdg-name}'s new features, you can simplify the same caching configuration to the following:
-.Enabling GemFire Caching
+.Enabling {data-store-name} Caching
[source, java]
----
@EnableGemfireCaching
@@ -1789,80 +1821,82 @@ class CachingConfiguration {
}
----
-First, the `@EnableGemfireCaching` annotation replaces both the Spring `EnableCaching` annotation along with
-the need to declare an explicit `cacheManager` bean definition in the Spring config.
+First, the `@EnableGemfireCaching` annotation replaces both the Spring `@EnableCaching` annotation and the need
+to declare an explicit `CacheManager` bean definition (named "cacheManager") in the Spring config.
Second, the `@EnableCachingDefinedRegions` annotation, like the `@EnableEntityDefinedRegions` annotation described in
-<>, inspects all the Spring application, caching annotated
-service components to identify all the caches that will be needed by the application at runtime and creates Regions
-in Apache Geode for these caches on application startup.
+"`<>`", inspects the entire Spring application, caching
+annotated service components to identify all the caches that are needed by the application at runtime and creates
+Regions in {data-store-name} for these caches on application startup.
-The Region created is local to the application process that created the Region. If the application is a peer `Cache`,
-then the Region will only exist on the application node. If the application is a `ClientCache`, then SDG creates
-a client `PROXY` Region and expects that a Region with the same name already exists on the servers in the cluster.
+The Regions created are local to the application process that created the Regions. If the application is a peer `Cache`,
+the Regions exist only on the application node. If the application is a `ClientCache`, then {sdg-acronym} creates
+client `PROXY` Regions and expects those Regions with the same name to already exist on the servers in the cluster.
-NOTE: SDG cannot determine the cache required by a service method using a Spring `CacheResolver` to resolve the cache
-used in the operation at runtime.
+NOTE: {sdg-acronym} cannot determine the cache required by a service method using a Spring `CacheResolver`
+to resolve the cache used in the operation at runtime.
-TIP: SDG also supports _JCache_, JSR-107 cache annotations on application service components as well.
-Refer to the core https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#cache-jsr-107[_Spring Framework Reference Guide_]
-for the equivalent Spring caching annotation to use in place of _JCache_, JSR-107 caching annotations.
+TIP: {sdg-acronym} also supports JCache (JSR-107) cache annotations on application service components.
+See the core {spring-framework-docs}/integration.html#cache-jsr-107[_Spring Framework Reference Guide_]
+for the equivalent Spring caching annotation to use in place of JCache caching annotations.
-Refer to the section, <> for more details on
-using Apache Geode as a caching provider in _Spring's Cache Abstraction_.
+Refer to the <> section for more details
+on using {data-store-name} as a caching provider in Spring's Cache Abstraction.
-More details on _Spring's Cache Abstraction_ can be found
-https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#cache[here].
+More details on Spring's Cache Abstraction can be found
+{spring-framework-docs}/integration.html#cache[here].
[[bootstrap-annotation-config-cluster]]
== Configuring Cluster Configuration Push
-This may be the most exciting **new** feature in _Spring Data Geode_.
+This may be the most exciting new feature in {sdg-name}.
-When a client application class is annotated with `@EnableClusterConfiguration`, any Regions or Indexes defined
-and declared as beans in the Spring context by the client application are "pushed" to the cluster of servers to
-which the client is connected. Not only that, but this "push" is performed in such a way that Apache Geode will
-remember the configuration pushed by the client, when using HTTP. If all the nodes in the cluster go down, they
-will come back up with the same configuration as before.
+When a client application class is annotated with `@EnableClusterConfiguration`, any Regions or indexes defined
+and declared as beans in the Spring container by the client application are "`pushed`" to the cluster of servers
+to which the client is connected. Not only that, but this "`push`" is performed in such a way that {data-store-name}
+remembers the configuration pushed by the client when using HTTP. If all the nodes in the cluster go down, they
+come back up with the same configuration as before. If a new server is added to the cluster, it will acquire
+identical configuration.
-In a sense, this feature is not much different than if a user were to use _Gfsh_ to create the Regions and Indexes
-on all the servers in the cluster, manually. Except now, with _Spring Data Geode_, users does **not** need to use
-_Gfsh_ to create Regions and Indexes. The user's _Spring Boot_ application, enabled with the power of
-_Spring Data Geode_, already contains all the configuration meta-data needed to create Regions and Indexes
-for the user.
+In a sense, this feature is not much different than if you were to use _Gfsh_ to manually create the Regions and indexes
+on all the servers in the cluster. Except that now, with {sdg-name}, you no longer need to use _Gfsh_ to create Regions
+and indexes. Your Spring Boot application, enabled with the power of {sdg-name}, already contains all the configuration
+metadata needed to create Regions and indexes for you.
-When users are using the _Spring Data Repository_ abstraction, we know all the Regions (e.g. `@Region` annotated
-entity types) and Indexes (e.g. `@Indexed` annotated entity fields and properties) that the users' application
-will need. When users are using _Spring's Cache Abstraction_, we also know all the Regions for all the caches
-identified in the caching annotations needed by the application's service components. Essentially, the user is
-already telling us everything we need to know just by developing her application with the entire _Spring Framework_
-and all of its provided services, infrastructure, etc, whether expressed in Annotation meta-data, Java, XML
-or otherwise, and whether for configuration, for mapping, or whatever purpose.
+When you use the Spring Data Repository abstraction, we know all the Regions (such as those defined by the `@Region` annotated
+entity classes) and indexes (such as those defined by the `@Indexed`-annotated entity fields and properties) that your application
+will need.
-The point is, users can focus on their application business logic along with using the framework provided services
-and supporting infrastructure (e.g. _Spring Data Repositories_, _Spring's Transaction Management_, _Spring Caching_,
-and so on) and _Spring Data Geode_ will take care of all the Apache Geode plumbing required by those framework services
-on the user's behalf.
+When you use Spring's Cache Abstraction, we also know all the Regions for all the caches identified in the caching annotations
+needed by the application's service components.
+
+Essentially, you are already telling us everything we need to know simply by developing your application with the Spring Framework
+by using all of its provided services, infrastructure, and other components, whether expressed in annotation metadata, Java, XML
+or otherwise, and whether for configuration, mapping, or whatever the purpose.
+
+The point is that you can focus on your application's business logic while using the framework's services
+and supporting infrastructure (such as Spring's Cache Abstraction, Spring Data Repositories, Spring's Transaction Management,
+and so on) and {sdg-name} takes care of all the {data-store-name} plumbing required by those framework services
+on the your behalf.
Pushing configuration from the client to the servers in the cluster and having the cluster remember it is made possible
-in part by the use of Apache Geode's http://geode.apache.org/docs/guide/12/configuring/cluster_config/gfsh_persist.html[_Cluster Configuration_]
-service. Apache Geode's _Cluster Configuration_ service is also the same service used by _Gfsh_ to record
-schema-related changes (e.g. `gfsh> create region --name=Example --type=PARTITION`) issued by the user to the cluster
-from the shell.
+in part by the use of {data-store-name}'s {x-data-store-docs}/configuring/cluster_config/gfsh_persist.html[Cluster Configuration]
+service. {data-store-name}'s Cluster Configuration service is also the same service used by _Gfsh_ to record schema-related changes
+(for example, `gfsh> create region --name=Example --type=PARTITION`) issued by the user to the cluster from the shell.
-Of course, since the cluster "remembers" the prior configuration pushed by a client from a previous run, perhaps,
-_Spring Data Geode_ is careful not to stomp on any existing Regions and Indexes already defined in the servers.
-This is especially important when Regions already contain data, for instance.
+Of course, since the cluster may "`remember`" the prior configuration pushed by a client from a previous run,
+{sdg-name} is careful not to stomp on any existing Regions and indexes already defined in the servers.
+This is especially important, for instance, when Regions already contain data.
-NOTE: Currently there is no option to overwrite any existing Region or Index definitions. To recreate a Region
-or Index, the user must use _Gfsh_ to destroy the Region or Index first and then restart the client application
-so that configuration will be pushed up to the server again. Alternatively a user can just use _Gfsh_ to
-(re-)define the Regions and Indexes manually.
+NOTE: Currently, there is no option to overwrite any existing Region or Index definitions. To re-create a Region
+or Index, you must use _Gfsh_ to first destroy the Region or Index and then restart the client application
+so that configuration is pushed up to the server again. Alternatively, you can use _Gfsh_ to (re-)define the Regions
+and indexes manually.
-NOTE: Unlike _Gfsh_, _Spring Data Geode_ only supports the creation of Regions and Indexes on the servers from a client.
-For advanced configuration and use cases, _Gfsh_ should be used to manage the cluster.
+NOTE: Unlike _Gfsh_, {sdg-name} supports the creation of Regions and indexes only on the servers from a client.
+For advanced configuration and use cases, you should use _Gfsh_ to manage the cluster.
-For a moment, just imagine the power expressed in the following configuration...
+Consider the power expressed in the following configuration:
.Spring `ClientCache` application
[source, java]
@@ -1878,77 +1912,79 @@ For a moment, just imagine the power expressed in the following configuration...
class ClientApplication { .. }
----
-An application developer instantly gets a _Spring Boot_, Apache Geode `ClientCache` application using
-_Spring Data Repositories_ with _Spring's Cache Abstraction_, using Apache Geode as the caching provider,
-where Regions and Indexes are not only created on the client, but pushed to the servers in the cluster.
+You instantly get a Spring Boot application with a {data-store-name} `ClientCache` instance, Spring Data Repositories,
+Spring's Cache Abstraction with {data-store-name} as the caching provider (where Regions and indexes
+are not only created on the client but pushed to the servers in the cluster).
-All the application developer need do is define the application's domain model objects annotated with mapping
-and Index annotations, define Repository interfaces supporting basic data access operations and simple queryies
-for each of the entity types, define the service components containing the business logic transacting
-the entities, declare the appropriate annotations on service methods that require caching, transactional
-behavior, etc, and the developer is in business. Nothing the user did in this case pertains to infrastructure
-and plumbing required in the application's back-end services (e.g. Apache Geode). Database users have similar
-features. Now Spring, Apache Geode developers can too!
+From there, you only need to do the following:
-When combined with a couple more _Spring Data Geode_ Annotations...
+* Define the application's domain model objects annotated with mapping and index annotations.
+* Define Repository interfaces to support basic data access operations and simple queries for each of the entity types.
+* Define the service components containing the business logic transacting the entities.
+* Declare the appropriate annotations on service methods that require caching, transactional behavior, and so on.
+
+Nothing in this case pertains to the infrastructure and plumbing required in the application's back-end services
+(such as {data-store-name}). Database users have similar features. Now Spring and {data-store-name} developers can, too.
+
+When combined with the following {sdg-name} annotations, this application really starts to take flight,
+with very little effort:
* `@EnableContinuousQueries`
* `@EnableGemfireFunctionExecutions`
* `@EnableGemfireCacheTransactions`
-Then, this application is really going to start to take flight, with very minimal effort.
-
-See the `@EnableClusterConfiguration` annotation _Javadoc_ for more details.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/index.html?org/springframework/data/gemfire/config/annotation/EnableClusterConfiguration.html[`@EnableClusterConfiguration` annotation
+Javadoc] for more details.
[[bootstrap-annotation-config-security]]
== Configuring Security
-Without a doubt, application _Security_ is extremely important and _Spring Data Geode_ provides comprehensive support
-for securing both Apache Geode clients and servers.
+Without a doubt, application security is extremely important, and {sdg-name} provides comprehensive support
+for securing both {data-store-name} clients and servers.
-Recently, Apache Geode introduced a new http://geode.apache.org/docs/guide/12/managing/security/implementing_security.html[Integrated Security] framework,
-replacing its old Authentication and Authorization Security model, for handling authentication and authorization.
-One of the main features and benefits of this new Security framework is that it integrates with
+Recently, {data-store-name} introduced a new {x-data-store-docs}/managing/security/implementing_security.html[Integrated Security] framework
+(replacing its old authentication and authorization security model) for handling authentication and authorization.
+One of the main features and benefits of this new security framework is that it integrates with
https://shiro.apache.org/[Apache Shiro] and can therefore delegate both authentication and authorization requests
-to Apache Shiro when enforcing security.
+to Apache Shiro to enforce security.
-The following demonstrates how _Spring Data Geode_ can simplify Apache Geode's Security story even further.
+The remainder of this section demonstrates how {sdg-name} can simplify {data-store-name}'s security story even further.
[[bootstrap-annotation-config-security-server]]
=== Configuring Server Security
-There are several different ways in which a user can configure Security for servers in an Apache Geode cluster.
+There are several different ways in which you can configure security for servers in a {data-store-name} cluster.
-1. Implement the Apache Geode `org.apache.geode.security.SecurityManager` interface and set Apache Geode's
-`security-manager` property to refer to your application `SecurityManager` implementation by the FQCN.
-Alternatively, users can construct and initialize an instance of their `SecurityManager` implementation and set it
-with http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CacheFactory.html#setSecurityManager-org.apache.geode.security.SecurityManager-[CacheFactory.setSecurityManager(:SecurityManager)]
-method when creating an instance of an Apache Geode peer `Cache`.
+* Implement the {data-store-name} `org.apache.geode.security.SecurityManager` interface and set {data-store-name}'s
+`security-manager` property to refer to your application `SecurityManager` implementation using the fully qualified
+class name. Alternatively, users can construct and initialize an instance of their `SecurityManager` implementation
+and set it with the {x-data-store-javadoc}/org/apache/geode/cache/CacheFactory.html#setSecurityManager-org.apache.geode.security.SecurityManager[CacheFactory.setSecurityManager(:SecurityManager)]
+method when creating a {data-store-name} peer `Cache`.
-2. Create an Apache Shiro https://shiro.apache.org/configuration.html[`shiro.ini`] file with the _users_, _roles_
-and _permissions_ defined for your application, then set the Apache Geode `security-shiro-init` property to refer
-to this `shiro.ini` file, which must be available in the `CLASSPATH`.
+* Create an Apache Shiro https://shiro.apache.org/configuration.html[`shiro.ini`] file with the users, roles,
+and permissions defined for your application and then set the {data-store-name} `security-shiro-init` property
+to refer to this `shiro.ini` file, which must be available in the `CLASSPATH`.
-3. Using just Apache Shiro, annotate your _Spring Boot_ application class with _Spring Data Geode's_ **new**
-`@EnableSecurity` annotation and define 1 or more Apache Shiro https://shiro.apache.org/realm.html[`Realms`] (as needed)
-as beans in the Spring context for accessing your application's Security meta-data (i.e. _authorized users_, _roles_
-and _permissions_), and your done!
+* Using only Apache Shiro, annotate your Spring Boot application class with {sdg-name}'s new
+`@EnableSecurity` annotation and define one or more Apache Shiro https://shiro.apache.org/realm.html[`Realms`]
+as beans in the Spring container for accessing your application's security metadata (that is, authorized users, roles,
+and permissions).
-The problem with the first approach is that a user must implement his/her own `SecurityManager`, which can be quite
-tedious and error prone. Implementing a custom `SecurityManager` does afford a user some flexibility in accessing
-Security meta-data from whatever data source stores the meta-data, such as LDAP or even a proprietary, internal
-data source, but then that is a problem already solved by configuring and using Apache Shiro `Realms`, which is more
-universally known and non-Apache Geode specific.
+The problem with the first approach is that you must implement your own `SecurityManager`, which can be quite tedious
+and error-prone. Implementing a custom `SecurityManager` offers some flexibility in accessing security metadata from
+whatever data source stores the metadata, such as LDAP or even a proprietary, internal
+data source. However, that problem has already been solved by configuring and using Apache Shiro `Realms`,
+which is more universally known and non-{data-store-name}-specific.
-TIP: See Apache Geode's Security examples for http://geode.apache.org/docs/guide/12/managing/security/authentication_examples.html[Authentication]
-and http://geode.apache.org/docs/guide/12/managing/security/authorization_example.html[Authorization] as 1 possible way
-to implement your own custom, application specific `SecurityManager`. However, this is strongly **not** recommended.
+TIP: See {data-store-name}'s security examples for {x-data-store-docs}/managing/security/authentication_examples.html[Authentication]
+and {x-data-store-docs}/managing/security/authorization_example.html[Authorization] as one possible way
+to implement your own custom, application-specific `SecurityManager`. However, we strongly recommend *against* doing so.
-The second approach using an Apache Shiro INI file is marginally better, but a user still needs to be familiar with
-the INI file format in the first place. Additionally, an INI file is static and not easily updatable at runtime.
+The second approach, using an Apache Shiro INI file, is marginally better, but you still need to be familiar with
+the INI file format in the first place. Additionally, an INI file is static and not easily updatable at runtime.
-The third approach is the most ideal since it adheres to widely known and industry accepted concepts
-(i.e. Apache Shiro's Security framework) and is easy to setup...
+The third approach is the most ideal, since it adheres to widely known and industry-accepted concepts
+(that is, Apache Shiro's Security framework) and is easy to setup, as the following example shows:
.Spring server application using Apache Shiro
[source, java]
@@ -1964,59 +2000,60 @@ class ServerApplication {
PropertiesRealm propertiesRealm = new PropertiesRealm();
propertiesRealm.setResourcePath("classpath:shiro.properties");
- propertiesRealm.setPermissionResolver(new GeodePermissionResolver());
+ propertiesRealm.setPermissionResolver(new GemFirePermissionResolver());
return propertiesRealm;
}
}
----
-TIP: The configured `Realm` shown in the example above could have easily been any of Apache Shiro's supported `Realms`
-out-of-the-box: (https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/activedirectory/package-frame.html[ActiveDirectory],
-https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/jdbc/package-frame.html[JDBC],
-https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/jndi/package-frame.html[JNDI],
-https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/ldap/package-frame.html[LDAP],
-or even a `Realm` supporting the https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/text/IniRealm.html[INI format])
-or perhaps a custom implementation of an Apache Shiro `Realm` implemented by the user. See Apache Shiro's
-https://shiro.apache.org/realm.html[documentation on Realms] for more details.
+TIP: The configured `Realm` shown in the preceding example could easily have been any of Apache Shiro's supported `Realms`:
-When Apache Shiro is on the `CLASSPATH` of the servers in the cluster and 1 or more Apache Shiro `Realms` have been
-defined as beans in the Spring context, _Spring Data Geode_ will detect this configuration and use Apache Shiro
-as the Security provider to secure your Apache Geode servers when the `@EnableSecurity` annotation is used.
+* https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/activedirectory/package-frame.html[ActiveDirectory]
+* https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/jdbc/package-frame.html[JDBC]
+* https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/jndi/package-frame.html[JNDI]
+* https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/ldap/package-frame.html[LDAP]
+* A `Realm` supporting the https://shiro.apache.org/static/1.3.2/apidocs/org/apache/shiro/realm/text/IniRealm.html[INI format].
-TIP: Earlier, information was posted on _Spring Data Geode's_ support for Apache Geode's **new** Integrated Security
+You could even create a custom implementation of an Apache Shiro `Realm`.
+
+See Apache Shiro's https://shiro.apache.org/realm.html[documentation on Realms] for more details.
+
+When Apache Shiro is on the `CLASSPATH` of the servers in the cluster and one or more Apache Shiro `Realms`
+have been defined as beans in the Spring container, {sdg-name} detects this configuration and uses Apache Shiro
+as the security provider to secure your {data-store-name} servers when the `@EnableSecurity` annotation is used.
+
+TIP: You can find more information about {sdg-name}'s support for {data-store-name}'s new integrated security
framework using Apache Shiro in this
-https://spring.io/blog/2016/11/10/spring-data-geode-1-0-0-incubating-release-released[spring.io blob post].
+https://spring.io/blog/2016/11/10/spring-data-geode-1-0-0-incubating-release-released[spring.io blog post].
-See the `@EnableSecurity` annotation _Javadoc_ for more details on available attributes
-and associated configuration properties.
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/index.html?org/springframework/data/gemfire/config/annotation/EnableSecurity.html[`@EnableSecurity`] annotation
+Javadoc for more details on available attributes and associated configuration properties.
-More details on Apache Geode Security can be found
-http://geode.apache.org/docs/guide/12/managing/security/chapter_overview.html[here].
+More details on {data-store-name} security can be found
+{x-data-store-docs}/managing/security/chapter_overview.html[here].
[[bootstrap-annotation-config-security-client]]
=== Configuring Client Security
-The Security story would not be complete without discussing how to secure Spring-based, Apache Geode cache client
-applications.
+The security story would not be complete without discussing how to secure Spring-based, {data-store-name} cache client
+applications as well.
-Apache Geode's process of securing a client application is, well, rather involved. In a nutshell, a user essentially
-needs to...
+{data-store-name}'s process for securing a client application is, honestly, rather involved. In a nutshell, you need to:
-1. Provide an implementation of the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/security/AuthInitialize.html[`org.apache.geode.security.AuthInitialize`] interface.
-2. Set the Apache Geode `security-client-auth-init` (System) property to refer to the custom, application-provided
+. Provide an implementation of the
+{x-data-store-javadoc}/org/apache/geode/security/AuthInitialize.html[`org.apache.geode.security.AuthInitialize`] interface.
+. Set the {data-store-name} `security-client-auth-init` (System) property to refer to the custom, application-provided
`AuthInitialize` interface.
-3. And finally, a user would typically specify the user credentials in a proprietary, Apache Geode
-`gfsecurity.properties` file.
+. Specify the user credentials in a proprietary, {data-store-name} `gfsecurity.properties` file.
-_Spring Data Geode_ simplifies all of that using the same `@EnableSecurity` annotation as applied to
-server applications. In other words, the same `@EnableSecurity` annotation handles Security for both client
-and server applications. This makes it easier for users when they decide to switch their applications from
-an embedded peer `Cache` application to a `ClientCache` application, for instance. Simply change the SDG annotation
-from `@PeerCacheApplication` or `@CacheServerApplication` to `@ClientCacheApplication` and you are done.
+{sdg-name} simplifies all of those steps by using the same `@EnableSecurity` annotation that was used in the server
+applications. In other words, the same `@EnableSecurity` annotation handles security for both client and server
+applications. This feature makes it easier for users when they decide to switch their applications from an embedded,
+ peer `Cache` application to a `ClientCache` application, for instance. Simply change the {sdg-acronym} annotation
+from `@PeerCacheApplication` or `@CacheServerApplication` to `@ClientCacheApplication`, and you are done.
-Effectively, all a user need do on the client is...
+Effectively, all you need to do on the client is the following:
.Spring client application using `@EnableSecurity`
[source, java]
@@ -2027,8 +2064,8 @@ Effectively, all a user need do on the client is...
class ClientApplication { .. }
----
-Then define the familiar _Spring Boot_ `application.properties` file containing the required _username_ and _password_
-Security properties and you are all set.
+Then you can define the familiar Spring Boot `application.properties` file containing the required username and password,
+as the following example shows, and you are all set:
.Spring Boot `application.properties` file with the required Security credentials
[source, java]
@@ -2037,34 +2074,35 @@ spring.data.gemfire.security.username=jackBlack
spring.data.gemfire.security.password=b@cK!nB1@cK
----
-That was easy!
+TIP: By default, Spring Boot can find your `application.properties` file when it is placed in the root of
+the application's `CLASSPATH`. Of course, Spring supports many ways to locate resources by using its
+{spring-framework-docs}/core.html#resources[Resource abstraction].
-TIP: By default, _Spring Boot_ can find an `application.properties` file when placed in the root of
-the application's `CLASSPATH`. Of course, Spring supports may ways to locate resources using its
-https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#resources[Resource abstraction].
+See the https://docs.spring.io/spring-data/gemfire/docs/current/api/index.html?org/springframework/data/gemfire/config/annotation/EnableSecurity.html[`@EnableSecurity`] annotation
+Javadoc for more details on available attributes and associated configuration properties.
-See the `@EnableSecurity` annotation _Javadoc_ for more details on available attributes
-and associated configuration properties.
-
-More details on Apache Geode Security can be found
-http://geode.apache.org/docs/guide/12/managing/security/chapter_overview.html[here].
+More details on {data-store-name} Security can be found
+{x-data-store-docs}/managing/security/chapter_overview.html[here].
[[bootstrap-annotation-config-tips]]
== Configuration Tips
-The following tips will help users get the most out of using the **new** Annotation-based configuration model.
+The following tips can help you get the most out of using the new annotation-based configuration model:
+
+* <>
+* <>
[[bootstrap-annotation-config-tips-organization]]
-== Configuration Organization
+=== Configuration Organization
-As we saw in the section on <>, when
-many Apache Geode and/or _Spring Data Geode_ features are enabled using Annotations, we start to stack a lot of
-Annotations on the Spring `@Configuration` or `@SpringBootApplication` class. In this situation, it makes sense
+As we saw in the section on <>,
+when many {data-store-name} or {sdg-name} features are enabled by using annotations, we begin to stack a lot of
+annotations on the Spring `@Configuration` or `@SpringBootApplication` class. In this situation, it makes sense
to start compartmentalizing the configuration a bit.
-For instance, given...
+For instance, consider the following declaration:
-.Spring `ClientCache` application with the kitcken sink to boot
+.Spring `ClientCache` application with the kitchen sink
[source, java]
----
@SpringBootApplication
@@ -2081,13 +2119,13 @@ For instance, given...
class ClientApplication { .. }
----
-We could break this configuration down by concern. For example...
+We could break this configuration down by concern, as follows:
.Spring `ClientCache` application with the kitcken sink to boot
[source, java]
----
@SpringBootApplication
-@Import({ GeodeConfiguration.class, CachingConfiguration.class,
+@Import({ GemFireConfiguration.class, CachingConfiguration.class,
FunctionsConfiguration.class, QueriesConfiguration.class,
RepositoriesConfiguration.class })
class ClientApplication { .. }
@@ -2095,7 +2133,7 @@ class ClientApplication { .. }
@ClientCacheApplication
@EnableClusterConfiguration
@EnableGemfireCacheTransactions
-class GeodeConfiguration { .. }
+class GemFireConfiguration { .. }
@EnableGemfireCaching
@EnableCachingDefinedRegions
@@ -2119,66 +2157,65 @@ class QueriesConfiguration {
class RepositoriesConfiguration { .. }
----
-Spring does not care. Organize your application configuration as you see fit.
+While it does not matter to the Spring Framework, we generally recommend aiming for readability, for the sake of
+the next person who has to maintain the code (which might be you at some point in the future).
[[bootstrap-annotation-config-tips-undocumented-annotations]]
-== Additional Configuration-based Annotations
+=== Additional Configuration-based Annotations
-_SDG Annotations you never heard of..._
+The following SDG Annotations were not discussed in this reference documentation, either because the annotation supports
+a deprecated feature of {data-store-name} or because there are better, alternative ways to accomplishing
+the function that the annotation provides:
-The following SDG Annotations were not discussed in this reference documentation either because the Annotation supports
-a deprecated feature of Apache Geode, or there are better, alternative ways to accomplishing the function that
-the Annotation provides.
-
-* `@EnableAuth` - enable Apache Geode's old Authentication/Authorization Security model. (_Deprecated_;
-use Apache Geode's new _Integrated Security_ framework discussed <>).
-Again, Apache Geode's new _Integrated Security_ framework can be enabled on both clients and servers using SDG's
-`@EnableSecurity` annotation as described in <>.
-* `@EnableAutoRegionLookup` - Not recommended. Essentially, this Annotation supports finding Regions defined in
-external configuration meta-data (e.g. `cache.xml`, or _Cluster Configuration_ when applied to a server) and registers
-those Regions as beans in the Spring context automatically. Users should generally prefer Spring config when
-using Spring and _Spring Data Geode_. See <>
-and <> instead.
-* `@EnableBeanFactoryLocator` - enables the SDG `GemfireBeanFactoryLocator` feature, which is only useful, again,
-when using external configuration meta-data (e.g. `cache.xml`). For example, if a user defines a `CacheLoader` on
-a Region defined in `cache.xml`, the user can still auto-wire this `CacheLoader` with say, a relational database
-`DataSource` bean defined in Spring config. This Annotation takes advantage of this SDG <>
-and might be useful for users who have a large amount of legacy configuration meta-data, like `cache.xml` files.
-* `@EnableGemFireAsLastResource` - is actually discussed in
-<> with Apache Geode.
-* `@EnableMcast` - enables Apache Geode's old peer discovery mechanism using UDP-based Multi-cast Networking.
-(_Deprecated_; users should be using Apache Geode Locators instead; see
-<>.
-* `@EnableRegionDataAccessTracing` - is useful for debugging purposes; the Annotation enables tracing for all
-data access operations performed on a Region by registering an AOP Aspect that proxies all Regions declared
-as beans in the Spring context, intercepting the Region op and logging the event.
+* `@EnableAuth`: Enables {data-store-name}'s old authentication and authorization security model. (Deprecated.
+{data-store-name}'s new integrated security framework can be enabled on both clients and servers by using {sdg-acronym}'s
+`@EnableSecurity` annotation, as described in "`<>`".)
+* `@EnableAutoRegionLookup`: Not recommended. Essentially, this annotation supports finding Regions defined in external
+configuration metadata (such as `cache.xml` or Cluster Configuration when applied to a server) and automatically
+registers those Regions as beans in the Spring container. Users should generally prefer Spring configuration when
+using Spring and {sdg-name}. See "`<>`" and "`<>`"
+instead.
+* `@EnableBeanFactoryLocator`: Enables the {sdg-acronym} `GemfireBeanFactoryLocator` feature, which is only useful
+when using external configuration metadata (for example, `cache.xml`). For example, if you define a `CacheLoader` on
+a Region defined in `cache.xml`, you can still autowire this `CacheLoader` with, say, a relational database
+`DataSource` bean defined in Spring configuration. This annotation takes advantage of this {sdg-acronym}
+<> and might be useful if you have a large amount of legacy configuration metadata,
+such as `cache.xml` files.
+* `@EnableGemFireAsLastResource`: Discussed in <>
+with {data-store-name}.
+* `@EnableMcast`: Enables {data-store-name}'s old peer discovery mechanism that uses UDP-based multi-cast networking.
+(_Deprecated_. Use {data-store-name} Locators instead. See "`<>`".
+* `@EnableRegionDataAccessTracing`: Useful for debugging purposes. This annotation enables tracing for all data access
+operations performed on a Region by registering an AOP Aspect that proxies all Regions declared as beans
+in the Spring container, intercepting the Region operation and logging the event.
[[bootstrap-annotation-config-conclusion]]
== Conclusion
-As we learned in the previous sections, there is a tremendous amount of power provided by _Spring Data Geode_'s
-**new** Annotation-based configuration model. Hopefully, it lives up to its goal of making it easier for users
-to get started quickly when using Apache Geode with Spring.
+As we learned in the previous sections, {sdg-name}'s new annotation-based configuration model provides a tremendous
+amount of power. Hopefully, it lives up to its goal of making it easier for you to get started quickly and easily
+when using {data-store-name} with Spring.
-Keep in mind when using the new Annotations that it does not preclude you, the application developer, from using
-Java config, or even XML, if you prefer. You can even combine all 3 approaches by using Spring's
-https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/Import.html[`@Import`]
-and https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/ImportResource.html[`@ImportResource`]
-annotations on a Spring `@Configuration` or `@SpringBootApplication` class, if you like. The moment you explicitly
-provide a bean definition that would otherwise be provided by _Spring Data Geode_ using an Annotation,
-the Annotation-based configuration backs away.
+Keep in mind that, when you use the new annotations, you can still use Java configuration or XML configuration.
+You can even combine all three approaches by using Spring's {spring-framework-javadoc}/org/springframework/context/annotation/Import.html[`@Import`]
+and {spring-framework-javadoc}/org/springframework/context/annotation/ImportResource.html[`@ImportResource`]
+annotations on a Spring `@Configuration` or `@SpringBootApplication` class. The moment you explicitly provide a bean definition
+that would otherwise be provided by {sdg-name} by using an annotation, the annotation-based configuration backs away.
-In certain cases you may even need to fallback to Java config, as in the `Configurers` case, to handle more complex
-or conditional configuration logic that is not easily expressed in or cannot be accomplished using Annotations.
-Do not be alarmed; this is to be expected.
+[NOTE]
+====
+In certain cases, you may even need to fall back to Java configuration, as in the `Configurers` case, to handle
+more complex or conditional configuration logic that is not easily expressed in or cannot be accomplished by
+using annotations alone. Do not be alarmed. This behavior is to be expected.
-For example, another case where Java config or XML will be needed is when configuring Apache Geode WAN components,
-which currently do not have any Annotation configuration support. However, defining and registering WAN components
-is as simple as using the `org.springframework.data.gemfire.wan.GatewayReceiverFactoryBean`
-and `org.springframework.data.gemfire.wan.GatewaySenderFactoryBean` API classes in Java configuration of your Spring
+For example, another case where you need Java or XML configuration is when configuring {data-store-name} WAN components,
+which currently do not have any annotation configuration support. However, defining and registering WAN components
+requires only using the `org.springframework.data.gemfire.wan.GatewayReceiverFactoryBean`
+and `org.springframework.data.gemfire.wan.GatewaySenderFactoryBean` API classes in the Java configuration of your Spring
`@Configuration` or `@SpringBootApplication` classes (recommended).
+====
-The Annotations were not meant to handle every situation; the Annotations were meant to help application developers
-**get up and running** as **quickly** and as **easily** as possible, especially during development.
+The annotations were not meant to handle every situation. The annotations were meant to help you _get up and running_
+as _quickly_ and as _easily_ as possible, especially during development.
We hope you will enjoy these new capabilities!
diff --git a/src/main/asciidoc/reference/bootstrap.adoc b/src/main/asciidoc/reference/bootstrap.adoc
index 278aa4a9..29639704 100644
--- a/src/main/asciidoc/reference/bootstrap.adoc
+++ b/src/main/asciidoc/reference/bootstrap.adoc
@@ -1,58 +1,67 @@
[[bootstrap]]
-= Bootstrapping Apache Geode with the Spring container
+= Bootstrapping {data-store-name} with the Spring container
-_Spring Data Geode_ provides full configuration and initialization of the Apache Geode In-Memory Data Grid (IMDG)
-using the _Spring_ IoC container. The framework includes several classes to help simplify the configuration of
-Apache Geode components including: Caches, Regions, Indexes, DiskStores, Functions, WAN Gateways, persistence backup
-along with several other Distributed System components in order to support a variety of use cases with minimal effort.
+{sdg-name} provides full configuration and initialization of the {data-store-name} In-Memory Data Grid (IMDG)
+using the Spring IoC container. The framework includes several classes to help simplify the configuration of
+{data-store-name} components, including: Caches, Regions, Indexes, DiskStores, Functions, WAN Gateways,
+persistence backup, and several other Distributed System components to support a variety of application use cases
+with minimal effort.
-NOTE: This section assumes basic familiarity with Apache Geode. For more information,
-see the Apache Geode http://geode.apache.org/docs/[product documentation].
+NOTE: This section assumes basic familiarity with {data-store-name}. For more information, see the {data-store-name}
+{x-data-store-docs}/gemfire/about_gemfire.html[product documentation].
[[bootstrap:namespace:xml]]
-== Advantages of using Spring over Apache Geode `cache.xml`
+== Advantages of using Spring over {data-store-name} `cache.xml`
-_Spring Data Geode's_ XML namespace supports full configuration of the Apache Geode In-Memory Data Grid (IMDG).
-The XML namespace is the preferred way to configure Apache Geode in a _Spring_ context in order to properly
-manage Geode's lifecycle inside the _Spring_ container. While support for Geode's native `cache.xml` persists
-for legacy reasons, Geode application developers are encouraged to do everything in _Spring_ XML to take advantage of
-the many wonderful things _Spring_ has to offer such as modular XML configuration, property placeholders and overrides,
-SpEL, and environment profiles. Behind the XML namespace, _Spring Data Geode_ makes extensive use of _Spring's_
-`FactoryBean` pattern to simplify the creation, configuration and initialization of Geode components.
+{sdg-name}'s XML namespace supports full configuration of the {data-store-name} In-Memory Data Grid (IMDG).
+The XML namespace is one of two ways to configure {data-store-name} in a Spring context in order to properly manage
+{data-store-name}'s lifecycle inside the Spring container. The other way to configure {data-store-name} in a Spring
+context is by using <>.
-Apache Geode provides several callback interfaces, such as `CacheListener`, `CacheLoader` and `CacheWriter`,
-that allow developers to add custom event handlers. Using _Spring's_ IoC container, these callbacks may be configured
-as normal _Spring_ beans and injected into Geode components. This is a significant improvement over native `cache.xml`,
-which provides relatively limited configuration options and requires callbacks to implement Geode's `Declarable`
-interface (see <> to see how you can still use `Declarables` within _Spring's_ IoC/DI container).
+While support for {data-store-name}'s native `cache.xml` persists for legacy reasons, {data-store-name} application developers
+who use XML configuration are encouraged to do everything in Spring XML to take advantage of the many wonderful things
+Spring has to offer, such as modular XML configuration, property placeholders and overrides,
+SpEL ({spring-framework-docs}/core.html#expressions[Spring Expression Language]), and environment profiles.
+Behind the XML namespace, {sdg-name} makes extensive use of Spring's `FactoryBean` pattern to simplify the creation,
+configuration, and initialization of {data-store-name} components.
-In addition, IDEs, such as the _Spring Tool Suite_ (STS), provide excellent support for _Spring_ XML namespaces
-including code completion, pop-up annotations, and real time validation, making them easy to use.
+{data-store-name} provides several callback interfaces, such as `CacheListener`, `CacheLoader`, and `CacheWriter`,
+that let developers add custom event handlers. Using Spring's IoC container, you can configure these callbacks
+as normal Spring beans and inject them into {data-store-name} components. This is a significant improvement over
+native `cache.xml`, which provides relatively limited configuration options and requires callbacks to implement
+{data-store-name}'s `Declarable` interface (see <> to see how you can still use `Declarables`
+within Spring's container).
+
+In addition, IDEs, such as the Spring Tool Suite (STS), provide excellent support for Spring XML namespaces,
+including code completion, pop-up annotations, and real time validation.
[[bootstrap:namespace]]
== Using the Core Namespace
-To simplify configuration, _Spring Data Geode_ provides a dedicated XML namespace for configuring core Apache Geode
-components. It is possible to configure beans directly using _Spring's_ standard `` definition. However,
-all bean properties are exposed via the XML namespace so there is little benefit to using raw bean definitions.
-For more information about XML Schema-based configuration in _Spring_, see the
-http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#xsd-config[appendix]
-in the _Spring Framework_ reference documentation.
+To simplify configuration, {sdg-name} provides a dedicated XML namespace for configuring core {data-store-name}
+components. It is possible to configure beans directly by using Spring's standard `` definition. However,
+all bean properties are exposed through the XML namespace, so there is little benefit to using raw bean definitions.
-NOTE: _Spring Data Repository_ support uses a separate XML namespace. See <> for more information
-on how to configure _Spring Data Geode_ Repositories.
+NOTE: For more information about XML Schema-based configuration in Spring, see the
+{spring-framework-docs}/core.html#appendix[appendix] in the Spring Framework reference documentation.
-To use the _Spring Data Geode_ XML namespace, simply declare it in your _Spring_ XML configuration meta-data:
+NOTE: Spring Data Repository support uses a separate XML namespace. See <> for more information
+on how to configure {sdg-name} Repositories.
+
+To use the {sdg-name} XML namespace, declare it in your Spring XML configuration meta-data,
+as the following example shows:
[source,xml]
+[subs="verbatim,attributes"]
----
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
+ xmlns:gfe="{spring-data-schema-namespace}"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/geode http://www.springframework.org/schema/gemfire/spring-geode.xsd">
+ {spring-data-schema-namespace} {spring-data-schema-location}
+">
@@ -60,28 +69,29 @@ To use the _Spring Data Geode_ XML namespace, simply declare it in your _Spring_
----
-<1> _Spring Data Geode_ XML namespace prefix. Any name will do but through out this reference documentation,
-`gfe` will be used.
+<1> {sdg-name} XML namespace prefix. Any name works, but, throughout this reference documentation, `gfe` is used.
<2> The XML namespace prefix is mapped to the URI.
-<3> The XML namespace URI location. Note that even though the location points to an external address (which does exist
-and is valid), _Spring_ will resolve the schema locally as it is included in the _Spring Data Geode_ library.
+<3> The XML namespace URI location. Note that, even though the location points to an external address (which does exist
+and is valid), Spring resolves the schema locally, as it is included in the {sdg-name} library.
<4> Example declaration using the XML namespace with the `gfe` prefix.
[NOTE]
====
-It is possible to change the default namespace from `beans` to `gfe`. This is useful for XML configuration
-composed mainly of Geode components as it avoids declaring the prefix. To achieve this, simply swap the namespace
-prefix declaration above:
+You can change the default namespace from `beans` to `gfe`. This is useful for XML configuration composed mainly of
+{data-store-name} components, as it avoids declaring the prefix. To do so, swap the namespace prefix declaration
+shown earlier, as the following example shows:
[source,xml]
+[subs="verbatim,attributes"]
----
-
- xmlns:beans="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
+
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/geode http://www.springframework.org/schema/gemfire/spring-geode.xsd">
+ {spring-data-schema-namespace} {spring-data-schema-location}
+">
@@ -89,21 +99,17 @@ prefix declaration above:
----
-<1> The default namespace declaration for this XML document points to the _Spring Data Geode_ XML namespace.
-<2> The `beans` namespace prefix declaration for _Spring's_ raw bean definitions.
+<1> The default namespace declaration for this XML document points to the {sdg-name} XML namespace.
+<2> The `beans` namespace prefix declaration for Spring's raw bean definitions.
<3> Bean declaration using the `beans` namespace. Notice the prefix.
<4> Bean declaration using the `gfe` namespace. Notice the lack of prefix since `gfe` is the default namespace.
====
-:leveloffset: +1
-
-include::{basedocdir}/reference/data-access.adoc[]
-include::{basedocdir}/reference/cache.adoc[]
-include::{basedocdir}/reference/region.adoc[]
-include::{basedocdir}/reference/indexing.adoc[]
-include::{basedocdir}/reference/diskstore.adoc[]
-include::{basedocdir}/reference/snapshot.adoc[]
-include::{basedocdir}/reference/function.adoc[]
-include::{basedocdir}/reference/gateway.adoc[]
-
-:leveloffset: -1
+include::{basedocdir}/reference/data-access.adoc[leveloffset=+1]
+include::{basedocdir}/reference/cache.adoc[leveloffset=+1]
+include::{basedocdir}/reference/region.adoc[leveloffset=+1]
+include::{basedocdir}/reference/indexing.adoc[leveloffset=+1]
+include::{basedocdir}/reference/diskstore.adoc[leveloffset=+1]
+include::{basedocdir}/reference/snapshot.adoc[leveloffset=+1]
+include::{basedocdir}/reference/function.adoc[leveloffset=+1]
+include::{basedocdir}/reference/gateway.adoc[v]
diff --git a/src/main/asciidoc/reference/cache.adoc b/src/main/asciidoc/reference/cache.adoc
index bbe32801..29b1335a 100644
--- a/src/main/asciidoc/reference/cache.adoc
+++ b/src/main/asciidoc/reference/cache.adoc
@@ -1,72 +1,74 @@
[[bootstrap:cache]]
= Configuring a Cache
-To use Apache Geode, a developer needs to either create a new `Cache` or connect to an existing one.
-With the current version of Geode, there can be only one open Cache per VM (technically, per `ClassLoader`).
-In most cases, the `Cache` should only be created once.
+To use {data-store-name}, you need to either create a new cache or connect to an existing one. With the current version
+of {data-store-name}, you can have only one open cache per VM (more strictly speaking, per `ClassLoader`). In most cases,
+the cache should only be created once.
-NOTE: This section describes the creation and configuration of a peer cache member, appropriate in
-peer-to-peer (P2P) topologies and cache servers. A cache member can also be used in standalone applications
-and integration tests. However, in most typical production systems, most application processes will act as
-cache clients, creating a `ClientCache` instance instead. This is described in the sections <>
-and <>.
+NOTE: This section describes the creation and configuration of a peer `Cache` member, appropriate in peer-to-peer (P2P)
+topologies and cache servers. A `Cache` member can also be used in stand-alone applications and integration tests.
+However, in typical production systems, most application processes act as cache clients, creating a `ClientCache`
+instance instead. This is described in the <> and <> sections.
-A peer cache with default configuration can be created with a very simple declaration:
+A peer `Cache` with default configuration can be created with the following simple declaration:
[source,xml]
----
----
-During Spring container initialization, any application context containing this cache definition will register
-a `CacheFactoryBean` that creates a Spring bean named `gemfireCache` referencing a Geode `Cache` instance.
-This bean will refer to either an existing cache, or if one does not already exist, a newly created one. Since no
-additional properties were specified, a newly created cache will apply the default cache configuration.
+During Spring container initialization, any `ApplicationContext` containing this cache definition registers a
+`CacheFactoryBean` that creates a Spring bean named `gemfireCache`, which references a {data-store-name} `Cache` instance.
+This bean refers to either an existing `Cache` or, if one does not already exist, a newly created one. Since no
+additional properties were specified, a newly created `Cache` applies the default cache configuration.
-All _Spring Data Geode_ components that depend on the cache respect this naming convention, so there is no need
-to explicitly declare the cache dependency. If you prefer, you can make the dependency explicit via the `cache-ref`
-attribute provided by various SDG XML namespace elements. Also, you can easily override the cache's bean name using
-the `id` attribute:
+All {sdg-name} components that depend on the `Cache` respect this naming convention, so you need not explicitly declare
+the `Cache` dependency. If you prefer, you can make the dependency explicit by using the `cache-ref` attribute provided
+by various {sdg-acronym} XML namespace elements. Also, you can override the cache's bean name using the `id` attribute,
+as follows:
[source,xml]
----
----
-A Geode `Cache` can be fully configured using Spring, however, Geode's native XML configuration file, `cache.xml`,
-is also supported. For situations where the Geode cache needs to be configured natively, simply provide a reference
-to the Geode XML configuration file using the `cache-xml-location` attribute:
+A {data-store-name} `Cache` can be fully configured using Spring. However, {data-store-name}'s native XML configuration
+file, `cache.xml`, is also supported. For situations where the {data-store-name} cache needs to be configured natively,
+you can provide a reference to the {data-store-name} XML configuration file by using the `cache-xml-location` attribute,
+as follows:
[source,xml]
----
-
+
----
-In this example, if a cache needs to be created, it will use a file named `cache.xml` located in the classpath root
+In this example, if a cache needs to be created, it uses a file named `cache.xml` located in the classpath root
to configure it.
NOTE: The configuration makes use of Spring's http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#resources[`Resource`]
-abstraction to locate the file. This allows various search patterns to be used, depending on the runtime environment
+abstraction to locate the file. The `Resource` abstraction lets various search patterns be used, depending on the runtime environment
or the prefix specified (if any) in the resource location.
-In addition to referencing an external XML configuration file, a developer may also specify Geode System
-http://geode.apache.org/docs/guide/11/reference/topics/gemfire_properties.html[properties]
-using any of Spring's `Properties` support features.
+In addition to referencing an external XML configuration file, you can also specify {data-store-name} System
+{x-data-store-docs}/reference/topics/gemfire_properties.html[properties] that use any of Spring's `Properties`
+support features.
-For example, the developer may use the `properties` element defined in the `util` namespace to define `Properties`
-directly or load properties from a properties file:
+For example, you can use the `properties` element defined in the `util` namespace to define `Properties` directly
+or load properties from a properties file, as follows:
[source,xml]
+[subs="verbatim,attributes"]
----
+ {spring-data-schema-namespace} {spring-data-schema-location}
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
+">
@@ -75,17 +77,17 @@ directly or load properties from a properties file:
----
-Using a properties file is recommended for externalizing environment specific settings outside
-the application configuration.
+Using a properties file is recommended for externalizing environment-specific settings
+outside the application configuration.
-NOTE: Cache settings apply only if a new cache needs to be created. If an open cache already exists in the VM,
+NOTE: Cache settings apply only when a new cache needs to be created. If an open cache already exists in the VM,
these settings are ignored.
[[bootstrap:cache:advanced]]
== Advanced Cache Configuration
For advanced cache configuration, the `cache` element provides a number of configuration options exposed as attributes
-or child elements:
+or child elements, as the following listing shows:
[source,xml]
----
@@ -114,7 +116,7 @@ or child elements:
-
+
@@ -126,145 +128,148 @@ or child elements:
----
-<1> Various cache options are supported by attributes. For further information regarding anything shown in this example,
-please consult the Geode http://geode.apache.org/docs/[product documentation].
+<1> Attributes support various cache options. For further information regarding anything shown in this example,
+see the {data-store-name} http://docs.pivotal.io/gemfire[product documentation].
The `close` attribute determines whether the cache should be closed when the Spring application context is closed.
-The default is `true`, however, for use cases in which multiple application contexts use the cache
+The default is `true`. However, for use cases in which multiple application contexts use the cache
(common in web applications), set this value to `false`.
-<2> Setting the `enable-auto-reconnect` attribute to true (default is false), allows a disconnected Geode member to
-automatically reconnect and rejoin the Geode cluster.
-See the Geode http://geode.apache.org/docs/guide/11/managing/autoreconnect/member-reconnect.html[product documentation]
+<2> Setting the `enable-auto-reconnect` attribute to `true` (the default is `false`) lets a disconnected {data-store-name} member
+automatically reconnect and rejoin the {data-store-name} cluster.
+See the {data-store-name} {x-data-store-docs}/managing/autoreconnect/member-reconnect.html[product documentation]
for more details.
-<3> Setting the `use-bean-factory-locator` attribute to `true` (defaults to `false`) is only applicable when both
-Spring (XML) configuration meta-data and Geode `cache.xml` is used to configure the Geode cache node
-(whether client or peer). This option allows Geode components (e.g. `CacheLoader`) expressed in `cache.xml`
-to be auto-wired with beans (e.g. `DataSource`) defined in the Spring application context. This option is typically
+<3> Setting the `use-bean-factory-locator` attribute to `true` (it defaults to `false`) applies only when both
+Spring (XML) configuration metadata and {data-store-name} `cache.xml` is used to configure the {data-store-name} cache node
+(whether client or peer). This option lets {data-store-name} components (such as `CacheLoader`) expressed in `cache.xml`
+be auto-wired with beans (such as `DataSource`) defined in the Spring application context. This option is typically
used in conjunction with `cache-xml-location`.
-<4> Setting the `use-cluster-configuration` attribute to `true` (default is `false`) enables a Geode member to
+<4> Setting the `use-cluster-configuration` attribute to `true` (the default is `false`) enables a {data-store-name} member to
retrieve the common, shared Cluster-based configuration from a Locator.
-See the Geode http://geode.apache.org/docs/guide/11/configuring/cluster_config/gfsh_persist.html[product documentation]
+See the {data-store-name} {x-data-store-docs}/configuring/cluster_config/gfsh_persist.html[product documentation]
for more details.
-<5> Example of a `TransactionListener` callback declaration using a bean reference. The referenced bean must implement
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/TransactionListener.html[TransactionListener].
-A `TransactionListener` can be implemented to handle transaction related events (e.g. afterCommit, afterRollback).
+<5> Example of a `TransactionListener` callback declaration that uses a bean reference. The referenced bean must implement
+{x-data-store-javadoc}/org/apache/geode/cache/TransactionListener.html[TransactionListener].
+A `TransactionListener` can be implemented to handle transaction related events (such as afterCommit and afterRollback).
<6> Example of a `TransactionWriter` callback declaration using an inner bean declaration. The bean must implement
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/TransactionWriter.html[TransactionWriter].
-The `TransactionWriter` is a callback that is allowed to veto a transaction.
+{x-data-store-javadoc}/org/apache/geode/cache/TransactionWriter.html[TransactionWriter].
+The `TransactionWriter` is a callback that can veto a transaction.
<7> Example of a `GatewayConflictResolver` callback declaration using a bean reference. The referenced bean
-must implement http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/util/GatewayConflictResolver.html
+must implement {x-data-store-javadoc}/org/apache/geode/cache/util/GatewayConflictResolver.html
[GatewayConflictResolver].
-A `GatewayConflictResolver` is a Cache-level plugin that is called upon to decide what to do with events that originate
-in other systems and arrive through the WAN Gateway.
-<8> Enable Geode's http://geode.apache.org/docs/guide/11/developing/region_options/dynamic_region_creation.html[DynamicRegionFactory],
+A `GatewayConflictResolver` is a `Cache`-level plugin that is called upon to decide what to do with events
+that originate in other systems and arrive through the WAN Gateway.
+<8> Enables {data-store-name}'s {x-data-store-docs}/developing/region_options/dynamic_region_creation.html[DynamicRegionFactory],
which provides a distributed Region creation service.
-<9> Declares a JNDI binding to enlist an external DataSource in a Geode transaction.
+<9> Declares a JNDI binding to enlist an external DataSource in a {data-store-name} transaction.
[[bootstrap:cache:pdx-serialization]]
=== Enabling PDX Serialization
-The example above includes a number of attributes related to Geode's enhanced serialization framework, PDX.
+The preceding example includes a number of attributes related to {data-store-name}'s enhanced serialization framework, PDX.
While a complete discussion of PDX is beyond the scope of this reference guide, it is important to note that PDX
-is enabled by registering a `PdxSerializer` which is specified via the `pdx-serializer` attribute. Geode provides
-an implementing class `org.apache.geode.pdx.ReflectionBasedAutoSerializer` that uses Java Reflection, however, it is
-common for developers to provide their own implementation. The value of the attribute is simply a reference to
-a Spring bean that implements the `PdxSerializer` interface.
+is enabled by registering a `PdxSerializer`, which is specified by setting the `pdx-serializer` attribute.
-More information on serialization support can be found in <>
+{data-store-name} provides an implementing class (`org.apache.geode.pdx.ReflectionBasedAutoSerializer`) that uses
+Java Reflection. However, it is common for developers to provide their own implementation. The value of the attribute
+is simply a reference to a Spring bean that implements the `PdxSerializer` interface.
+
+More information on serialization support can be found in <>.
[[boostrap:cache:auto-reconnect]]
-=== Enabling auto-reconnect
+=== Enabling Auto-reconnect
-Setting the `` attribute to `true`.
-Generally, 'auto-reconnect' should only be enabled in cases where _Spring Data Geode's_ XML namespace is used to
-configure and bootstrap a new, non-application Geode Server to add to a cluster. In other words, 'auto-reconnect'
-should not be enabled when _Spring Data Geode_ is used to develop and build an Geode application that also happens
-to be a peer cache member of the Geode cluster.
+Generally, 'auto-reconnect' should only be enabled in cases where {sdg-name}'s XML namespace is used to configure
+and bootstrap a new, non-application {data-store-name} server added to a cluster. In other words, 'auto-reconnect'
+should not be enabled when {sdg-name} is used to develop and build a {data-store-name} application that also happens
+to be a peer `Cache` member of the {data-store-name} cluster.
-The main reason for this is that most Geode applications use references to the Geode cache or Regions in order to
-perform data access operations. These references are "injected" by the Spring container into application components
-(e.g. DAOs or Repositories) for use by the application. When a peer member is forcefully disconnected from the rest
-of the cluster, presumably because the peer member has become unresponsive or a network partition separates one or more
-peer members into a group too small to function as an independent distributed system, the peer member will shutdown
-and all Geode component references (e.g. Cache, Regions, etc) become invalid.
+The main reason for this restriction is that most {data-store-name} applications use references to the {data-store-name}
+`Cache` or Regions in order to perform data access operations. These references are "`injected`" by the Spring container
+into application components (such as Repositories) for use by the application. When a peer member is forcefully
+disconnected from the rest of the cluster, presumably because the peer member has become unresponsive or a
+network partition separates one or more peer members into a group too small to function as an independent
+distributed system, the peer member shuts down and all {data-store-name} component references (caches, Regions,
+and others) become invalid.
-Essentially, the current forced-disconnect processing logic in each peer member dismantles the system from the ground up.
-The JGroups stack shuts down, the Distributed System is put in a shutdown state and finally, the Cache is closed.
+Essentially, the current forced disconnect processing logic in each peer member dismantles the system from the ground up.
+The JGroups stack shuts down, the distributed system is put in a shutdown state and, finally, the cache is closed.
Effectively, all memory references become stale and are lost.
-After being disconnected from the Distributed System a peer member enters a "reconnecting" state and periodically
-attempts to rejoin the Distributed System. If the peer member succeeds in reconnecting, the member rebuilds
-its "view" of the Distributed System from existing members and receives a new Distributed System ID. Additionally, all
-Cache, Regions and other Geode components are reconstructed. Therefore, all old references, which may have been
-injected into application by the Spring container are now stale and no longer valid.
+After being disconnected from the distributed system, a peer member enters a "`reconnecting`" state and periodically
+attempts to rejoin the distributed system. If the peer member succeeds in reconnecting, the member rebuilds its "`view`"
+of the distributed system from existing members and receives a new distributed system ID. Additionally, all caches,
+Regions, and other {data-store-name} components are reconstructed. Therefore, all old references, which may have been
+injected into application by the Spring container, are now stale and no longer valid.
-Geode makes no guarantee, even when using the Geode public Java API, that application Cache, Region or other
-component references will be automatically refreshed by the reconnect operation. As such, Geode applications
-must take care to refresh their own references.
+{data-store-name} makes no guarantee (even when using the {data-store-name} public Java API) that application cache,
+Regions, or other component references are automatically refreshed by the reconnect operation. As such, {data-store-name}
+applications must take care to refresh their own references.
-Unfortunately, there is no way to be notified of a disconnect event, and subsequently, a reconnect event.
-If that were the case, the application developer would have a clean way to know when to call
-`ConfigurableApplicationContext.refresh()`, if even applicable for an application to do so, which is why
-this "feature" of Apache Geode is not recommended for peer cache Geode applications.
+Unfortunately, there is no way to be notified of a disconnect event and, subsequently, a reconnect event either.
+If that were the case, you would have a clean way to know when to call `ConfigurableApplicationContext.refresh()`,
+if it were even applicable for an application to do so, which is why this "`feature`" of {data-store-name} is not
+recommended for peer `Cache` applications.
-For more information about 'auto-reconnect', see Geode's
-http://geode.apache.org/docs/guide/11/managing/autoreconnect/member-reconnect.html[product documentation].
+For more information about 'auto-reconnect', see {data-store-name}'s
+{x-data-store-docs}/managing/autoreconnect/member-reconnect.html[product documentation].
[[bootstrap:cache:cluster-configuration]]
=== Using Cluster-based Configuration
-Apache Geode's Cluster Configuration Service is a convenient way for any peer member joining the cluster to get
-a "consistent view" of the cluster by using the shared, persistent configuration maintained by a Locator.
-Using the Cluster-based Configuration ensures the peer member's configuration will be compatible with
-the Geode Distributed System when the member joins.
+{data-store-name}'s Cluster Configuration Service is a convenient way for any peer member joining the cluster to get
+a "`consistent view`" of the cluster by using the shared, persistent configuration maintained by a Locator.
+Using the cluster-based configuration ensures the peer member's configuration is compatible with the {data-store-name}
+Distributed System when the member joins.
-This feature of _Spring Data Geode_ (setting the `use-cluster-configuration` attribute to `true`) works in the same way
-as the `cache-xml-location` attribute, except the source of the Geode configuration meta-data comes from the network
-via a Locator as opposed to a native `cache.xml` file residing in the local file system.
+This feature of {sdg-name} (setting the `use-cluster-configuration` attribute to `true`) works in the same way
+as the `cache-xml-location` attribute, except the source of the {data-store-name} configuration meta-data comes
+from the network through a Locator, as opposed to a native `cache.xml` file residing in the local file system.
-All Geode native configuration meta-data, whether from `cache.xml` or from the Cluster Configuration Service,
-gets applied before any _Spring_ (XML) configuration meta-data. As such, _Spring's_ config serves to "augment" the
-native Geode configuration meta-data and would most likely be specific to the application.
+All {data-store-name} native configuration metadata, whether from `cache.xml` or from the Cluster Configuration Service,
+gets applied before any Spring (XML) configuration metadata. As a result, Spring's config serves to "`augment`" the
+native {data-store-name} configuration metadata and would most likely be specific to the application.
-Again, to enable this feature, just specify the following in the _Spring_ XML config:
+Again, to enable this feature, specify the following in the Spring XML config:
[source,xml]
----
-
+
----
-NOTE: While certain Geode tools, like _Gfsh_, have their actions "recorded" when schema-like changes are made
-(e.g. `gfsh>create region --name=Example --type=PARTITION`), _Spring Data Geode's_ configuration meta-data
-is not recorded. The same is true when using Geode's public Java API directly; it too is not recorded.
+NOTE: While certain {data-store-name} tools, such as _Gfsh_, have their actions "`recorded`" when schema-like changes
+are made (for example, `gfsh>create region --name=Example --type=PARTITION`), {sdg-name}'s configuration metadata
+is not recorded. The same is true when using {data-store-name}'s public Java API directly. It, too, is not recorded.
-For more information on Geode's Cluster Configuration Service, see the
-http://geode.apache.org/docs/guide/11/configuring/cluster_config/gfsh_persist.html[product documentation].
+For more information on {data-store-name}'s Cluster Configuration Service, see the
+{x-data-store-docs}/configuring/cluster_config/gfsh_persist.html[product documentation].
[[bootstrap:cache:server]]
-== Configuring a Geode CacheServer
+== Configuring a {data-store-name} CacheServer
-_Spring Data Geode_ includes dedicated support for configuring a
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/server/CacheServer.html[CacheServer],
-allowing complete configuration through the Spring container:
+{sdg-name} includes dedicated support for configuring a
+{x-data-store-javadoc}/org/apache/geode/cache/server/CacheServer.html[CacheServer],
+allowing complete configuration through the Spring container, as the following example shows:
[source,xml]
+[subs="verbatim,attributes"]
----
-
+
@@ -277,35 +282,33 @@ allowing complete configuration through the Spring container:
----
-The configuration above illustrates the `cache-server` element and the many options available.
+The preceding configuration shows the `cache-server` element and the many available options.
-NOTE: Rather than hard-coding the port, this configuration uses _Spring's_
+NOTE: Rather than hard-coding the port, this configuration uses Spring's
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#xsd-config-body-schemas-context[context]
-namespace to declare a `property-placeholder`.
+namespace to declare a `property-placeholder`. A
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-factory-placeholderconfigurer[property placeholder]
-reads one or more properties files and then replaces property placeholders with values at runtime. This allows administrators
-to change values without having to touch the main application configuration. _Spring_ also provides the
+reads one or more properties files and then replaces property placeholders with values at runtime. Doing so lets administrators
+change values without having to touch the main application configuration. Spring also provides
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#expressions[SpEL]
-and the http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-environment[environment abstraction]
-to support externalization of environment-specific properties from the main codebase, easing deployment
-across multiple machines.
+and an http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-environment[environment abstraction]
+to support externalization of environment-specific properties from the main codebase, easing deployment across multiple machines.
-NOTE: To avoid initialization problems, the `CacheServer` started by _Spring Data Geode_ will start *after*
-the _Spring_ container has been fully initialized. This allows potential Regions, Listeners, Writers or Instantiators
-defined declaratively to be fully initialized and registered before the server starts accepting connections.
-Keep this in mind when programmatically configuring these elements as the server might start after your components
-and thus not be seen by the clients connecting right away.
+NOTE: To avoid initialization problems, the `CacheServer` started by {sdg-name} starts *after* the Spring container
+has been fully initialized. Doing so lets potential Regions, listeners, writers or instantiators that are defined
+declaratively be fully initialized and registered before the server starts accepting connections. Keep this in mind
+when programmatically configuring these elements, as the server might start after your components and thus not be seen
+by the clients connecting right away.
[[bootstrap:cache:client]]
-== Configuring a Geode ClientCache
+== Configuring a {data-store-name} ClientCache
-In addition to defining a Geode peer http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/Cache.html[Cache],
-_Spring Data Geode_ also supports the definition of a Geode http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/client/ClientCache.html[ClientCache]
-in a _Spring_ context. A `ClientCache` definition is very similar in configuration and use to
-the Geode peer <> and is supported by the `org.springframework.data.gemfire.client.ClientCacheFactoryBean`.
+In addition to defining a {data-store-name} peer {x-data-store-javadoc}/org/apache/geode/cache/Cache.html[`Cache`],
+{sdg-name} also supports the definition of a {data-store-name} {x-data-store-javadoc}/org/apache/geode/cache/client/ClientCache.html[`ClientCache`]
+in a Spring container. A `ClientCache` definition is similar in configuration and use to the {data-store-name} peer <>
+and is supported by the `org.springframework.data.gemfire.client.ClientCacheFactoryBean`.
-The simplest definition of a Geode cache client using default configuration can be accomplished with the following
-declaration:
+The simplest definition of a {data-store-name} cache client using default configuration follows:
[source,xml]
----
@@ -314,37 +317,38 @@ declaration:
----
-`client-cache` supports many of the same options as the <> element. However, as opposed
-to a *full-fledged* peer cache member, a cache client connects to a remote cache server through a Pool. By default,
-a Pool is created to connect to a server running on `localhost`, listening to port `40404`. The default Pool is used
+`client-cache` supports many of the same options as the <> element. However, as opposed
+to a full-fledged peer `Cache` member, a cache client connects to a remote cache server through a Pool. By default,
+a Pool is created to connect to a server running on `localhost` and listening to port `40404`. The default Pool is used
by all client Regions unless the Region is configured to use a specific Pool.
Pools can be defined with the `pool` element. This client-side Pool can be used to configure connectivity directly to
-a server for individual entities or the entire cache through one or more Locators.
+a server for individual entities or for the entire cache through one or more Locators.
For example, to customize the default Pool used by the `client-cache`, the developer needs to define a Pool and wire it
-to the cache definition:
+to the cache definition, as the following example shows:
[source,xml]
----
-
+
-
+
----
-The `` element also has a `ready-for-events` attribute. If set to `true`, the client cache
-initialization will include a call to http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/client/ClientCache.html#readyForEvents--[ClientCache.readyForEvents()].
+The `` element also has a `ready-for-events` attribute. If the attribute is set to `true`, the client cache
+initialization includes a call to {x-data-store-javadoc}/org/apache/geode/cache/client/ClientCache.html#readyForEvents[`ClientCache.readyForEvents()`].
-Client-side configuration is covered in more detail in <>.
+<> covers client-side configuration in more detail.
[[bootstrap:cache:client:pool]]
-=== Geode's DEFAULT Pool and Spring Data Geode Pool Definitions
+=== {data-store-name}'s DEFAULT Pool and {sdg-name} Pool Definitions
-If a Geode `ClientCache` is local-only, then no Pool definition is required. For instance, a developer may define:
+If a {data-store-name} `ClientCache` is local-only, then no Pool definition is required. For instance, you can define
+the following:
[source,xml]
----
@@ -353,18 +357,16 @@ If a Geode `ClientCache` is local-only, then no Pool definition is required. Fo
----
-In this case, the "Example" Region is `LOCAL` and no data is distributed between the client and a server, therefore,
-no Pool is necessary. This is true for any client-side, local-only Region, as defined by the Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/client/ClientRegionShortcut.html[ClientRegionShortcut]
+In this case, the "`Example`" Region is `LOCAL` and no data is distributed between the client and a server. Therefore,
+no Pool is necessary. This is true for any client-side, local-only Region, as defined by the {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/cache/client/ClientRegionShortcut.html[`ClientRegionShortcut`]
(all `LOCAL_*` shortcuts).
-However, if a client Region is a (caching) proxy to a server-side Region, then a Pool is required. There are several
-ways to define and use a Pool in this case.
+However, if a client Region is a (caching) proxy to a server-side Region, a Pool is required. In that case,
+there are several ways to define and use a Pool.
-When a client cache, Pool and proxy-based Region are all defined, but not explicitly identified, _Spring Data Geode_
-will resolve the references automatically for you.
-
-For example:
+When a `ClientCache`, a Pool, and a proxy-based Region are all defined but not explicitly identified, {sdg-name}
+resolves the references automatically, as the following example shows:
[source,xml]
----
@@ -377,11 +379,12 @@ For example:
----
-In the example above, the client cache is identified as `gemfireCache`, the Pool as `gemfirePool` and the client Region
-as "Example". However, the client cache will initialize Geode's DEFAULT Pool from `gemfirePool` and the client Region
-will use the `gemfirePool` when distributing data between the client and the server.
+In the preceding example, the `ClientCache` is identified as `gemfireCache`, the Pool as `gemfirePool`,
+and the client Region as "`Example`". However, the `ClientCache` initializes {data-store-name}'s `DEFAULT` Pool
+from `gemfirePool`, and the client Region uses the `gemfirePool` when distributing data between the client
+and the server.
-Basically, _Spring Data Geode_ resolves the above configuration to the following:
+Basically, {sdg-name} resolves the preceding configuration to the following:
[source,xml]
----
@@ -394,9 +397,9 @@ Basically, _Spring Data Geode_ resolves the above configuration to the following
----
-Geode still creates a Pool called "DEFAULT". _Spring Data Geode_ will just cause the "DEFAULT" Pool to be
-initialized from the `gemfirePool`. This is useful in situations where multiple Pools are defined and client Regions
-are using separate Pools.
+{data-store-name} still creates a Pool called `DEFAULT`. {sdg-name} causes the `DEFAULT` Pool to be initialized
+from the `gemfirePool`. Doing so is useful in situations where multiple Pools are defined and client Regions
+are using separate Pools, or do not declare a Pool at all.
Consider the following:
@@ -419,19 +422,19 @@ Consider the following:
----
-In this setup, the Geode client cache's "DEFAULT" Pool is initialized from "locatorPool" as specified with the
-`pool-name` attribute. There is no _Spring Data Geode_-defined `gemfirePool` since both Pools were explicitly
-identified (named) "locatorPool" and "serverPool", respectively.
+In this setup, the {data-store-name} `client-cache` `DEFAULT` pool is initialized from `locatorPool`,
+as specified by the `pool-name` attribute. There is no {sdg-name}-defined `gemfirePool`, since both Pools
+were explicitly identified (named) -- `locatorPool` and `serverPool`, respectively.
-The "Example" Region explicitly refers to and uses the "serverPool" exclusively. The "AnotherExample" Region uses
-Geode's "DEFAULT" Pool, which was configured from the "locatorPool" based on the client cache bean definition's
-`pool-name` attribute.
+The "`Example`" Region explicitly refers to and exclusively uses the `serverPool`. The `AnotherExample` Region uses
+{data-store-name}'s `DEFAULT` Pool, which, again, was configured from the `locatorPool` based on the client cache
+bean definition's `pool-name` attribute.
-Finally, the "YetAnotherExample" Region will not use a Pool since it is `LOCAL`.
+Finally, the `YetAnotherExample` Region does not use a Pool, because it is `LOCAL`.
-NOTE: The "AnotherExample" Region would first look for a Pool bean named `gemfirePool`, but that would require
-the definition of an anonymous Pool bean (i.e. ``) or a Pool bean explicitly named `gemfirePool`
-(e.g. ``).
+NOTE: The `AnotherExample` Region would first look for a Pool bean named `gemfirePool`, but that would require
+the definition of an anonymous Pool bean (that is, ``) or a Pool bean explicitly named `gemfirePool`
+(for example, ``).
-NOTE: We could have either named "locatorPool", "gemfirePool", or made the Pool bean definition anonymous
-and it would have the same effect as the above configuration.
+NOTE: If we either changed the name of `locatorPool` to `gemfirePool` or made the Pool bean definition be anonymous,
+it would have the same effect as the preceding configuration.
diff --git a/src/main/asciidoc/reference/cq-container.adoc b/src/main/asciidoc/reference/cq-container.adoc
index 8c3f83d5..b26c6bcd 100644
--- a/src/main/asciidoc/reference/cq-container.adoc
+++ b/src/main/asciidoc/reference/cq-container.adoc
@@ -1,28 +1,29 @@
[[apis:continuous-query]]
= Continuous Query (CQ)
-A powerful functionality offered by Apache Geode is
-http://geode.apache.org/docs/guide/11/developing/continuous_querying/chapter_overview.html[Continuous Query] (or CQ).
-In short, CQ allows one to create and register an OQL query, and then automatically be notified when new data
-that gets added to Geode matches the query predicate. _Spring Data Geode_ provides dedicated support for CQs through
-the `org.springframework.data.gemfire.listener` package and its *listener container*; very similar in functionality
-and naming to the JMS integration in the _Spring Framework_; in fact, users familiar with the JMS support in _Spring_,
-should feel right at home.
+A powerful functionality offered by {data-store-name} is
+{x-data-store-docs}/developing/continuous_querying/chapter_overview.html[Continuous Query] (or CQ).
-Basically _Spring Data Geode_ allows methods on POJOs to become end-points for CQ. Simply define the query
-and indicate the method that should be called to be notified when there is a match. _Spring Data Geode_ takes care
+In short, CQ allows a developer to create and register an OQL query, and then automatically be notified when new data
+that gets added to {data-store-name} matches the query predicate. {sdg-name} provides dedicated
+support for CQs through the `org.springframework.data.gemfire.listener` package and its *listener container*;
+very similar in functionality and naming to the JMS integration in the _Spring Framework_; in fact, users familiar with
+the JMS support in Spring, should feel right at home.
+
+Basically {sdg-name} allows methods on POJOs to become end-points for CQ. Simply define the query
+and indicate the method that should be called to be notified when there is a match. {sdg-name} takes care
of the rest. This is very similar to Java EE's message-driven bean style, but without any requirement for base class
-or interface implementations, based on Apache Geode.
+or interface implementations, based on {data-store-name}.
-NOTE: Currently, Continuous Query is only supported in Geode's client/server topology. Additionally, the client Pool
-used is required to have the subscription enabled. Please refer to the Geode
-http://geode.apache.org/docs/guide/11/developing/continuous_querying/implementing_continuous_querying.html[documentation]
+NOTE: Currently, Continuous Query is only supported in {data-store-name}'s client/server topology. Additionally, the client Pool
+used is required to have the subscription enabled. Please refer to the {data-store-name}
+{x-data-store-docs}/developing/continuous_querying/implementing_continuous_querying.html[documentation]
for more information.
[[apis:continuous-query:container]]
== Continuous Query Listener Container
-_Spring Data Geode_ simplifies creation, registration, life-cycle and dispatch of CQ events by taking care of
+{sdg-name} simplifies creation, registration, life-cycle and dispatch of CQ events by taking care of
the infrastructure around CQ with the use of SDG's `ContinuousQueryListenerContainer`, which does all the heavy lifting
on behalf of the user. Users familiar with EJB and JMS should find the concepts familiar as it is designed
as close as possible to the support provided in the _Spring Framework_ with its Message-driven POJOs (MDPs).
@@ -33,11 +34,11 @@ is responsible for all threading of message reception and dispatches into the li
the intermediary between an EDP (Event-driven POJO) and the event provider and takes care of creation and registration
of CQs (to receive events), resource acquisition and release, exception conversion and the like. This allows you,
as an application developer, to write the (possibly complex) business logic associated with receiving an event
-(and reacting to it), and delegate the boilerplate Geode infrastructure concerns to the framework.
+(and reacting to it), and delegate the boilerplate {data-store-name} infrastructure concerns to the framework.
The listener container is fully customizable. A developer can chose either to use the CQ thread to perform the dispatch
(synchronous delivery) or a new thread (from an existing pool) for an asynchronous approach by defining the suitable
-`java.util.concurrent.Executor` (or _Spring's_ `TaskExecutor`). Depending on the load, the number of listeners
+`java.util.concurrent.Executor` (or Spring's `TaskExecutor`). Depending on the load, the number of listeners
or the runtime environment, the developer should change or tweak the executor to better serve her needs. In particular,
in managed environments (such as app servers), it is highly recommended to pick a proper `TaskExecutor`
to take advantage of its runtime.
@@ -45,10 +46,10 @@ to take advantage of its runtime.
[[apis:continuous-query:adapter]]
== The `ContinuousQueryListener` and `ContinuousQueryListenerAdapter`
-The `ContinuousQueryListenerAdapter` class is the final component in _Spring Data Geode_ CQ support. In a nutshell,
+The `ContinuousQueryListenerAdapter` class is the final component in {sdg-name} CQ support. In a nutshell,
class allows you to expose almost *any* implementing class as an EDP with minimal constraints.
`ContinuousQueryListenerAdapter` implements the `ContinuousQueryListener` interface, a simple listener interface
-similar to Geode's http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/CqListener.html[CqListener].
+similar to {data-store-name}'s {x-data-store-javadoc}/org/apache/geode/cache/query/CqListener.html[CqListener].
Consider the following interface definition. Notice the various event handling methods and their parameters:
@@ -75,21 +76,22 @@ class DefaultEventDelegate implements EventDelegate {
}
----
-In particular, note how the above implementation of the `EventDelegate` interface has *no* Geode dependencies at all.
+In particular, note how the above implementation of the `EventDelegate` interface has *no* {data-store-name} dependencies at all.
It truly is a POJO that we can and will make into an EDP via the following configuration.
NOTE: the class does not have to implement an interface; an interface is only used to better showcase the decoupling
between the contract and the implementation.
[source,xml]
+[subs="verbatim,attributes"]
----
@@ -115,7 +117,7 @@ reference and the actual query definition are required. It's possible, however,
the resulting Continuous Query (useful for monitoring) but also the name of the method (the default is `handleEvent`).
The specified method can have various argument types, the `EventDelegate` interface lists the allowed types.
-The example above uses the _Spring Data Geode_ namespace to declare the event listener container
+The example above uses the {sdg-name} namespace to declare the event listener container
and automatically register the listeners. The full blown, *beans* definition is displayed below:
[source,xml]
@@ -142,6 +144,6 @@ and automatically register the listeners. The full blown, *beans* definition is
----
-Each time an event is received, the adapter automatically performs type translation between the Geode event
+Each time an event is received, the adapter automatically performs type translation between the {data-store-name} event
and the required method argument(s) transparently. Any exception caused by the method invocation is caught
and handled by the container (by default, being logged).
diff --git a/src/main/asciidoc/reference/data-access.adoc b/src/main/asciidoc/reference/data-access.adoc
index f45717df..5e9ac5e5 100644
--- a/src/main/asciidoc/reference/data-access.adoc
+++ b/src/main/asciidoc/reference/data-access.adoc
@@ -1,18 +1,19 @@
[[data-access]]
= Using the Data Access Namespace
-In addition to the core XML namespace (`gfe`), _Spring Data Geode_ provides a `gfe-data` XML namespace
-primarily intended to simplify the development of Apache Geode client applications. This namespace currently contains
-support for Geode <> and function <> as well as
-includes a `` tag that offers a convenient way to connect to the Apache Geode data grid.
+In addition to the core XML namespace (`gfe`), {sdg-name} provides a data access XML namespace (`gfe-data`),
+which is primarily intended to simplify the development of {data-store-name} client applications. This namespace
+currently contains support for {data-store-name} <> and Function
+<>, as well as a `` tag that offers a convenient way to connect to
+a {data-store-name} cluster.
[[data-access:datasource]]
-== An Easy Way to Connect to Geode
+== An Easy Way to Connect to {data-store-name}
-For many applications, a basic connection to a Geode data grid using default values is sufficient.
-_Spring Data Geode's_ `` tag provides a simple way to access data. The data source creates
-a `ClientCache` and connection `Pool`. In addition, it will query the cluster servers for all existing root Regions
-and create an (empty) client Region proxy for each one.
+For many applications, a basic connection to a {data-store-name} data grid using default values is sufficient.
+{sdg-name}'s `` tag provides a simple way to access data. The data source creates a `ClientCache`
+and connection `Pool`. In addition, it queries the cluster servers for all existing root Regions and creates
+an (empty) client Region proxy for each one.
[source,xml]
----
@@ -22,12 +23,13 @@ and create an (empty) client Region proxy for each one.
----
The `` tag is syntactically similar to ``. It may be configured with one or more nested `locator`
-or `server` tags to connect to an existing data grid. Additionally, all attributes available to configure a Pool
-are supported. This configuration will automatically create client Region beans for each Region defined on
-cluster members connected to the Locator, so they may be seamlessly referenced by _Spring Data_ mapping annotations,
-`GemfireTemplate`, and wired into application classes.
+or `server` elements to connect to an existing data grid. Additionally, all attributes available to configure a Pool
+are supported. This configuration automatically creates client Region beans for each Region defined on cluster members
+connected to the Locator, so they can be seamlessly referenced by Spring Data mapping annotations (`GemfireTemplate`)
+and autowired into application classes.
-Of course, you can explicitly configure client Regions. For example, if you want to cache data in local memory:
+Of course, you can explicitly configure client Regions. For example, if you want to cache data in local memory,
+as the following example shows:
[source,xml]
----
diff --git a/src/main/asciidoc/reference/data.adoc b/src/main/asciidoc/reference/data.adoc
index a9c60c7f..388fa4ae 100644
--- a/src/main/asciidoc/reference/data.adoc
+++ b/src/main/asciidoc/reference/data.adoc
@@ -1,19 +1,19 @@
[[apis]]
-= Working with Apache Geode APIs
+= Working with {data-store-name} APIs
-Once the Apache Geode 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 DAO exception hierarchy.
-This chapter also covers support for dependency injection of Geode managed objects.
+Once the {data-store-name} 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 DAO exception hierarchy.
+This chapter also covers support for dependency injection of {data-store-name} managed objects.
[[apis:template]]
== GemfireTemplate
-As with many other high-level abstractions provided by _Spring_ projects, _Spring Data Geode_ provides a *template*
-to simplify Geode data access. The class provides several *one-liner* methods containing common Region operations,
-but also has the ability to *execute* code against the native Geode API without having to deal with Geode checked
-exceptions by using a `GemfireCallback`.
+As with many other high-level abstractions provided by Spring, {sdg-name} provides a *template*
+to simplify {data-store-name} data access operations. The class provides several methods containing common Region operations,
+but also provides the capability to *execute* code against native {data-store-name} APIs without having to deal with
+{data-store-name} checked exceptions by using a `GemfireCallback`.
-The template class requires a Geode `Region` instance, and once configured, is thread-safe and can be reused
+The template class requires a {data-store-name} `Region`, and once configured, is thread-safe and is reusable
across multiple application classes:
[source,xml]
@@ -22,12 +22,15 @@ across multiple application classes:
----
Once the template is configured, a developer can use it alongside `GemfireCallback` to work directly with
-the Geode `Region` without having to deal with checked exceptions, threading or resource management concerns:
+the {data-store-name} `Region` without having to deal with checked exceptions, threading or resource management concerns:
[source,java]
----
template.execute(new GemfireCallback>() {
- public Iterable doInGemfire(Region region) throws GemFireCheckedException, GemFireException {
+
+ public Iterable doInGemfire(Region region)
+ throws GemFireCheckedException, GemFireException {
+
Region localRegion = (Region) region;
localRegion.put("1", "one");
@@ -38,11 +41,11 @@ template.execute(new GemfireCallback>() {
});
----
-For accessing the full power of the Apache Geode query language, a developer can use the `find` and `findUnique`
-methods, which, as opposed to the `query` method, can execute queries across multiple Regions, execute projections,
+For accessing the full power of the {data-store-name} query language, a developer can use the `find` and `findUnique`
+methods, which, compared 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,
+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.
[[apis:exception-translation]]
@@ -60,9 +63,9 @@ As mentioned in _Spring Framework's_ documentation,
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#orm-exception-translation[Exception translation]
can be applied transparently to your Data Access Objects (DAO) through the use of the `@Repository` annotation and AOP
by defining a `PersistenceExceptionTranslationPostProcessor` bean. The same exception translation functionality
-is enabled when using Geode as long as the `CacheFactoryBean` is declared, e.g. using either a ``
+is enabled when using {data-store-name} as long as the `CacheFactoryBean` is declared, e.g. using either a ``
or `` declaration, which acts as an exception translator and is automatically detected by
-the _Spring_ infrastructure and used accordingly.
+the Spring infrastructure and used accordingly.
[[apis:transaction-management]]
== Local, Cache Transaction Management
@@ -70,44 +73,44 @@ the _Spring_ infrastructure and used accordingly.
One of the most popular features of the _Spring Framework_ is
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#transaction[Transaction Management].
-If you are not familiar with _Spring's_ transaction abstraction then we strongly recommend
+If you are not familiar with Spring's transaction abstraction then we strongly recommend
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#transaction-motivation[reading]
about _Spring's Transaction Management_ infrastructure 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 Apache Geode, _Spring Data Geode_ provides a dedicated, per-cache, `PlatformTransactionManager` that,
-once declared, allows Region operations to be executed atomically through _Spring_:
+For {data-store-name}, {sdg-name} provides a dedicated, per-cache, `PlatformTransactionManager` that,
+once declared, allows Region operations to be executed atomically through Spring:
[source,xml]
----
----
-NOTE: The example above can be simplified even further by eliminating the `cache-ref` attribute if the Geode cache
-is defined under the default name, `gemfireCache`. As with the other _Spring Data Geode_ namespace elements,
+NOTE: The example above can be simplified even further by eliminating the `cache-ref` attribute if the {data-store-name} cache
+is defined under the default name, `gemfireCache`. As with the other {sdg-name} namespace elements,
if the cache bean name is not configured, the aforementioned naming convention will be used.
Additionally, the transaction manager name is "`gemfireTransactionManager`" if not explicitly specified.
-Currently, Apache Geode supports optimistic transactions with *read committed* isolation. Furthermore, to guarantee
+Currently, {data-store-name} 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 by default,
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 and behavior of the underlying Geode transaction manager, please refer to the Geode
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CacheTransactionManager.html[CacheTransactionManager Javadoc]
-as well as the http://geode.apache.org/docs/guide/11/developing/transactions/chapter_overview.html[documentation].
+{x-data-store-javadoc}/org/apache/geode/cache/CacheTransactionManager.html[CacheTransactionManager Javadoc]
+as well as the {x-data-store-docs}/developing/transactions/chapter_overview.html[documentation].
[[apis:global-transaction-management]]
== Global, JTA Transaction Management
-It is also possible for Apache Geode to participate in a Global, JTA based transaction, such as a transaction managed
+It is also possible for {data-store-name} to participate in a Global, JTA based transaction, such as a transaction managed
by an Java EE Application Server (e.g. WebSphere Application Server, a.k.a. WAS) using Container Managed Transactions
(CMT) along with other JTA resources.
-However, unlike many other JTA "compliant" resources (e.g. JMS Message Brokers like ActiveMQ), Apache Geode is *not*
-an XA compliant resource. Therefore, Apache Geode must be positioned as the "_Last Resource_" in a JTA transaction
+However, unlike many other JTA "compliant" resources (e.g. JMS Message Brokers like ActiveMQ), {data-store-name} is *not*
+an XA compliant resource. Therefore, {data-store-name} must be positioned as the "_Last Resource_" in a JTA transaction
(_prepare phase_) since it does not implement the 2-phase commit protocol, or rather does not handle
distributed transactions.
@@ -118,22 +121,22 @@ In fact, Red Hat's JBoss project, http://narayana.io/[Narayana] is one such LGPL
refers to this as "_Last Resource Commit Optimization_" (LRCO). More details can be found
http://narayana.io//docs/project/index.html#d0e1859[here].
-However, whether you are using Apache Geode in a standalone environment with an Open Source JTA Transaction Management
+However, whether you are using {data-store-name} in a standalone environment with an Open Source JTA Transaction Management
implementation that supports "_Last Resource_", or a managed environment (e.g. Java EE AS such as WAS),
_Spring Data Geode_ has you covered.
-There are a series of steps you must complete to properly use Apache Geode as a "_Last Resource_" in a JTA transaction
+There are a series of steps you must complete to properly use {data-store-name} as a "_Last Resource_" in a JTA transaction
involving more than 1 transactional resource. Additionally, there can only be 1 non-XA compliant resource
-(e.g. Apache Geode) in such an arrangement.
+(e.g. {data-store-name}) in such an arrangement.
-1) First, you must complete Steps 1-4 in Geode's documentation
-http://geode.apache.org/docs/guide/11/developing/transactions/JTA_transactions.html#task_sln_x3b_wk[here].
+1) First, you must complete Steps 1-4 in {data-store-name}'s documentation
+http://gemfire90.docs.pivotal.io/geode/developing/transactions/JTA_transactions.html#concept_csy_vfb_wk[here].
-NOTE: #1 above is independent of your _Spring [Boot] and/or [Data Geode]_ application
+NOTE: #1 above is independent of your Spring [Boot] and/or [Data for {data-store-name}] application
and must be completed successfully.
-2) Referring to Step 5 in Geode's http://geode.apache.org/docs/guide/11/developing/transactions/JTA_transactions.html#task_sln_x3b_wk[documentation],
-_Spring Data Geode's_ Annotation support will attempt to set the `GemFireCache`, http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/GemFireCache.html#setCopyOnRead-boolean-[`copyOnRead`]
+2) Referring to Step 5 in {data-store-name}'s http://gemfire90.docs.pivotal.io/geode/developing/transactions/JTA_transactions.html#concept_csy_vfb_wk[documentation],
+{sdg-name}'s Annotation support will attempt to set the `GemFireCache`, {x-data-store-javadoc}/org/apache/geode/cache/GemFireCache.html#setCopyOnRead-boolean-[`copyOnRead`]
property for you when using the `@EnableGemFireAsLastResource` annotation.
However, if SDG's auto-configuration is unsuccessful then you must explicitly set the `copy-on-read` attribute on the
@@ -144,56 +147,56 @@ Peer Cache XML:
[source,xml]
----
-
+
----
Peer Cache JavaConfig:
[source,java]
----
- @Bean
- CacheFacatoryBean gemfireCache() {
+@Bean
+CacheFacatoryBean gemfireCache() {
- CacheFactoryBean gemfireCache = new CacheFactoryBean();
+ CacheFactoryBean gemfireCache = new CacheFactoryBean();
- gemfireCache.setClose(true);
- gemfireCache.setCopyOnRead(true);
+ gemfireCache.setClose(true);
+ gemfireCache.setCopyOnRead(true);
- return gemfireCache;
- }
+ return gemfireCache;
+}
----
Client Cache XML:
[source,xml]
----
-
+
----
Client Cache JavaConfig:
[source,java]
----
- @Bean
- ClientCacheFacatoryBean gemfireCache() {
+@Bean
+ClientCacheFacatoryBean gemfireCache() {
- ClientCacheFactoryBean gemfireCache = new ClientCacheFactoryBean();
+ ClientCacheFactoryBean gemfireCache = new ClientCacheFactoryBean();
- gemfireCache.setClose(true);
- gemfireCache.setCopyOnRead(true);
+ gemfireCache.setClose(true);
+ gemfireCache.setCopyOnRead(true);
- return gemfireCache;
- }
+ return gemfireCache;
+}
----
NOTE: explicitly setting the `copy-on-read` attribute or optionally the `copyOnRead` property
really should not be necessary.
-3) At this point, you *skip* Steps 6-8 in Geode's http://geode.apache.org/docs/guide/11/developing/transactions/JTA_transactions.html#task_sln_x3b_wk[documentation]
-and let _Spring Data Geode_ work its magic. All you need do is annotate your _Spring_ `@Configuration` class
-with _Spring Data Geode's_ *new* `@EnableGemFireAsLastResource` annotation and a combination of _Spring's_
+3) At this point, you *skip* Steps 6-8 in {data-store-name}'s http://gemfire90.docs.pivotal.io/geode/developing/transactions/JTA_transactions.html#concept_csy_vfb_wk[documentation]
+and let _Spring Data Geode_ work its magic. All you need do is annotate your Spring `@Configuration` class
+with {sdg-name}'s *new* `@EnableGemFireAsLastResource` annotation and a combination of Spring's
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#transaction[Transaction Management]
-infrastructure and _Spring Data Geode's_ `@EnableGemFireAsLastResource` configuration does the trick.
+infrastructure and {sdg-name}'s `@EnableGemFireAsLastResource` configuration does the trick.
The configuration looks like this...
@@ -210,13 +213,13 @@ class GeodeConfiguration {
The only requirements are...
-3.1) The `@EnableGemFireAsLastResource` annotation must be declared on the same _Spring_ `@Configuration` class
-where _Spring's_ `@EnableTransactionManagement` annotation is also specified.
+3.1) The `@EnableGemFireAsLastResource` annotation must be declared on the same Spring `@Configuration` class
+where Spring's `@EnableTransactionManagement` annotation is also specified.
3.2) The `order` attribute of the `@EnableTransactionManagement` annotation must be explicitly set to an integer value
that is not `Integer.MAX_VALUE` or `Integer.MIN_VALUE` (defaults to `Integer.MAX_VALUE`).
-Of course, hopefully you are aware that you also need to configure _Spring's_ `JtaTransactionManager`
+Of course, hopefully you are aware that you also need to configure Spring's `JtaTransactionManager`
when using JTA Transactions like so..
[source,java]
@@ -233,15 +236,15 @@ public JtaTransactionManager transactionManager(UserTransaction userTransaction)
----
NOTE: The configuration in section <> does *not* apply here.
-The use of _Spring Data Geode's_ `GemfireTransactionManager` is applicable only in "Local", Cache Transactions,
+The use of {sdg-name}'s `GemfireTransactionManager` is applicable only in "Local", Cache Transactions,
*not* "Global", JTA Transactions. Therefore, you do *not* configure the SDG `GemfireTransactionManager` in this case.
-You configure _Spring's_ `JtaTransactionManager` as shown above.
+You configure Spring's `JtaTransactionManager` as shown above.
For more details on using _Spring's Transaction Management_ with JTA,
see http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#transaction-application-server-integration[here].
-Effectively, _Spring Data Geode's_ `@EnableGemFireAsLastResource` annotation imports configuration containing 2 Aspect
-bean definitions that handles the Geode `o.a.g.ra.GFConnectionFactory.getConnection()`
+Effectively, {sdg-name}'s `@EnableGemFireAsLastResource` annotation imports configuration containing 2 Aspect
+bean definitions that handles the {data-store-name} `o.a.g.ra.GFConnectionFactory.getConnection()`
and `o.a.g.ra.GFConnection.close()` operations at the appropriate points during the transactional operation.
Specifically, the correct sequence of events are...
@@ -257,10 +260,10 @@ Specifically, the correct sequence of events are...
5. Finally, `GFConnection.close()`
This is consistent with how you, as the application developer, would code this manually if you had to use the JTA API
-+ Geode API yourself, as shown in the
-Geode http://geode.apache.org/docs/guide/11/developing/transactions/jca_adapter_example.html#concept_swv_z2p_wk[example].
++ {data-store-name} API yourself, as shown in the
+{data-store-name} http://gemfire90.docs.pivotal.io/geode/developing/transactions/jca_adapter_example.html#concept_swv_z2p_wk[example].
-Thankfully, _Spring_ does the heavy lifting for you and all you need do after applying the appropriate configuration
+Thankfully, Spring does the heavy lifting for you and all you need do after applying the appropriate configuration
(shown above) is...
[source,java]
@@ -269,7 +272,7 @@ Thankfully, _Spring_ does the heavy lifting for you and all you need do after ap
class MyTransactionalService ... {
@Transactional
- public someTransactionalMethod() {
+ public someTransactionalServiceMethod() {
// perform business logic interacting with and accessing multiple JTA resources atomically, here
}
@@ -277,11 +280,11 @@ class MyTransactionalService ... {
}
----
-#1 & #4 above are appropriately handled for you by _Spring's_ JTA based `PlatformTransactionManager` once the
-`@Transactional` boundary is entered by your application (i.e. when the `MyTransactionSerivce.someTransactionalMethod()`
+#1 & #4 above are appropriately handled for you by Spring's JTA based `PlatformTransactionManager` once the
+`@Transactional` boundary is entered by your application (i.e. when the `MyTransactionSerivce.someTransactionalServiceMethod()`
is called).
-#2 & #3 are handled by _Spring Data Geode's_ new Aspects enabled with the `@EnableGemFireAsLastResource` annotation.
+#2 & #3 are handled by {sdg-name}'s new Aspects enabled with the `@EnableGemFireAsLastResource` annotation.
#3 of course is the responsibility of your application.
@@ -291,8 +294,8 @@ Indeed, with the appropriate logging configured, you will see the correct sequen
----
2017-Jun-22 11:11:37 TRACE TransactionInterceptor - Getting transaction for [example.app.service.MessageService.send]
-2017-Jun-22 11:11:37 TRACE GemFireAsLastResourceConnectionAcquiringAspect - Acquiring GemFire Connection
-from GemFire JCA ResourceAdapter registered at [gfe/jca]
+2017-Jun-22 11:11:37 TRACE GemFireAsLastResourceConnectionAcquiringAspect - Acquiring {data-store-name} Connection
+from {data-store-name} JCA ResourceAdapter registered at [gfe/jca]
2017-Jun-22 11:11:37 TRACE MessageService - PRODUCER [ Message :
[{ @type = example.app.domain.Message, id= MSG0000000000, message = SENT }],
@@ -300,13 +303,14 @@ JSON : [{"id":"MSG0000000000","message":"SENT"}] ]
2017-Jun-22 11:11:37 TRACE TransactionInterceptor - Completing transaction for [example.app.service.MessageService.send]
-2017-Jun-22 11:11:37 TRACE GemFireAsLastResourceConnectionClosingAspect - Closed GemFire Connection @ [Reference [...]]
+2017-Jun-22 11:11:37 TRACE GemFireAsLastResourceConnectionClosingAspect - Closed {data-store-name} Connection @ [Reference [...]]
----
-For more details on using Apache Geode in JTA transactions, see http://geode.apache.org/docs/guide/11/developing/transactions/JTA_transactions.html[here].
+For more details on using {data-store-name} in JTA transactions,
+see http://gemfire90.docs.pivotal.io/geode/developing/transactions/JTA_transactions.html[here].
-For more details on configuring Apache Geode as a "_Last Resource_",
-see http://geode.apache.org/docs/guide/11/developing/transactions/JTA_transactions.html#concept_csy_vfb_wk[here].
+For more details on configuring {data-store-name} as a "_Last Resource_",
+see http://gemfire90.docs.pivotal.io/geode/developing/transactions/JTA_transactions.html#concept_csy_vfb_wk[here].
:leveloffset: +1
@@ -317,33 +321,33 @@ include::{basedocdir}/reference/cq-container.adoc[]
[[apis:declarable]]
== Wiring `Declarable` Components
-Apache Geode XML configuration (usually referred to as `cache.xml`) allows *user* objects to be declared
+{data-store-name} XML configuration (usually referred to as `cache.xml`) allows *user* objects to be declared
as part of the configuration. Usually these objects are `CacheLoaders` or other pluggable callback components
-supported by Geode. Using native Geode configuration, each user type declared through XML must implement
+supported by {data-store-name}. Using native {data-store-name} configuration, each user type declared through XML must implement
the `Declarable` interface, which allows arbitrary parameters to be passed to the declared class
through a `Properties` instance.
In this section, we describe how you can configure these pluggable components when defined in `cache.xml`
-using _Spring_ while keeping your Cache/Region configuration defined in `cache.xml`. This allows your
+using Spring while keeping your Cache/Region configuration defined in `cache.xml`. This allows your
pluggable components to focus on the application logic and not the location or creation of `DataSources`
or other collaborators.
However, if you are starting a green field project, it is recommended that you configure Cache, Region,
-and other pluggable Geode components directly in _Spring_. This avoids inheriting from the `Declarable` interface
+and other pluggable {data-store-name} components directly in Spring. This avoids inheriting from the `Declarable` interface
or the base class presented in this section.
See the following sidebar for more information on this approach.
.Eliminate `Declarable` components
****
-A developer can configure custom types entirely through _Spring_ as mentioned in <>.
+A developer can configure custom types entirely through Spring as mentioned in <>.
That way, a developer does not have to implement the `Declarable` interface, and also benefits from
-all the features of the _Spring_ IoC container (not just dependency injection but also life-cycle
+all the features of the Spring IoC container (not just dependency injection but also life-cycle
and instance management).
****
-As an example of configuring a `Declarable` component using _Spring_, consider the following declaration
-(taken from the `Declarable` http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/Declarable.html[Javadoc]):
+As an example of configuring a `Declarable` component using Spring, consider the following declaration
+(taken from the `Declarable` {x-data-store-javadoc}/org/apache/geode/cache/Declarable.html[Javadoc]):
[source,xml]
----
@@ -355,16 +359,16 @@ As an example of configuring a `Declarable` component using _Spring_, consider t
----
-To simplify the task of parsing, converting the parameters and initializing the object, _Spring Data Geode_ offers
-a base class (`WiringDeclarableSupport`) that allows Geode user objects to be wired through a *template* bean definition
-or, in case that is missing, perform auto-wiring through the _Spring_ IoC container. To take advantage of this feature,
+To simplify the task of parsing, converting the parameters and initializing the object, {sdg-name} offers
+a base class (`WiringDeclarableSupport`) that allows {data-store-name} user objects to be wired through a *template* bean definition
+or, in case that is missing, perform auto-wiring through the Spring IoC container. To take advantage of this feature,
the user objects need to extend `WiringDeclarableSupport`, which automatically locates the declaring `BeanFactory`
and performs wiring as part of the initialization process.
.Why is a base class needed?
****
-In the current Geode release there is no concept of an *object factory* and the types declared are instantiated
-and used as is. In other words, there is no easy way to manage object creation outside Apache Geode.
+In the current {data-store-name} release there is no concept of an *object factory* and the types declared are instantiated
+and used as is. In other words, there is no easy way to manage object creation outside {data-store-name}.
****
[[apis:declarable:template-wiring]]
@@ -404,7 +408,7 @@ class DBLoader extends WiringDeclarableSupport implements CacheLoader {
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
">
@@ -415,8 +419,8 @@ class DBLoader extends WiringDeclarableSupport implements CacheLoader {
----
In the scenario above, as no parameter was specified, a bean with the id/name `com.company.app.DBLoader` was used
-as a template for wiring the instance created by Geode. For cases where the bean name uses a different convention,
-one can pass in the `bean-name` parameter in the Geode configuration:
+as a template for wiring the instance created by {data-store-name}. For cases where the bean name uses a different convention,
+one can pass in the `bean-name` parameter in the {data-store-name} configuration:
[source,xml]
----
@@ -436,7 +440,7 @@ one can pass in the `bean-name` parameter in the Geode configuration:
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
">
@@ -461,7 +465,7 @@ However, a developer can also use JDK 5 annotations to provide additional inform
TIP: We strongly recommend reading the dedicated
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-annotation-config[chapter]
-in the _Spring_ documentation for more information on the supported annotations and enabling factors.
+in the Spring documentation for more information on the supported annotations and enabling factors.
For example, the hypothetical `DBLoader` declaration above can be injected with a Spring-configured `DataSource`
in the following way:
@@ -493,8 +497,8 @@ class DBLoader extends WiringDeclarableSupport implements CacheLoader {
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
">
@@ -506,29 +510,32 @@ class DBLoader extends WiringDeclarableSupport implements CacheLoader {
By using the JSR-330 annotations, the `CacheLoader` code has been simplified since the location and creation
of the `DataSource` has been externalized and the user code is concerned only with the loading process.
The `DataSource` might be transactional, created lazily, shared between multiple objects or retrieved from JNDI.
-These aspects can easily be configured and changed through the _Spring_ container without touching
+These aspects can easily be configured and changed through the Spring container without touching
the `DBLoader` code.
[[apis:spring-cache-abstraction]]
== Support for the Spring Cache Abstraction
-_Spring Data Geode_ provides an implementation of the _Spring_
+{sdg-name} 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 position {data-store-name} as a _caching provider_ in Spring's caching infrastructure.
-To use Apache Geode as a backing implementation, a "_caching provider_" _in Spring's Cache Abstraction_,
+To use {data-store-name} as a backing implementation, a "_caching provider_" _in Spring's Cache Abstraction_,
simply add `GemfireCacheManager` to your configuration:
[source,xml]
+[subs="verbatim,attributes"]
----
+ xmlns:cache="http://www.springframework.org/schema/cache"
+ xmlns:gfe="{spring-data-schema-namespace}"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
+ {spring-data-schema-namespace} {spring-data-schema-location}
+">
@@ -546,9 +553,9 @@ NOTE: The `cache-ref` attribute on the `CacheManager` bean definition is not nec
is used (i.e. "gemfireCache"), i.e. `` without an explicit ID.
When the `GemfireCacheManager` (Singleton) bean instance is declared and declarative caching is enabled
-(either in XML with `` or in JavaConfig with _Spring's_ `@EnableCaching` annotation),
-the _Spring_ caching annotations (e.g. `@Cacheable`) identify the "caches" that will cache data in-memory
-using Geode Regions.
+(either in XML with `` or in JavaConfig with Spring's `@EnableCaching` annotation),
+the Spring caching annotations (e.g. `@Cacheable`) identify the "caches" that will cache data in-memory
+using {data-store-name} Regions.
These caches (i.e. Regions) must exist before the caching annotations that use them otherwise an error will occur.
@@ -571,15 +578,18 @@ Then you will need the following config.
XML:
[source,xml]
+[subs="verbatim,attributes"]
----
+ xmlns:cache="http://www.springframework.org/schema/cache"
+ xmlns:gfe="{spring-data-schema-namespace}"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
+ {spring-data-schema-namespace} {spring-data-schema-location}
+">
diff --git a/src/main/asciidoc/reference/diskstore.adoc b/src/main/asciidoc/reference/diskstore.adoc
index 402097f8..8418a800 100644
--- a/src/main/asciidoc/reference/diskstore.adoc
+++ b/src/main/asciidoc/reference/diskstore.adoc
@@ -1,22 +1,23 @@
[[bootstrap:diskstore]]
= Configuring a DiskStore
-_Spring Data Geode_ supports `DiskStore` configuration via the `disk-store` element.
-
-For example:
+{sdg-name} supports `DiskStore` configuration and creation through the `disk-store` element,
+as the following example shows:
[source,xml]
----
-
-
-
+
+
+
----
-`DiskStores` are used by Regions for file system persistent backup and overflow of evicted entries
-as well as persistent backup of WAN Gateways. Multiple Geode components may share the same `DiskStore`.
-Additionally, multiple file system directories may be defined for a single `DiskStore`.
+`DiskStore` instances are used by Regions for file system persistent backup and overflow of evicted entries
+as well as persistent backup for WAN Gateways. Multiple {data-store-name} components may share the same `DiskStore`.
+Additionally, multiple file system directories may be defined for a single `DiskStore`, as shown in
+the preceding example.
-Please refer to Apache Geode's documentation for a complete explanation of the
-http://geode.apache.org/docs/guide/11/developing/storing_data_on_disk/chapter_overview.html[configuration options].
+See {data-store-name}'s documentation for a complete explanation of
+{x-data-store-docs}/developing/storing_data_on_disk/chapter_overview.html[Persistence and Overflow]
+and configuration options on `DiskStore` instances.
diff --git a/src/main/asciidoc/reference/function-annotations.adoc b/src/main/asciidoc/reference/function-annotations.adoc
index 661e9581..d427f480 100644
--- a/src/main/asciidoc/reference/function-annotations.adoc
+++ b/src/main/asciidoc/reference/function-annotations.adoc
@@ -1,107 +1,105 @@
[[function-annotations]]
= Annotation Support for Function Execution
-== Introduction
+{sdg-name} includes annotation support to simplify working with {data-store-name}
+{x-data-store-docs}/developing/function_exec/chapter_overview.html[Function execution].
-_Spring Data Geode_ includes annotation support to simplify working with Geode
-http://geode.apache.org/docs/guide/11/developing/function_exec/chapter_overview.html[Function Execution].
-Under-the-hood, the Apache Geode API provides classes to implement and register Geode
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/Function.html[Functions]
-that are deployed on Geode servers, which may then be invoked by other peer member applications
-or remotely from cache clients.
+Under the hood, the {data-store-name} API provides classes to implement and register {data-store-name}
+{x-data-store-javadoc}/org/apache/geode/cache/execute/Function.html[Functions] that are deployed on {data-store-name}
+servers, which may then be invoked by other peer member applications or remotely from cache clients.
-Functions can execute in parallel, distributed among multiple Geode servers in the cluster, aggregating results
-with the map-reduce pattern that are sent back to the caller. Functions can also be targeted to run on a single server
-or Region. The Apache Geode API supports remote execution of Functions targeted using various predefined scopes:
-on Region, on members [in groups], on servers, etc. The implementation and execution of remote Functions,
+Functions can execute in parallel, distributed among multiple {data-store-name} servers in the cluster, aggregating the
+results using the map-reduce pattern and sent back to the caller. Functions can also be targeted to run on a single
+server or Region. The {data-store-name} API supports remote execution of Functions targeted by using various predefined
+scopes: on Region, on members (in groups), on servers, and others. The implementation and execution of remote Functions,
as with any RPC protocol, requires some boilerplate code.
-_Spring Data Geode_, true to _Spring's_ core value proposition, aims to hide the mechanics of remote Function execution
-and allow developers to focus on core POJO programming and business logic. To this end, _Spring Data Geode_ introduces
-annotations to declaratively register public methods of a POJO class as Geode Functions along with the ability to
-invoke registered Functions [remotely] via annotated interfaces.
+{sdg-name}, true to Spring's core value proposition, aims to hide the mechanics of remote Function execution and let you
+focus on core POJO programming and business logic. To this end, {sdg-name} introduces annotations to declaratively
+register the public methods of a POJO class as {data-store-name} Functions along with the ability to invoke registered
+Functions (including remotely) by using annotated interfaces.
-== Implementation vs Execution
+== Implementation Versus Execution
-There are two separate concerns to address implementation and execution.
+There are two separate concerns to address: implementation and execution.
-First is Function implementation (server-side), which must interact with the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/FunctionContext.html[FunctionContext]
+The first is Function implementation (server-side), which must interact with the
+{x-data-store-javadoc}/org/apache/geode/cache/execute/FunctionContext.html[`FunctionContext`]
to access the invocation arguments,
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/ResultSender.html[ResultsSender]
-as well as other execution context information. The Function implementation typically accesses the Cache and/or Regions
+{x-data-store-javadoc}/org/apache/geode/cache/execute/ResultSender.html[`ResultsSender`] to send results,
+and other execution context information. The Function implementation typically accesses the cache and Regions
and is registered with the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/FunctionService.html[FunctionService]
-under a unique Id.
+{x-data-store-javadoc}/org/apache/geode/cache/execute/FunctionService.html[`FunctionService`] under a unique ID.
-A cache client application invoking a Function does not depend on the implementation. To invoke a Function,
+A cache client application invoking a Function does not depend on the implementation. To invoke a Function,
the application instantiates an
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/Execution.html[Execution]
-providing the Function ID, invocation arguments and the Function target, which defines its scope:
-Region, server, servers, member or members. If the Function produces a result, the invoker uses a
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/ResultCollector.html[ResultCollector]
-to aggregate and acquire the execution results. In certain cases, a custom `ResultCollector` implementation
+{x-data-store-javadoc}/org/apache/geode/cache/execute/Execution.html[`Execution`]
+providing the Function ID, invocation arguments, and the Function target, which defines its scope:
+Region, server, servers, member, or members. If the Function produces a result, the invoker uses a
+{x-data-store-javadoc}/org/apache/geode/cache/execute/ResultCollector.html[`ResultCollector`]
+to aggregate and acquire the execution results. In certain cases, a custom `ResultCollector` implementation
is required and may be registered with the `Execution`.
NOTE: 'Client' and 'Server' are used here in the context of Function execution, which may have a different meaning
-than client and server in Geode's client-server topology. While it is common for an application using a `ClientCache`
-to invoke a Function on one or more Geode servers in a cluster, it is also possible to execute Functions
-in a peer-to-peer (P2P) configuration, where the application is a member of the cluster hosting a peer `Cache`.
-Keep in mind that a peer member cache application is subject to all the same constraints of being a peer member
-of the cluster.
+than client and server in {data-store-name}'s client-server topology. While it is common for an application using
+a `ClientCache` instance to invoke a Function on one or more {data-store-name} servers in a cluster, it is also
+possible to execute Functions in a peer-to-peer (P2P) configuration, where the application is a member of the cluster
+hosting a peer `Cache` instance. Keep in mind that a peer member cache application is subject to all the constraints
+of being a peer member of the cluster.
[[function-implementation]]
== Implementing a Function
-Using Geode APIs, the `FunctionContext` provides a runtime invocation context that includes the client's
-calling arguments and a `ResultSender` implementation to send results back to the client. Additionally,
-if the Function is executed on a Region, the `FunctionContext` is actually an instance of `RegionFunctionContext`,
-which provides additional information such as the target Region on which the Function was invoked
-and any Filter (set of specific keys) associated with the `Execution`, etc. If the Region is a PARTITION Region,
-the Function should use the `PartitionRegionHelper` to extract only the local data.
+Using {data-store-name} APIs, the `FunctionContext` provides a runtime invocation context that includes the client's
+calling arguments and a `ResultSender` implementation to send results back to the client. Additionally, if the Function
+is executed on a Region, the `FunctionContext` is actually an instance of `RegionFunctionContext`, which provides
+additional information, such as the target Region on which the Function was invoked, any filter (a set of specific keys)
+associated with the `Execution`, and so on. If the Region is a `PARTITION` Region, the Function should use
+the `PartitionRegionHelper` to extract the local data set.
-Using _Spring_, a developer can write a simple POJO and use the _Spring_ container to bind one or more of it's
-public methods to a Function. The signature for a POJO method intended to be used as a Function must generally
-conform to the client's execution arguments. However, in the case of a Region execution, the Region data
-may also be provided (presumably the data held in the local partition if the Region is a PARTITION Region).
-Additionally, the Function may require the Filter that was applied, if any. This suggests that the client and server
-share a contract for the calling arguments but that the method signature may include additional parameters
-to pass values provided by the `FunctionContext`. One possibility is for the client and server to share
-a common interface, but this is not strictly required. The only constraint is that the method signature includes
-the same sequence of calling arguments with which the Function was invoked after the additional parameters
-are resolved.
+By using Spring, you can write a simple POJO and use the Spring container to bind one or more of your POJO's
+public methods to a Function. The signature for a POJO method intended to be used as a Function must generally conform
+to the client's execution arguments. However, in the case of a Region execution, the Region data may also be provided
+(presumably the data is held in the local partition if the Region is a `PARTITION` Region).
-For example, suppose the client provides a String and int as the calling arguments. These are provided
-in the `FunctionContext` as an array:
+Additionally, the Function may require the filter that was applied, if any. This suggests that the client and server
+share a contract for the calling arguments but that the method signature may include additional parameters to pass values
+provided by the `FunctionContext`. One possibility is for the client and server to share a common interface, but this
+is not strictly required. The only constraint is that the method signature includes the same sequence of calling arguments
+with which the Function was invoked after the additional parameters are resolved.
+
+For example, suppose the client provides a `String` and an `int` as the calling arguments. These are provided
+in the `FunctionContext` as an array, as the following example shows:
`Object[] args = new Object[] { "test", 123 };`
-Then, the _Spring_ container should be able to bind to any method signature similar to the following.
-Let's ignore the return type for the moment:
+The Spring container should be able to bind to any method signature similar to the following (ignoring the return type
+for the moment):
[source,java]
----
-public Object method1(String s1, int i2) {...}
-public Object method2(Map, ?> data, String s1, int i2) {...}
-public Object method3(String s1, Map, ?> data, int i2) {...}
-public Object method4(String s1, Map, ?> data, Set> filter, int i2) {...}
-public void method4(String s1, Set> filter, int i2, Region,?> data) {...}
-public void method5(String s1, ResultSender rs, int i2);
-public void method6(FunctionContest context);
+public Object method1(String s1, int i2) { ... }
+public Object method2(Map, ?> data, String s1, int i2) { ... }
+public Object method3(String s1, Map, ?> data, int i2) { ... }
+public Object method4(String s1, Map, ?> data, Set> filter, int i2) { ... }
+public void method4(String s1, Set> filter, int i2, Region,?> data) { ... }
+public void method5(String s1, ResultSender rs, int i2) { ... }
+public void method6(FunctionContest context) { ... }
----
-The general rule is that once any additional arguments, i.e. Region data and Filter, are resolved,
+The general rule is that once any additional arguments (that is, Region data and filter) are resolved,
the remaining arguments must correspond exactly, in order and type, to the expected Function method parameters.
-The method's return type must be void or a type that may be serialized (either as a `java.io.Serializable`,
-`DataSerializable` or `PdxSerializable`). The latter is also a requirement for the calling arguments.
-The Region data should normally be defined as a Map, to facilitate unit testing, but may also be of type Region
-if necessary. As shown in the example above, it is also valid to pass the `FunctionContext` itself,
-or the `ResultSender`, if you need to control how the results are returned to the client.
+The method's return type must be void or a type that may be serialized (as a `java.io.Serializable`, `DataSerializable`,
+or `PdxSerializable`). The latter is also a requirement for the calling arguments.
+
+The Region data should normally be defined as a `Map`, to facilitate unit testing, but may also be of type Region,
+if necessary. As shown in the preceding example, it is also valid to pass the `FunctionContext` itself
+or the `ResultSender` if you need to control over how the results are returned to the client.
=== Annotations for Function Implementation
-The following example illustrates how SDG's Function annotations are used to expose POJO methods
-as GemFire Functions:
+The following example shows how {sdg-acronym}'s Function annotations are used to expose POJO methods
+as {data-store-name} Functions:
[source,java]
----
@@ -120,94 +118,96 @@ public class ApplicationFunctions {
}
----
-Note, the class itself must be registered as a _Spring_ bean and each Geode Function is annotated
-with `@GemfireFunction`. In this example, _Spring's_ `@Component` annotation was used, but you may register the bean
-by any method supported by _Spring_ (e.g. XML configuration or with a Java configuration class using _Spring Boot_).
-This allows the _Spring_ container to create an instance of this class and wrap it in a
-http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/function/PojoFunctionWrapper.html[PojoFunctionWrapper].
-_Spring_ creates a wrapper instance for each method annotated with `@GemfireFunction`. Each wrapper instance shares
+Note that the class itself must be registered as a Spring bean and each {data-store-name} Function is annotated with
+`@GemfireFunction`. In the preceding example, Spring's `@Component` annotation was used, but you can register the bean
+by using any method supported by Spring (such as XML configuration or with a Java configuration class when using
+Spring Boot). This lets the Spring container create an instance of this class and wrap it in a
+http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/function/PojoFunctionWrapper.html[`PojoFunctionWrapper`].
+Spring creates a wrapper instance for each method annotated with `@GemfireFunction`. Each wrapper instance shares
the same target object instance to invoke the corresponding method.
-TIP: The fact that the POJO Function class is a _Spring_ bean may offer other benefits since it shares
-the `ApplicationContext` with Geode components such as the Cache and Regions. These may be injected into the class
-if necessary.
+TIP: The fact that the POJO Function class is a Spring bean may offer other benefits, since it shares
+the `ApplicationContext` with {data-store-name} components, such as the cache and Regions. These may be injected into
+the class if necessary.
+
+Spring creates the wrapper class and registers the Functions with {data-store-name}'s `FunctionService`. The Function ID
+used to register each Function must be unique. By using convention, it defaults to the simple (unqualified) method name.
+The name can be explicitly defined by using the `id` attribute of the `@GemfireFunction` annotation.
-_Spring_ creates the wrapper class and registers the Function(s) with Geode's Function Service. The Function id used
-to register the Functions must be unique. Using convention it defaults to the simple (unqualified) method name.
-The name can be explicitly defined using the `id` attribute of the `@GemfireFunction` annotation.
The `@GemfireFunction` annotation also provides other configuration attributes, `HA` and `optimizedForWrite`,
-which correspond to properties defined by Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/Function.html[Function] interface.
-If the method's return type is void, then the `hasResult` property is automatically set to `false`;
-otherwise, if the method returns a value the `hasResult` attributes is set to `true`.
+which correspond to properties defined by {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/cache/execute/Function.html[`Function`] interface.
+If the POJO method's return type is `void`, then the `hasResult` attribute is automatically set to `false`.
+Otherwise, if the method returns a value, the `hasResult` attributes is set to `true`.
-Even for `void` return types, the annotation's `hasResult` attribute can be set to `true` to override this convention,
-as shown in the `functionWithContext` method above. Presumably, the intention is to use the `ResultSender` directly
-to send results to the caller.
+Even for `void` method return types, the annotation's `hasResult` attribute can be set to `true` to override
+this convention, as shown in the `functionWithContext` method shown previously. Presumably, the intention is
+to use the `ResultSender` directly to send results to the caller.
-The `PojoFunctionWrapper` implements Geode's `Function` interface, binds method parameters and invokes the target method
-in its `execute()` method. It also sends the method's return value using the `ResultSender`.
+The `PojoFunctionWrapper` implements {data-store-name}'s `Function` interface, binds method parameters, and invokes
+the target method in its `execute()` method. It also sends the method's return value back to the caller
+by using the `ResultSender`.
=== Batching Results
-If the return type is an array or Collection, then some consideration must be given to how the results are returned.
-By default, the `PojoFunctionWrapper` returns the entire array or Collection at once. If the number of elements
-in the array or Collection quite is large, it may incur a performance penalty. To divide the payload into smaller,
-more maneable chunks, you can set the `batchSize` attribute, as illustrated in `function2`, above.
+If the return type is an array or `Collection`, then some consideration must be given to how the results are returned.
+By default, the `PojoFunctionWrapper` returns the entire array or `Collection` at once. If the number of elements
+in the array or `Collection` is quite large, it may incur a performance penalty. To divide the payload into smaller,
+more manageable chunks, you can set the `batchSize` attribute, as illustrated in `function2`, shown earlier.
TIP: If you need more control of the `ResultSender`, especially if the method itself would use too much memory
-to create the Collection, you can pass the `ResultSender`, or access it via the `FunctionContext` and use it directly
-within the method to sends results back to the caller.
+to create the `Collection`, you can pass in the `ResultSender` or access it through the `FunctionContext`
+and use it directly within the method to sends results back to the caller.
=== Enabling Annotation Processing
-In accordance with _Spring_ standards, you must explicitly activate annotation processing for `@GemfireFunction`
-annotations.
-
-Using XML:
+In accordance with Spring standards, you must explicitly activate annotation processing for `@GemfireFunction`
+annotations. The following example activates annotation processing with XML:
[source,xml]
----
----
-Or by annotating a Java configuration class:
+The following example activates annotation processing by annotating a Java configuration class:
[source,java]
----
@Configuration
@EnableGemfireFunctions
-class ApplicationConfiguration { .. }
+class ApplicationConfiguration { ... }
----
[[function-execution]]
== Executing a Function
-A process invoking a remote Function needs to provide the Function's ID, calling arguments, the execution target
-(onRegion, onServers, onServer, onMember, onMembers) and optionally, a Filter set. Using _Spring Data Geode_,
-all a developer need do is define an interface supported by annotations. _Spring_ will create a dynamic proxy
-for the interface, which will use the `FunctionService` to create an `Execution`, invoke the `Execution` and coerce
-the results to the defined return type, if necessary. This technique is very similar to the way
-_Spring Data Geode's Repository extension_ works, thus some of the configuration and concepts should be familiar.
+A process that invokes a remote Function needs to provide the Function's ID, calling arguments, the execution target
+(`onRegion`, `onServers`, `onServer`, `onMember`, or `onMembers`) and (optionally) a filter set. By using {sdg-name},
+all you need do is define an interface supported by annotations. Spring creates a dynamic proxy for the interface,
+which uses the `FunctionService` to create an `Execution`, invoke the `Execution`, and (if necessary) coerce
+the results to the defined return type. This technique is similar to the way {sdg-name}'s Repository extension works.
+Thus, some of the configuration and concepts should be familiar.
+
Generally, a single interface definition maps to multiple Function executions, one corresponding to each method
defined in the interface.
=== Annotations for Function Execution
-To support client-side Function execution, the following SDG Function annotations are provided: `@OnRegion`,
-`@OnServer`, `@OnServers`, `@OnMember`, `@OnMembers`. These annotations correspond to the `Execution` implementations
-prodided by Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/FunctionService.html[FunctionService].
-Each annotation exposes the appropriate attributes. These annotations also provide an optional
-`resultCollector` attribute whose value is the name of a _Spring_ bean implementing the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/ResultCollector.html[ResultCollector]
+To support client-side Function execution, the following {sdg-acronym} Function annotations are provided: `@OnRegion`,
+`@OnServer`, `@OnServers`, `@OnMember`, and `@OnMembers`. These annotations correspond to the `Execution`
+implementations provided by {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/cache/execute/FunctionService.html[`FunctionService`] class.
+
+Each annotation exposes the appropriate attributes. These annotations also provide an optional `resultCollector` attribute
+whose value is the name of a Spring bean implementing the
+{x-data-store-javadoc}/org/apache/geode/cache/execute/ResultCollector.html[`ResultCollector`] interface
to use for the execution.
-CAUTION: The proxy interface binds all declared methods to the same execution configuration. Although, it is expected
-that single method interfaces will be common, all methods in the interface are backed by the same proxy instance
+CAUTION: The proxy interface binds all declared methods to the same execution configuration. Although it is expected
+that single method interfaces are common, all methods in the interface are backed by the same proxy instance
and therefore all share the same configuration.
-Here are a few examples:
+The following listing shows a few examples:
[source,java]
----
@@ -222,28 +222,28 @@ public interface FunctionExecution {
}
----
-By default, the Function ID is the simple (unqualified) method name. The `@FunctionId` annotation can be used
+By default, the Function ID is the simple (unqualified) method name. The `@FunctionId` annotation can be used
to bind this invocation to a different Function ID.
=== Enabling Annotation Processing
-The client-side uses _Spring's_ classpath component scanning capability to discover annotated interfaces. To enable
-Function execution annotation processing in XML:
+The client-side uses Spring's classpath component scanning capability to discover annotated interfaces. To enable
+Function execution annotation processing in XML, insert the following element in your XML configuration:
[source,xml]
----
-
+
----
-The `function-executions` element is provided in the `gfe-data` namespace. The `base-package` attribute is required
-to avoid scanning the entire classpath. Additional filters are provided as described in the _Spring_
+The `function-executions` element is provided in the `gfe-data` XML namespace. The `base-package` attribute is required
+to avoid scanning the entire classpath. Additional filters can be provided as described in the Spring
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-scanning-filters[reference documentation].
-Optionally, a developer can annotate her Java configuration class:
+Optionally, you can annotate your Java configuration class as follows:
[source,java]
----
-@EnableGemfireFunctionExecutions(basePackages = "org.example.myapp.geode.functions")
+@EnableGemfireFunctionExecutions(basePackages = "org.example.myapp.gemfire.functions")
----
[[function-execution-programmatic]]
@@ -266,8 +266,8 @@ public class MyApplication {
}
----
-Alternately, you can use a Function execution template directly. For example, `GemfireOnRegionFunctionTemplate`
-creates an `onRegion` Function `Execution`.
+Alternately, you can use a Function execution template directly. In the following example,
+the `GemfireOnRegionFunctionTemplate` creates an `onRegion` Function `Execution`:
.Using the `GemfireOnRegionFunctionTemplate`
====
@@ -281,21 +281,21 @@ String result = template.executeAndExtract("someFunction", myFilter, "hello", "w
====
Internally, Function `Executions` always return a `List`. `executeAndExtract` assumes a singleton `List`
-containing the result and will attempt to coerce that value into the requested type. There is also
-an `execute` method that returns the `List` as is. The first parameter is the Function ID.
-The Filter argument is optional. The following arguments are a variable argument `List`.
+containing the result and attempts to coerce that value into the requested type. There is also an `execute` method
+that returns the `List` as is. The first parameter is the Function ID. The filter argument is optional. The remaining
+arguments are a variable argument `List`.
[[function-execution-pdx]]
== Function Execution with PDX
-When using _Spring Data Geode's_ Function annotation support combined with Apache Geode's
-http://geode.apache.org/docs/guide/11/developing/data_serialization/gemfire_pdx_serialization.html[PDX Serialization],
+When using {sdg-name}'s Function annotation support combined with {data-store-name}'s
+{x-data-store-docs}/developing/data_serialization/gemfire_pdx_serialization.html[PDX Serialization],
there are a few logistical things to keep in mind.
-As explained above, and by way of example, typically developers will define Geode Functions using POJO classes
-annotated with Spring Data Geode
-http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/function/annotation/package-summary.html[Function annotations]
-like so...
+As explained earlier in this section, and by way of example, you should typically define {data-store-name} Functions
+by using POJO classes annotated with {sdg-name}
+http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/function/annotation/package-summary.html[Function annotations],
+as follows:
[source,java]
----
@@ -307,18 +307,18 @@ public class OrderFunctions {
}
----
-NOTE: The Integer type, count parameter is arbitrary as is the separation of the `Order` class and `OrderSource` Enum,
-which might be logical to combine. However, the arguments were setup this way to demonstrate the problem with
-Function executions in the context of PDX.
+NOTE: The `Integer` typed `count` parameter is arbitrary, as is the separation of the `Order` class
+and the `OrderSource` enum, which might be logical to combine. However, the arguments were setup this way
+to demonstrate the problem with Function executions in the context of PDX.
-Your `Order` and `OrderSource` enum might be as follows...
+Your `Order` class and `OrderSource` enum might be defined as follows:
[source,java]
----
public class Order ... {
private Long orderNumber;
- private Calendar orderDateTime;
+ private LocalDateTime orderDateTime;
private Customer customer;
private List items
@@ -334,7 +334,8 @@ public enum OrderSource {
}
----
-Of course, a developer may define a Function `Execution` interface to call the 'process' Geode Server Function...
+Of course, you can define a Function `Execution` interface to call the 'process' {data-store-name} server Function,
+as follows:
[source,java]
----
@@ -344,58 +345,58 @@ public interface OrderProcessingFunctions {
}
----
-Clearly, this `process(..)` `Order` Function is being called from a client-side with a `ClientCache`
-(i.e. ``) based application. This implies that the Function arguments must also be serializable.
-The same is true when invoking peer-to-peer member Functions (e.g. `@OnMember(s)) between peers in the cluster.
-Any form of `distribution` requires the data transmitted between client and server, or peers, to be serialized.
+Clearly, this `process(..)` `Order` Function is being called from the client-side with a `ClientCache` instance
+(that is ``). This implies that the Function arguments must also be serializable. The same is true
+when invoking peer-to-peer member Functions (such as `@OnMember(s)`) between peers in the cluster. Any form of
+`distribution` requires the data transmitted between client and server (or peers) to be serialized.
-Now, if the developer has configured Geode to use PDX for serialization (instead of Java serialization, for instance)
-it is common for developers to also set the `pdx-read-serialized` attribute to *true* in their configuration
-of the Geode server(s)...
+Now, if you have configured {data-store-name} to use PDX for serialization (instead of Java serialization, for instance)
+you can also set the `pdx-read-serialized` attribute to `true` in your configuration of the {data-store-name} server(s),
+as follows:
[source,xml]
----
----
-Or from a Geode cache client application...
+Alternatively, you can set the `pdx-read-serialized` attribute to `true` for a {data-store-name} cache client application,
+as follows:
[source,xml]
----
----
-This causes all values read from the cache (i.e. Regions) as well as information passed between client and servers,
-or peers, to remain in serialized form, including, but not limited to, Function arguments.
+Doing so causes all values read from the cache (that is, Regions) as well as information passed between client and servers
+(or peers) to remain in serialized form, including, but not limited to, Function arguments.
-Geode will only serialize application domain object types that you have specifically configured (registered),
-with either Geode's
-http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[ReflectionBasedAutoSerializer],
-or specifically (and recommended) using a "custom" Geode
-http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/pdx/PdxSerializer.html[PdxSerializer]. If you are using
-_Spring Data Geode's_ Repository extension to _Spring Data Common's_ Repository abstraction and infrastructure,
-you might even want to consider using _Spring Data Geode's_
-http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/mapping/MappingPdxSerializer.html[MappingPdxSerializer],
-which uses a entity's mapping meta-data to determine data from the application domain object that will be serialized
+{data-store-name} serializes only application domain object types that you have specifically configured (registered)
+either by using {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[`ReflectionBasedAutoSerializer`],
+or specifically (and recommended) by using a "`custom`" {data-store-name}
+{x-data-store-javadoc}/org/apache/geode/pdx/PdxSerializer.html[`PdxSerializer`].
+If you use {sdg-name}'s Repository extension, you might even want to consider using {sdg-name}'s
+{sdg-javadoc}/org/springframework/data/gemfire/mapping/MappingPdxSerializer.html[`MappingPdxSerializer`],
+which uses an entity's mapping metadata to determine data from the application domain object that is serialized
to the PDX instance.
-What is less than apparent, though, is that Geode automatically handles Java Enum types regardless of whether they are
-explicitly configured or not (i.e. registered with a `ReflectionBasedAutoSerializer` using a regex pattern
-and the `classes` parameter, or are handled by a "custom" Geode `PdxSerializer`), despite the fact that Java Enums
-implement `java.io.Serializable`.
+What is less than apparent, though, is that {data-store-name} automatically handles Java `Enum` types regardless
+of whether they are explicitly configured (that is, registered with a `ReflectionBasedAutoSerializer`,
+using a regex pattern and the `classes` parameter or are handled by a "`custom`" {data-store-name} `PdxSerializer`),
+despite the fact that Java enumerations implement `java.io.Serializable`.
-So, when a developer sets `pdx-read-serialized` to *true* on Geode Servers where the Geode Functions
-(including Spring Data Geode Function annotated POJO classes) are registered, then the developer
-may encounter surprising behavior when invoking the Function `Execution`.
+So, when you set `pdx-read-serialized` to `true` on {data-store-name} servers where the {data-store-name} Functions
+(including {sdg-name} Function-annotated POJO classes) are registered, then you may encounter surprising behavior
+when invoking the Function `Execution`.
-What the developer may pass as arguments when invoking the Function is...
+You might pass the following arguments when invoking the Function:
[source,java]
----
-orderProcessingFunctions.process(new Order(123, customer, Calendar.getInstance(), items), OrderSource.ONLINE, 400);
+orderProcessingFunctions.process(new Order(123, customer, LocalDateTime.now(), items), OrderSource.ONLINE, 400);
----
-But, what the Geode Function on the Server gets is...
+However, the {data-store-name} Function on the server gets the following:
[source,java]
----
@@ -403,34 +404,34 @@ process(regionData, order:PdxInstance, :PdxInstanceEnum, 400);
----
The `Order` and `OrderSource` have been passed to the Function as
-http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/pdx/PdxInstance.html[PDX instances].
-Again, this is all because `pdx-read-serialized` is set to *true*, which may be necessary in cases where
-the Geode Servers are interacting with multiple different clients (e.g. Java, native clients, such as C++/C#, etc).
+{x-data-store-javadoc}/org/apache/geode/pdx/PdxInstance.html[PDX instances].
+Again, this all happens because `pdx-read-serialized` is set to `true`, which may be necessary in cases where
+the {data-store-name} servers interact with multiple different clients (for example, a combination of Java clients
+and native clients, such as C/C++, C#, and others).
-This flies in the face of _Spring Data Geode's_ "strongly-typed", Function annotated POJO class method signatures,
-as the developer is expecting application domain object types, not PDX serialized instances.
+This flies in the face of {sdg-name}'s strongly-typed Function-annotated POJO class method signatures, where you would
+reasonably expect application domain object types instead, not PDX serialized instances.
-So, _Spring Data Geode_ includes enhanced Function support to automatically convert method arguments passed to
-the Function that are of type PDX to the desired application domain object types defined by the Function method's
-parameter types.
+Consequently, {sdg-name} includes enhanced Function support to automatically convert PDX typed method arguments
+to the desired application domain object types defined by the Function method's signature (parameter types).
-However, this also requires the developer to explicitly register a Geode `PdxSerializer` on the Geode Servers
-where _Spring Data Geode_ Function annotated POJOs are registered and used, e.g. ...
+However, this also requires you to explicitly register a {data-store-name} `PdxSerializer` on {data-store-name} servers
+where {sdg-name} Function-annotated POJOs are registered and used, as the following example shows:
[source,java]
----
-
+
----
-Alternatively, a developer my use Geode's
-http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[ReflectionBasedAutoSerializer]
-for convenience. Of course, it is recommended that you use a "custom" `PdxSerializer` where possible to maintain
-finer grained control over your serialization strategy.
+Alternatively, you can use {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[`ReflectionBasedAutoSerializer`]
+for convenience. Of course, we recommend that, where possible, you use a custom `PdxSerializer` to maintain
+finer-grained control over your serialization strategy.
-Finally, _Spring Data Geode_ is careful not to convert your Function arguments if you treat your Function arguments
-generically, or as one of Geode's PDX types...
+Finally, {sdg-name} is careful not to convert your Function arguments if you treat your Function arguments generically
+or as one of {data-store-name}'s PDX types, as follows:
[source,java]
----
@@ -440,9 +441,9 @@ public Object genericFunction(String value, Object domainObject, PdxInstanceEnum
}
----
-_Spring Data Geode_ only converts PDX type data to the corresponding application domain types if and only if
-the corresponding application domain types are on the classpath the the Function annotated POJO method expects it.
+{sdg-name} converts PDX typed data to the corresponding application domain types if and only if the corresponding
+application domain types are on the classpath and the Function-annotated POJO method expects it.
-For a good example of "custom", "composed" application-specific Geode `PdxSerializers` as well as appropriate
-POJO Function parameter type handling based on the method signatures, see Spring Data Geode's
-https://github.com/spring-projects/spring-data-gemfire/blob/1.0.0.APACHE-GEODE-INCUBATING-RELEASE/src/test/java/org/springframework/data/gemfire/function/ClientCacheFunctionExecutionWithPdxIntegrationTest.java[ClientCacheFunctionExecutionWithPdxIntegrationTest] class.
+For a good example of custom, composed application-specific {data-store-name} `PdxSerializers` as well as appropriate
+POJO Function parameter type handling based on the method signatures, see {sdg-name}'s
+https://github.com/spring-projects/spring-data-gemfire/blob/{revnumber}/src/test/java/org/springframework/data/gemfire/function/ClientCacheFunctionExecutionWithPdxIntegrationTest.java[`ClientCacheFunctionExecutionWithPdxIntegrationTest`] class.
diff --git a/src/main/asciidoc/reference/function.adoc b/src/main/asciidoc/reference/function.adoc
index d43a2762..e812ea87 100644
--- a/src/main/asciidoc/reference/function.adoc
+++ b/src/main/asciidoc/reference/function.adoc
@@ -1,20 +1,20 @@
[[bootstrap:function]]
= Configuring the Function Service
-_Spring Data Geode_ provides <> support for implementing and registering
-Apache Geode Functions.
+{sdg-name} provides <> support for implementing, registering and executing
+{data-store-name} Functions.
-_Spring Data Geode_ also provides namespace support for registering Apache Geode
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/Function.html[Functions]
-for remote Function execution.
+{sdg-name} also provides XML namespace support for registering {data-store-name}
+{x-data-store-javadoc}/org/apache/geode/cache/execute/Function.html[Functions]
+for remote function execution.
-Please refer to Apache Geode' http://geode.apache.org/docs/guide/11/developing/function_exec/chapter_overview.html[documentation]
+See {data-store-name}'s {x-data-store-docs}/developing/function_exec/chapter_overview.html[documentation]
for more information on the Function execution framework.
-Geode Functions are declared as _Spring_ beans and must implement the `org.apache.geode.cache.execute.Function`
+{data-store-name} Functions are declared as Spring beans and must implement the `org.apache.geode.cache.execute.Function`
interface or extend `org.apache.geode.cache.execute.FunctionAdapter`.
-The namespace uses a familiar pattern to declare functions:
+The namespace uses a familiar pattern to declare Functions, as the following example shows:
[source,xml]
----
diff --git a/src/main/asciidoc/reference/gateway.adoc b/src/main/asciidoc/reference/gateway.adoc
index 1eaefe6d..a99165f0 100644
--- a/src/main/asciidoc/reference/gateway.adoc
+++ b/src/main/asciidoc/reference/gateway.adoc
@@ -1,16 +1,17 @@
[[bootstrap:gateway]]
= Configuring WAN Gateways
-WAN Gateways provide a way to synchronize Apache Geode Distributed Systems across geographic areas.
-_Spring Data Geode_ provides namespace support for configuring WAN Gateways as illustrated in the following examples.
+WAN Gateways provides a way to synchronize {data-store-name} Distributed Systems across geographic locations.
+{sdg-name} provides XML namespace support for configuring WAN Gateways as illustrated in the following examples.
-== WAN Configuration in GemFire 7.0
+== WAN Configuration in {data-store-name} 7.0
-In the example below, `GatewaySenders` are configured for a PARTITION Region by adding child elements to the Region
-(`gateway-sender` and `gateway-sender-ref`).
+In the following example, `GatewaySenders` are configured for a `PARTITION` Region by adding child elements
+(`gateway-sender` and `gateway-sender-ref`) to the Region. A `GatewaySender` may register `EventFilters`
+and `TransportFilters`.
-A `GatewaySender` may register `EventFilters` and `TransportFilters`. Also shown below is an example configuration
-of an `AsyncEventQueue` which must also be wired into a Region (not shown).
+The following example also shows a sample configuration of an `AsyncEventQueue`, which must also be auto-wired
+into a Region (not shown):
[source,xml]
----
@@ -49,7 +50,7 @@ of an `AsyncEventQueue` which must also be wired into a Region (not shown).
----
On the other end of a `GatewaySender` is a corresponding `GatewayReceiver` to receive Gateway events.
-The `GatewayReceiver` may also be configured with `EventFilters` and `TransportFilters`.
+The `GatewayReceiver` may also be configured with `EventFilters` and `TransportFilters`, as follows:
[source,xml]
----
@@ -60,6 +61,6 @@ The `GatewayReceiver` may also be configured with `EventFilters` and `TransportF
----
-Please refer to the Apache Geode
-http://geode.apache.org/docs/guide/11/topologies_and_comm/multi_site_configuration/chapter_overview.html[documentation]
+See the {data-store-name}
+{x-data-store-docs}/topologies_and_comm/multi_site_configuration/chapter_overview.html[documentation]
for a detailed explanation of all the configuration options.
diff --git a/src/main/asciidoc/reference/gemfire-bootstrap.adoc b/src/main/asciidoc/reference/gemfire-bootstrap.adoc
index aaccaea8..b59fe050 100644
--- a/src/main/asciidoc/reference/gemfire-bootstrap.adoc
+++ b/src/main/asciidoc/reference/gemfire-bootstrap.adoc
@@ -1,39 +1,39 @@
[[gemfire-bootstrap]]
-= Bootstrapping a Spring ApplicationContext in Apache Geode
+= Bootstrapping a Spring ApplicationContext in {data-store-name}
-== Introduction
-
-Normally, a _Spring_-based application will <> using _Spring Data Geode's.
-Just by specifying a `` element using the _Spring Data Geode_ XML namespace, a single, embedded Geode
+Normally, a Spring-based application <> by using {sdg-name}'s features.
+By specifying a `` element that uses the {sdg-name} XML namespace, a single embedded {data-store-name}
peer `Cache` instance is created and initialized with default settings in the same JVM process as your application.
-However, it is sometimes necessary, perhaps a requirement imposed by your IT organization, that Geode be fully managed
-and operated using the provided Apache Geode tool suite, such as with
-http://geode.apache.org/docs/guide/11/tools_modules/gfsh/chapter_overview.html[Gfsh]. By using _Gfsh_,
-Geode will bootstrap your _Spring_ application context rather than the other way around. Instead of
-an application server, or a Java main class using _Spring Boot_, whatever, Geode does the bootstrapping and will
-host your application.
+However, it is sometimes necessary (perhaps as a requirement imposed by your IT organization) that {data-store-name}
+be fully managed and operated by the provided {data-store-name} tool suite, perhaps using
+{x-data-store-docs}/tools_modules/gfsh/chapter_overview.html[Gfsh]. By using _Gfsh_, {data-store-name} bootstraps
+your Spring `ApplicationContext` rather than the other way around. Instead of an application server or a Java main class
+that uses Spring Boot, {data-store-name} does the bootstrapping and hosts your application.
-Keep in mind, however, that Geode is not an application server. In addition, there are limitations to using
-this approach where Geode cache configuration is concerned.
+NOTE: {data-store-name} is not an application server. In addition, there are limitations to using this approach
+where the {data-store-name} cache configuration is concerned.
[[gemfire-bootstrap-gfsh]]
-== Using Apache Geode to Bootstrap a Spring Context Started with Gfsh
+== Using {data-store-name} to Bootstrap a Spring Context Started with Gfsh
-In order to bootstrap a _Spring_ application context in Geode when starting a Geode Server process using _Gfsh_,
-a user must make use of Geode's
-http://geode.apache.org/docs/guide/11/basic_config/the_cache/setting_cache_initializer.html[Initalizer] functionality.
-An Initializer block can declare a callback application that is launched after the cache is initialized by Geode.
+In order to bootstrap a Spring `ApplicationContext` in {data-store-name} when starting a {data-store-name} server
+using _Gfsh_, you must use {data-store-name}'s
+{x-data-store-docs}/basic_config/the_cache/setting_cache_initializer.html[initalizer] capability.
+An initializer block can declare a application callback that is launched after the cache is initialized
+by {data-store-name}.
-An Initializer is declared within an
-http://geode.apache.org/docs/guide/11/reference/topics/cache_xml.html#initializer[initializer] element
-using a minimal snippet of Geode's native `cache.xml`. 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. ``)
+An initializer is declared within an {x-data-store-docs}/reference/topics/cache_xml.html#initializer[initializer] element
+by using a minimal snippet of {data-store-name}'s native `cache.xml`. To bootstrap the Spring `ApplicationContext`,
+a `cache.xml` file is required, in much the same way as a minimal snippet of Spring XML config is needed to bootstrap
+a Spring `ApplicationContext` configured with component scanning
+(for example ``).
-Fortunately, such an Initializer is already conveniently provided by the framework, the
-http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializer.html[SpringContextBootstrappingInitializer].
-A typical, yet very minimal configuration for this class inside Geodes's `cache.xml` file will look like this:
+Fortunately, such an initializer is already conveniently provided by the framework: the
+{sdg-javadoc}/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializer.html[`SpringContextBootstrappingInitializer`].
+
+The following example shows a typical, yet minimal, configuration for this class inside {data-store-name}'s
+`cache.xml` file:
[source,xml]
----
@@ -53,14 +53,14 @@ A typical, yet very minimal configuration for this class inside Geodes's `cache.
----
-The `SpringContextBootstrappingInitializer` class follows similar conventions as _Spring's_ `ContextLoaderListener`
-class used to bootstrap a _Spring_ application context inside a Web Application, where application context
-configuration files are specified with the `contextConfigLocations` Servlet Context Parameter.
+The `SpringContextBootstrappingInitializer` class follows conventions similar to Spring's `ContextLoaderListener`
+class, which is used to bootstrap a Spring `ApplicationContext` inside a web application, where `ApplicationContext`
+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 packages containing appropriately annotated application components
-that the _Spring_ container will search in order to find and create _Spring_ beans and other application components
-on the classpath:
+to specify a comma-separated list of base packages that contain appropriately annotated application components.
+The Spring container searches these components to find and create Spring beans and other application components
+in the classpath, as the following example shows:
[source,xml]
----
@@ -80,48 +80,48 @@ on the classpath:
----
-Then, with a properly configured and constructed `CLASSPATH` along with `cache.xml` file shown above, specified as
-a command-line option when starting a Geode Server in _Gfsh_, the command-line would be:
+Then, with a properly configured and constructed `CLASSPATH` and `cache.xml` file (shown earlier) specified as
+a command-line option when starting a {data-store-name} server in _Gfsh_, the command-line would be as follows:
[source]
----
-gfsh>start server --name=Server1 --log-level=config ...
+gfsh>start server --name=ExampleServer --log-level=config ...
--classpath="/path/to/application/classes.jar:/path/to/spring-data-geode-...RELEASE.jar"
--cache-xml-file="/path/to/geode/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 a GemFire cache cannot be configured using
-the _Spring Data Geode_ namespace. In other words, none of the `` 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 `application-context.xml` can be any valid Spring configuration metadata, including all of the {sdg-acronym}
+XML namespace elements. The only limitation with this approach is that a {data-store-name} cache cannot be configured
+by using the {sdg-acronym} XML namespace. In other words, none of the `` element attributes
+(such as `cache-xml-location`, `properties-ref`, `critical-heap-percentage`, `pdx-serializer-ref`, `lock-lease`,
+and others) can be specified. If used, these attributes are ignored.
-The reason for this is that Geode 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.
+The reason for this is that {data-store-name} itself has already created and initialized the cache before the initializer
+gets invoked. As a result, the cache already exists and, since it is a "`singleton`", it cannot be re-initialized
+or have any of its configuration augmented.
[[gemfire-bootstrap-lazywiring]]
-== Lazy-Wiring GemFire Components
+== Lazy-wiring {data-store-name} Components
-_Spring Data Geode_ already provides existing support for wiring Geode components, such as `CacheListeners`,
-`CacheLoaders`, `CacheWriters` and so on, that are declared and created by Geode in `cache.xml` using
-SDG's `WiringDeclarableSupport` class as described in <>. However, this only works
-when _Spring_ is the one doing the bootstrapping (i.e. bootstrapping Geode).
+{sdg-name} already provides support for auto-wiring {data-store-name} components (such as `CacheListeners`,
+`CacheLoaders`, `CacheWriters` and so on) that are declared and created by {data-store-name} in `cache.xml` by using
+{sdg-acronym}'s `WiringDeclarableSupport` class, as described in <>. However, this works
+only when Spring is the one doing the bootstrapping (that is, when Spring bootstraps {data-store-name}).
-When your _Spring_ application context is bootstrapped by Geode, then these Geode application components go unnoticed
-since the _Spring_ application context does not even exist yet! The _Spring_ application context will not get created
-until Geode calls the Initializer block, which only occurs after all the other Geode components and configuration
-have already been created and initialized.
+When your Spring `ApplicationContext` is bootstrapped by {data-store-name}, these {data-store-name} application components
+go unnoticed, because the Spring `ApplicationContext` does not exist yet. The Spring `ApplicationContext` does not get
+created until {data-store-name} calls the initializer block, which only occurs after all the other {data-store-name}
+components (cache, Regions, and others) have 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_ container that will eventually be created by Geode
-once the Initializer is called. In essence, this give your Geode defined application components a chance
-to be configured and auto-wired with _Spring_ beans defined in the _Spring_ application context.
+To solve this problem, a new `LazyWiringDeclarableSupport` class was introduced. This new class is aware of the
+Spring `ApplicationContext`. The intention behind this abstract base class is that any implementing class registers
+itself to be configured by the Spring container that is eventually created by {data-store-name} once the initializer
+is called. In essence, this gives your {data-store-name} application components a chance to be configured and auto-wired
+with Spring beans defined in the Spring container.
-In order for your Geode application components to be auto-wired by the _Spring_ container, create an application class
-that extends the `LazyWiringDeclarableSupport` and annotate any class member that needs to be provided as
-a _Spring_ bean dependency, similar to:
+In order for your {data-store-name} application components to be auto-wired by the Spring container, you should create
+an application class that extends the `LazyWiringDeclarableSupport` and annotate any class member that needs to be
+provided as a Spring bean dependency, similar to the following example:
[source,java]
----
@@ -135,14 +135,16 @@ public class UserDataSourceCacheLoader extends LazyWiringDeclarableSupport
}
----
-As implied in the `CacheLoader` example above, you might necessarily (although, rarely) have defined both
-a Region and `CacheListener` component in Geode `cache.xml`. The `CacheLoader` may need access to an application DAO,
-or perhaps a _Spring_ application context defined JDBC `DataSource` for loading `Users` into a Geode `REPLICATE` Region
-on start.
+As implied in the `CacheLoader` example above, you might necessarily (though rarely) have defined both a Region
+and a `CacheListener` component in {data-store-name} `cache.xml`. The `CacheLoader` may need access to an application
+Repository (or perhaps a JDBC `DataSource` defined in the Spring `ApplicationContext`) for loading `Users` into a
+{data-store-name} `REPLICATE` Region on startup.
-CAUTION: Be careful when mixing the different life-cycles of Apache Geode and the _Spring_ Container together
-in this manner as not all use cases and scenarios are supported. The Geode `cache.xml` configuration would be
-similar to the following (which comes from SDG's test suite):
+CAUTION
+====
+Be careful when mixing the different life-cycles of {data-store-name} and the Spring container together in this manner.
+Not all use cases and scenarios are supported. The {data-store-name} `cache.xml` configuration would be similar to
+the following (which comes from {sdg-acronym}'s test suite):
[source,xml]
----
@@ -173,3 +175,4 @@ similar to the following (which comes from SDG's test suite):
----
+====
diff --git a/src/main/asciidoc/reference/indexing.adoc b/src/main/asciidoc/reference/indexing.adoc
index a51d0594..787ab9be 100644
--- a/src/main/asciidoc/reference/indexing.adoc
+++ b/src/main/asciidoc/reference/indexing.adoc
@@ -1,31 +1,31 @@
[[bootstrap:indexing]]
= Configuring an Index
-Apache Geode allows Indexes (or Indices) to be created on Region data to improve the performance of OQL queries.
+{data-store-name} allows indexes (also sometimes pluralized as indices) to be created on Region data
+to improve the performance of OQL (Object Query Language) queries.
-In _Spring Data Geode_ (SDG), Indexes are declared with the `index` element:
+In {sdg-name}, indexes are declared with the `index` element, as the following example shows:
[source,xml]
----
----
-In _Spring Data Geode's_ XML schema (a.k.a. SDG namespace), `Index` bean declarations are not bound to a _Region_,
-unlike Geode's native `cache.xml`. Rather, they are top-level elements just like `<gfe:cache>`. This allows
-a developer to declare any number of Indexes on any _Region_ whether they were just created or already exist,
-a significant improvement over Geode's native `cache.xml` format.
+In {sdg-name}'s XML schema (also called the {sdg-acronym} XML namespace), `index` bean declarations are not bound
+to a Region, unlike {data-store-name}'s native `cache.xml`. Rather, they are top-level elements similar to
+`<gfe:cache>` element. This lets you declare any number of indexes on any Region, whether they were just created
+or already exist -- a significant improvement over {data-store-name}'s native `cache.xml` format.
-An `Index` must have a name. A developer may give the `Index` an explicit name using the `name` attribute,
-otherwise the _bean name_ (i.e. value of the `id` attribute) of the `Index` bean definition is used as
+An `Index` must have a name. You can give the `Index` an explicit name by using the `name` attribute.
+Otherwise, the bean name (that is, the value of the `id` attribute) of the `index` bean definition is used as
the `Index` name.
The `expression` and `from` clause form the main components of an `Index`, identifying the data to index
-(i.e. the _Region_ identified in the `from` clause) along with what criteria (i.e. `expression`) is used
-to index the data. The `expression` should be based on what application domain object fields are used
-in the predicate of application-defined OQL queries used to query and lookup the objects stored
-in the _Region_.
+(that is, the Region identified in the `from` clause) along with what criteria (that is, `expression`) is used
+to index the data. The `expression` should be based on what application domain object fields are used in the predicate
+of application-defined OQL queries used to query and look up the objects stored in the Region.
-For example, if I have a `Customer` that has a `lastName` property...
+Consider the following example, which has a `lastName` property:
[source,java]
----
@@ -42,7 +42,8 @@ class Customer {
}
----
-And, I also have an application defined SD[G] _Repository_ to query for `Customers`...
+Now consider the following example, which has an application-defined {sdg-acronym} Repository
+to query for `Customer` objects:
[source,java]
----
@@ -54,184 +55,181 @@ interface CustomerRepository extends GemfireRepository {
}
----
-Then, the SD[G] _Repository_ finder/query method would result in the following OQL statement being executed...
+The {sdg-acronym} Repository finder/query method results in the following OQL statement being generated and ran:
[source,java]
----
SELECT * FROM /Customers c WHERE c.lastName = '$1'
----
-Therefore, I might want to create an `Index` like so...
+Therefore, you might want to create an `Index` with a statement similar to the following:
[source,xml]
----
----
-The `from` clause must refer to a valid, existing _Region_ and is how an `Index` gets applied to a _Region_.
-This is *not* _Sprig Data Geode_ specific; this is a feature of Apache Geode.
+The `from` clause must refer to a valid, existing Region and is how an `Index` gets applied to a Region.
+This is not specific to {sdg-name}. It is a feature of {data-store-name}.
-The `Index` `type` maybe 1 of 3 enumerated values defined by _Spring Data Geode's_
-http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/IndexType.html[IndexType]
-enumeration: `FUNCTIONAL`, `HASH` and `PRIMARY_KEY`.
+The `Index` `type` may be one of three enumerated values defined by {sdg-name}'s
+{sdg-javadoc}/org/springframework/data/gemfire/IndexType.html[`IndexType`] enumeration:
+`FUNCTIONAL`, `HASH`, and `PRIMARY_KEY`.
-Each of the enumerated values correspond to one of the http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/QueryService.html[QueryService]
-`create[|Key|Hash]Index` methods invoked when the actual `Index` is to be created (or "defined"; more on "defining"
-Indexes below). For instance, if the `IndexType` is `PRIMARY_KEY`, then the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/QueryService.html#createKeyIndex-java.lang.String-java.lang.String-java.lang.String-[QueryService.createKeyIndex(..)]
+Each of the enumerated values corresponds to one of the {x-data-store-javadoc}/org/apache/geode/cache/query/QueryService.html[`QueryService`]
+`create[|Key|Hash]Index` methods invoked when the actual `Index` is to be created (or "`defined`" -- you can find
+more on "`defining`" indexes in the next section). For instance, if the `IndexType` is `PRIMARY_KEY`, then the
+{x-data-store-javadoc}/org/apache/geode/cache/query/QueryService.html#createKeyIndex-java.lang.String-java.lang.String-java.lang.String-[QueryService.createKeyIndex(..)]
is invoked to create a `KEY` `Index`.
-The default is `FUNCTIONAL` and results in one of the `QueryService.createIndex(..)` methods
-being invoked.
+The default is `FUNCTIONAL` and results in one of the `QueryService.createIndex(..)` methods being invoked. See the
+{sdg-name} XML schema for a full set of options.
-See the _Spring Data Geode_ XML schema for a full set of options.
-
-For more information on Indexing in Apache Geode, see http://geode.apache.org/docs/guide/11/developing/query_index/query_index.html[Working with Indexes]
-in Apache Geode's User Guide.
+For more information on indexing in {data-store-name}, see "`http://gemfire90.docs.pivotal.io/geode/developing/query_index/query_index.html[Working with Indexes]`"
+in {data-store-name}'s User Guide.
== Defining Indexes
-In addition to creating Indexes upfront as `Index` bean definitions are processed by _Spring Data Geode_
-on _Spring_ container initialization, you may also *define* all of your application Indexes prior to creating
-them by using the `define` attribute, like so...
+In addition to creating indexes up front as `Index` bean definitions are processed by {sdg-name} on Spring container
+initialization, you may also define all of your application indexes prior to creating them by using the `define`
+attribute, as follows:
[source,xml]
----
----
-When `define` is set to `true` (defaults to `false`), this will not actually create the `Index` right then and there.
-All "defined" Indexes are created all at once, when the _Spring_ `ApplicationContext` is "refreshed", or, that is,
-when a `ContextRefreshedEvent` is published by the _Spring_ container. _Spring Data Geode_ registers itself as
-an `ApplicationListener` listening for the `ContextRefreshedEvent`. When fired, _Spring Data Geode_ will call
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/QueryService.html#createDefinedIndexes--[QueryService.createDefinedIndexes()].
+When `define` is set to `true` (it defaults to `false`), it does not actually create the `Index` at that moment.
+All "`defined`" Indexes are created all at once, when the Spring `ApplicationContext` is "`refreshed`" or, to put it
+differently, when a `ContextRefreshedEvent` is published by the Spring container. {sdg-name} registers itself as
+an `ApplicationListener` listening for the `ContextRefreshedEvent`. When fired, {sdg-name} calls
+{x-data-store-javadoc}/org/apache/geode/cache/query/QueryService.html#createDefinedIndexes[`QueryService.createDefinedIndexes()`].
-Defining Indexes and creating them all at once helps promote speed and efficiency when creating Indexes.
+Defining indexes and creating them all at once boosts speed and efficiency when creating indexes.
-See http://geode.apache.org/docs/guide/11/developing/query_index/create_multiple_indexes.html[Creating Multiple Indexes at Once]
+See "`http://gemfire90.docs.pivotal.io/geode/developing/query_index/create_multiple_indexes.html[Creating Multiple Indexes at Once]`"
for more details.
== `IgnoreIfExists` and `Override`
-Two _Spring Data Geode_ `Index` configuration options warrant special mention here: `ignoreIfExists` and `override`.
+Two {sdg-name} `Index` configuration options warrant special mention: `ignoreIfExists` and `override`.
These options correspond to the `ignore-if-exists` and `override` attributes on the `<gfe:index>` element
-in _Spring Data Geode's_ XML schema, respectively.
+in {sdg-name}'s XML namespace, respectively.
-WARNING: Make sure you absolutely understand what you are doing before using either of these options. These options can
-affect the performance and/or resources (e.g. memory) consumed by your application at runtime. As such, both of
-these options are disabled (i.e. set to `false`) in SDG by default.
+WARNING: Make sure you absolutely understand what you are doing before using either of these options. These options can
+affect the performance and resources (such as memory) consumed by your application at runtime. As a result, both of
+these options are disabled (set to `false`) in {sdg-acronym} by default.
-NOTE: These options are only available in _Spring Data Geode_ and exist to workaround known limitations
-with Apache Geode; there are no equivalent options or functionality available in Geode itself.
+NOTE: These options are only available in {sdg-name} and exist to workaround known limitations with {data-store-name}.
+{data-store-name} has no equivalent options or functionality.
-Each option significantly differs in behavior and entirely depends on the type of Geode `Index` _Exception_ thrown.
-This also means that neither option has any effect if a Geode Index-type _Exception_ is *not* thrown. These options
-are meant to specifically handle Geode `IndexExistsExceptions` and `IndexNameConflictExceptions`, which can occur
-for various, sometimes obscure reasons. But, in general...
+Each option significantly differs in behavior and entirely depends on the type of {data-store-name} `Index` exception
+thrown. This also means that neither option has any effect if a {data-store-name} Index-type exception is not thrown.
+These options are meant to specifically handle {data-store-name} `IndexExistsException` and `IndexNameConflictException`
+instances, which can occur for various, sometimes obscure reasons. The exceptions have the following causes:
-* An http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/IndexExistsException.html[IndexExistsException]
-is thrown when there exists another `Index` with the same definition but different name when attempting to
+* An {x-data-store-javadoc}/org/apache/geode/cache/query/IndexExistsException.html[`IndexExistsException`]
+is thrown when there exists another `Index` with the same definition but a different name when attempting to
create an `Index`.
-* An http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/IndexNameConflictException.html[IndexNameConflictException]
+* An {x-data-store-javadoc}/org/apache/geode/cache/query/IndexNameConflictException.html[`IndexNameConflictException`]
is thrown when there exists another `Index` with the same name but possibly different definition when attempting to
create an `Index`.
-_Spring Data Geode's_ default behavior is to *_fail-fast_*, always! So, neither `Index` _Exception_ will be "handled"
-by default; these `Index` _Exceptions_ are simply wrapped in a SDG `GemfireIndexException` and rethrown. If you wish
-for _Spring Data Geode_ to handle them for you, then you can set either of these `Index` bean definition options.
+{sdg-name}'s default behavior is to fail-fast, always. So, neither `Index` _Exception_ are "`handled`" by default.
+These `Index` exceptions are wrapped in a {sdg-acronym} `GemfireIndexException` and rethrown. If you wish for {sdg-name}
+to handle them for you, you can set either of these `Index` bean definition options to `true`.
-`IgnoreIfExists` always takes *precedence* over `Override`, primarily because it uses less resources given it returns
-the "existing" `Index` in both exceptional cases.
+`IgnoreIfExists` always takes precedence over `Override`, primarily because it uses fewer resources, simply because
+it returns the "`existing`" `Index` in both exceptional cases.
=== `IgnoreIfExists` Behavior
When an `IndexExistsException` is thrown and `ignoreIfExists` is set to `true` (or `<gfe:index ignore-if-exists="true">`),
-then the `Index` that would have been created by this `Index` bean definition / declaration will be "*ignored*",
-and the "existing" `Index` will be returned.
+then the `Index` that would have been created by this `index` bean definition or declaration is simply ignored,
+and the existing `Index` is returned.
-There is very little consequence in returning the "existing" `Index` since the `Index` "definition" is the same,
-as deemed by Geode itself, *not* SDG.
+There is little consequence in returning the existing `Index`, since the `index` bean definition is the same,
+as determined by {data-store-name} itself, not {sdg-acronym}.
-However, this also means that *no* `Index` with the "`name`" specified in your `Index` bean definition / declaration
-will "actually" exist from Geode's perspective either (i.e. with
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/QueryService.html#getIndexes--[QueryService.getIndexes()]).
-Therefore, you should be careful when writing OQL query statements that use _Query Hints_, especially _Hints_ that refer
-to the application `Index` being "*ignored*". Those _Query Hints_ will need to be changed.
+However, this also means that no `Index` with the "`name`" specified in your `index` bean definition or declaration
+actually exists from {data-store-name}'s perspective (that is, with
+{x-data-store-javadoc}/org/apache/geode/cache/query/QueryService.html#getIndexes[`QueryService.getIndexes()`]).
+Therefore, you should be careful when writing OQL query statements that use query hints, especially query hints
+that refer to the application `Index` being ignored. Those query hints need to be changed.
-Now, when an `IndexNameConflictException` is thrown and `ignoreIfExists` is set to `true` (or `<gfe:index ignore-if-exists="true">`),
-then the `Index` that would have been created by this `Index` bean definition / declaration will also be "*ignored*",
-and the "existing" Index will be returned, just like when an `IndexExistsException` is thrown.
+When an `IndexNameConflictException` is thrown and `ignoreIfExists` is set to `true` (or `<gfe:index ignore-if-exists="true">`),
+the `Index` that would have been created by this `index` bean definition or declaration is also ignored,
+and the "existing" `Index` is again returned, as when an `IndexExistsException` is thrown.
-However, there is more risk in returning the "existing" `Index` and "*ignoring*" the application's definition
-of the `Index` when an `IndexNameConflictException` is thrown since, for a `IndexNameConflictException`, while the "names"
-of the conflicting Indexes are the same, the "definitions" could very well be different! This obviously could have
-implications for OQL queries specific to the application, where you would presume the Indexes were defined specifically
-with the application data access patterns and queries in mind. However, if like named Indexes differ in definition,
-this might not be the case. So, make sure you verify.
+However, there is more risk in returning the existing `Index` and ignoring the application's definition of the `Index`
+when an `IndexNameConflictException` is thrown. For a `IndexNameConflictException`, while the names of the conflicting
+indexes are the same, the definitions could be different. This situation could have implications for OQL queries
+specific to the application, where you would presume the indexes were defined specifically with the application
+data access patterns and queries in mind. However, if like-named indexes differ in definition, this might not be
+the case. Consequently, you should verify your `Index` names.
-NOTE: SDG makes a best effort to inform the user when the `Index` being ignored is significantly different
-in its definition from the "existing" `Index`. However, in order for SDG to accomplish this, it must be able to "find"
-the existing `Index`, which is looked up using the Geode API (the only means available).
+NOTE: {sdg-acronym} makes a best effort to inform the user when the `Index` being ignored is significantly different
+in its definition from the existing `Index`. However, in order for {sdg-acronym} to accomplish this, it must be able to
+find the existing `Index`, which is looked up by using the {data-store-name} API (the only means available).
=== `Override` Behavior
-When an `IndexExistsException` is thrown and `override` is set to `true` (or `<gfe:index override="true">`), then
-the `Index` is effectively "_renamed_". Remember, `IndexExistsExceptions` are thrown when multiple Indexes exist,
-all having the same "definition" but different "names".
+When an `IndexExistsException` is thrown and `override` is set to `true` (or `<gfe:index override="true">`),
+the `Index` is effectively renamed. Remember, `IndexExistsExceptions` are thrown when multiple indexes exist that
+have the same definition but different names.
-_Spring Data Geode_ can only accomplish this using Geode's API, by first "_removing_" the "existing" `Index`
-and then "_recreating_" the `Index` with the *new* name. It is possible that either the remove or subsequent
-create invocation could fail. There is no way to execute both actions atomically and rollback this joint operation
-if either fails.
+{sdg-name} can only accomplish this by using {data-store-name}'s API, by first removing the existing `Index`
+and then recreating the `Index` with the new name. It is possible that either the remove or subsequent create invocation
+could fail. There is no way to execute both actions atomically and rollback this joint operation if either fails.
-However, if it succeeds, then you have the same problem as before with the "_ignoreIfExists_" option. Any existing OQL
-query statement using "_Query Hints_" referring to the old `Index` by name must be changed.
+However, if it succeeds, then you have the same problem as before with the `ignoreIfExists` option. Any existing OQL
+query statement using query hints that refer to the old `Index` by name must be changed.
-Now, when an `IndexNameConflictException` is thrown and `override` is set to `true` (or `<gfe:index override="true">`),
-then potentially the "existing" `Index` will be "_re-defined_". I say "potentially", because it is possible for the
-"like-named", "existing" `Index` to have exactly the same definition and name when an `IndexNameConflictException`
-is thrown.
+When an `IndexNameConflictException` is thrown and `override` is set to `true` (or `<gfe:index override="true">`),
+the existing `Index` can potentially be re-defined. We say "`potentially`" because it is possible for the like-named,
+existing `Index` to have exactly the same definition and name when an `IndexNameConflictException` is thrown.
-If so, SDG is *smart* and will just return the "existing" Index as is, even on `override`. There is no harm in this
-since both the "name" and the "definition" are exactly the same. Of course, SDG can only accomplish this when
-SDG is able to "find" the "existing" `Index`, which is dependent on Geode's APIs. If it cannot find it,
-nothing happens and a SDG `GemfireIndexException` is thrown wrapping the `IndexNameConflictException`.
+If so, {sdg-acronym} is smart and returns the existing `Index` as is, even on `override`. There is no harm
+in this behavior, since both the name and the definition are exactly the same. Of course, {sdg-acronym} can only
+accomplish this when {sdg-acronym} is able to find the existing `Index`, which is dependent on {data-store-name}'s APIs.
+If it cannot be found, nothing happens and a {sdg-acronym} `GemfireIndexException` is thrown that wraps the
+`IndexNameConflictException`.
-However, when the "definition" of the "existing" `Index` is different, then SDG will attempt to "_recreate_" the `Index`
-using the `Index` definition specified in the `Index` bean definition /declaration. Make sure this is what you want
-and make sure the `Index` definition matches your expectations and application requirements.
+However, when the definition of the existing `Index` is different, {sdg-acronym} attempts to re-create the `Index`
+by using the `Index` definition specified in the `index` bean definition. Make sure this is what you want and make sure
+the `index` bean definition matches your expectations and application requirements.
-=== How does `IndexNameConflictExceptions` actually happen?
+=== How Does `IndexNameConflictExceptions` Actually Happen?
-It is probably not all that uncommon for `IndexExistsExceptions` to be thrown, especially when
-multiple configuration sources are used to configure Geode (e.g. _Spring Data Geode_, Geode _Cluster Config_,
-maybe Geode native `cache.xml`, the API, etc, etc). You should definitely prefer 1 configuration method here
-and stick with it.
+It is probably not all that uncommon for `IndexExistsExceptions` to be thrown, especially when multiple configuration
+sources are used to configure {data-store-name} ({sdg-name}, {data-store-name} Cluster Config, {data-store-name} native
+`cache.xml`, the API, and so on). You should definitely prefer one configuration method and stick with it.
-_However, when does an `IndexNameConflictException` get thrown?_
+However, when does an `IndexNameConflictException` get thrown?
-One particular case is an `Index` defined on a `PARTITION` _Region_ (PR). When an `Index` is defined on
-a `PARTITION` _Region_ (e.g. "X"), Geode distributes the `Index` definition (and name) to other peer members
-in the cluster that also host the same `PARTITION` _Region_ (i.e. "X"). The distribution of this `Index` definition
-to and subsequent creation of this `Index` by peer members on a "need-to-know" basis (i.e. those hosting the same PR)
-is performed asynchronously.
+One particular case is an `Index` defined on a `PARTITION` Region (PR). When an `Index` is defined on a `PARTITION` Region
+(for example, `X`), {data-store-name} distributes the `Index` definition (and name) to other peer members
+in the cluster that also host the same `PARTITION` Region (that is, "X"). The distribution of this `Index` definition
+to, and subsequent creation of, this `Index` by peer members is on a need-to-know basis (that is, by peer member hosting
+the same PR) is performed asynchronously.
-During this window of time, it is possible that these "pending" PR `Indexes` will not be identifiable by Geode,
-such as with a call to http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/QueryService.html#getIndexes--[QueryService.getIndexes()]
-or with http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/QueryService.html#getIndexes-org.apache.geode.cache.Region-[QueryService.getIndexes(:Region)].
+During this window of time, it is possible that these pending PR `Indexes` cannot be identified by {data-store-name} --
+such as with a call to {x-data-store-javadoc}/org/apache/geode/cache/query/QueryService.html#getIndexes[`QueryService.getIndexes()`]
+with {x-data-store-javadoc}/org/apache/geode/cache/query/QueryService.html#getIndexes-org.apache.geode.cache.Region[`QueryService.getIndexes(:Region)`],
+or even with {x-data-store-javadoc}/org/apache/geode/cache/query/QueryService.html#getIndex-org.apache.geode.cache.Region-java.lang.String[`QueryService.getIndex(:Region, indexName:String)`].
-As such, the only way for SDG or other Geode cache client applications (not involving _Spring_) to know for sure,
-is to just attempt to create the `Index`. If it fails with either an `IndexNameConflictException`,
-or even an `IndexExistsException`, then you will know. This is because the `QueryService` `Index` creation waits on
-"pending" `Index` definitions, where as the other Geode API calls do not.
+As a result, the only way for {sdg-acronym} or other {data-store-name} cache client applications (not involving Spring)
+to know for sure is to attempt to create the `Index`. If it fails with either an `IndexNameConflictException` or even
+an `IndexExistsException`, the application knows there is a problem. This is because the `QueryService` `Index` creation
+waits on pending `Index` definitions, whereas the other {data-store-name} API calls do not.
-In any case, SDG makes a best effort and attempts to inform the user what has or is happening along with
-the corrective action. Given all Geode `QueryService.createIndex(..)` methods are synchronous, "blocking" operations,
-then the state of Geode should be consistent and accessible after either of these Index-type _Exceptions_ are thrown,
-in which case, SDG can inspect the state of the system and respond/act accordingly, based on the user's
-desired configuration.
+In any case, {sdg-acronym} makes a best effort and attempts to inform you what has happened or is happening and tell you
+the corrective action. Given that all {data-store-name} `QueryService.createIndex(..)` methods are synchronous,
+blocking operations, the state of {data-store-name} should be consistent and accessible after either of these index-type
+exceptions are thrown. Consequently, {sdg-acronym} can inspect the state of the system and act accordingly,
+based on your configuration.
-In all other cases, SDG will simply *_fail-fast_*!
+In all other cases, {sdg-acronym} embraces a fail-fast strategy.
diff --git a/src/main/asciidoc/reference/introduction.adoc b/src/main/asciidoc/reference/introduction.adoc
index f9d56c55..4cf08c6d 100644
--- a/src/main/asciidoc/reference/introduction.adoc
+++ b/src/main/asciidoc/reference/introduction.adoc
@@ -1,24 +1,30 @@
[[ref-introduction]]
= Document Structure
-The following chapters explain the core functionality offered by _Spring Data Geode_ for Apache Geode.
+The following chapters explain the core functionality offered by {sdg-name}:
-<> describes the configuration support provided for bootstrapping, configuring, initializing
-and accessing Apache Geode Caches, Regions, and related Distributed System components.
+* <> describes the configuration support provided for configuring, initializing, and accessing
+{data-store-name} Caches, Regions, and related distributed system components.
-<> explains the integration between the Apache Geode APIs and the various data access features
-available in _Spring_, such as transaction management and exception translation.
+* <> explains the integration between the {data-store-name} APIs and the various data access features
+available in Spring, such as template-based data access, exception translation, transaction management, and caching.
-<> describes the enhancements for Apache Geode (de)serialization and management of associated objects.
+* <> describes enhancements to {data-store-name}'s serialization and deserialization of managed objects.
-<> describes persistence mapping for POJOs stored in Apache Geode using _Spring Data_.
+* <> describes persistence mapping for POJOs stored in {data-store-name} using Spring Data.
-<> describes how to create and use _Spring Data Repositories_ to access data in Apache Geode.
+* <> describes how to create and use Spring Data Repositories to access data
+stored in {data-store-name} by using basic CRUD and simple query operations.
-<> describes how to create and use Apache Geode Functions using Annotations.
+* <> describes how to create and use {data-store-name} Functions by using annotations
+to perform distributed computations where the data lives.
-<> describes how to bootstrap a _Spring_ `ApplicationContext` running in an Apache Geode server
-using _Gfsh_.
+* <> describes how to use {data-store-name}'s Continuous Query (CQ) functionality
+to process a stream of events based on interest defined and registered using {data-store-name}'s
+OQL (Object Query Language) query.
-<> describes the examples provided with the distribution to illustrate the various features
-available in _Spring Data Geode_.
+* <> describes how to bootstrap a Spring `ApplicationContext` running in an {data-store-name} server
+using `Gfsh`.
+
+* <> describes the examples provided with the distribution to illustrate the various features
+available in {sdg-name}.
diff --git a/src/main/asciidoc/reference/lucene.adoc b/src/main/asciidoc/reference/lucene.adoc
index d6a2d152..8953676b 100644
--- a/src/main/asciidoc/reference/lucene.adoc
+++ b/src/main/asciidoc/reference/lucene.adoc
@@ -1,16 +1,15 @@
[[bootstrap:lucene]]
= Apache Lucene Integration
-http://geode.apache.org/[Apache Geode] integrates with http://lucene.apache.org/[Apache Lucene] to allow developers
-to index and search on data stored in Apache Geode using Lucene queries. Search-based queries also includes
-the capability to page through query results.
+{x-data-store-website}[{data-store-name}] integrates with http://lucene.apache.org/[Apache Lucene] to let you
+index and search on data stored in {data-store-name} by using Lucene queries. Search-based queries also include
+the ability to page through query results.
-Additionally, _Spring Data for Apache Geode_ adds support for query projections based on _Spring Data Commons_
-Projection infrastructure. This feature enables the query results to be projected into first-class,
-application domain types as needed or required by the application use case.
+Additionally, {sdg-name} adds support for query projections based on the Spring Data Commons projection infrastructure.
+This feature lets the query results be projected into first-class application domain types as needed by the application.
-However, a Lucene `Index` must be created before any Lucene search-based query can be ran. A `LuceneIndex`
-can be created in _Spring (Data for Apache Geode)_ XML config like so...
+A Lucene `Index` must be created before any Lucene search-based query can be run. A `LuceneIndex`
+can be created in Spring (Data for {data-store-name}) XML config as follows:
[source,xml]
----
@@ -18,8 +17,8 @@ can be created in _Spring (Data for Apache Geode)_ XML config like so...
----
Additionally, Apache Lucene allows the specification of
-http://lucene.apache.org/core/6_5_0/core/org/apache/lucene/analysis/Analyzer.html[Analyzers] per field
-and can be configured using...
+http://lucene.apache.org/core/6_5_0/core/org/apache/lucene/analysis/Analyzer.html[analyzers]
+per field and can be configured as shown in the following example:
[source,xml]
----
@@ -37,15 +36,16 @@ and can be configured using...
----
-Of course, the `Map` can be specified as a top-level bean definition and referenced using the `ref` attribute
-in the nested `` element like this, ``.
+The `Map` can be specified as a top-level bean definition and referenced by using the `ref` attribute
+in the nested `` element, as follows:
+``.
-Spring Data for Apache Geode's `LuceneIndexFactoryBean` API and SDG's XML namespace also allows the addition of a
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/lucene/LuceneSerializer.html[`org.apache.geode.cache.lucene.LuceneSerializer`]
-to be specified when creating the `LuceneIndex`. The `LuceneSerializer` is used to configure the way objects
-are converted to Lucene documents for the index when the object is indexed.
+{sdg-name}'s `LuceneIndexFactoryBean` API and {sdg-acronym}'s XML namespace also lets a
+{x-data-store-javadoc}/org/apache/geode/cache/lucene/LuceneSerializer.html[`org.apache.geode.cache.lucene.LuceneSerializer`]
+be specified when you create the `LuceneIndex`. The `LuceneSerializer` lets you configure the way objects are converted
+to Lucene documents for the index when the object is indexed.
-To add an `LuceneSerializer` to the `LuceneIndex`, you only need to...
+The following example shows how to add an `LuceneSerializer` to the `LuceneIndex`:
[source,xml]
----
@@ -56,7 +56,7 @@ To add an `LuceneSerializer` to the `LuceneIndex`, you only need to...
----
-Of course, you may specify the `LuceneSerializer` as a anonymous, nested bean definition as well, like so...
+You can specify the `LuceneSerializer` as an anonymous, nested bean definition as well, as follows:
[source,xml]
----
@@ -67,8 +67,8 @@ Of course, you may specify the `LuceneSerializer` as a anonymous, nested bean de
----
-Alternatively, a developer may declare or define a `LuceneIndex` in Spring Java config,
-inside a `@Configuration` class with...
+Alternatively, you can declare or define a `LuceneIndex` in Spring Java config, inside a `@Configuration` class,
+as the following example shows:
[source,java]
----
@@ -106,41 +106,42 @@ CustomLuceneSerializer myLuceneSerialier() {
}
----
-There are a few limitations of Apache Geode's, Apache Lucene integration and support.
+There are a few limitations of {data-store-name}'s, Apache Lucene integration and support.
-First, a `LuceneIndex` can only be created on an Apache Geode `PARTITION` Region.
+First, a `LuceneIndex` can only be created on a {data-store-name} `PARTITION` Region.
Second, all `LuceneIndexes` must be created before the Region to which the `LuceneIndex` applies.
-NOTE: To help ensure that all declared `LuceneIndexes` defined in a Spring context are created before the Regions
-on which they apply, SDG includes the `org.springframework.data.gemfire.config.support.LuceneIndexRegionBeanFactoryPostProcessor`.
-You may register this Spring https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/config/BeanFactoryPostProcessor.html[`BeanFactoryPostProcessor`]
-in XML config using ``
-The `o.s.d.g.config.support.LuceneIndexRegionBeanFactoryPostProcessor` may only be used when using SDG XML config.
-More details about Spring's `BeanFactoryPostProcessors` can be found https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-factory-extension-factory-postprocessors[here].
+NOTE: To help ensure that all declared `LuceneIndexes` defined in a Spring container are created before the Regions
+on which they apply, {sdg-acronym} includes the `org.springframework.data.gemfire.config.support.LuceneIndexRegionBeanFactoryPostProcessor`.
+You may register this Spring {spring-framework-javadoc}/org/springframework/beans/factory/config/BeanFactoryPostProcessor.html[`BeanFactoryPostProcessor`]
+in XML config by using ``.
+The `o.s.d.g.config.support.LuceneIndexRegionBeanFactoryPostProcessor` may only be used when using {sdg-acronym} XML config.
+More details about Spring's `BeanFactoryPostProcessors` can be found {spring-framework-docs}/core.html#beans-factory-extension-factory-postprocessors[here].
-It is possible that these Apache Geode restrictions will not apply in a future release which is why
-the SDG `LuceneIndexFactoryBean` API takes a reference to the Region directly as well, rather than just the Region path.
+It is possible that these {data-store-name} restrictions will not apply in a future release which is why
+the {sdg-acronym} `LuceneIndexFactoryBean` API takes a reference to the Region directly as well,
+rather than just the Region path.
-This is more ideal if think about the case in which users may want to define a `LuceneIndex` on an existing Region
-with data at a later point during the application's lifecycle and as requirements demand. Where possible, SDG strives
-to adhere to strongly-typed objects. However, for the time being, you must use the `regionPath` property
-to specify the Region to which the `LuceneIndex` will be applied.
+This is more ideal when you want to define a `LuceneIndex` on an existing Region with data at a later point
+during the application's lifecycle and as requirements demand. Where possible, {sdg-acronym} strives to adhere to
+strongly-typed objects. However, for the time being, you must use the `regionPath` property to specify the Region
+to which the `LuceneIndex` is applied.
-NOTE: Additional, in the example above, you will notice the presence of Spring's `@DependsOn` annotation
-on the "Books" Region bean definition. This is used to create a dependency from the "Books" Region bean
-to the "bookTitleIndex" LuceneIndex bean definition ensuring that the `LuceneIndex` will be created before
-the Region on which it applies.
+NOTE: Additionally, in the preceding example, note the presence of Spring's `@DependsOn` annotation
+on the `Books` Region bean definition. This creates a dependency from the `Books` Region bean to the `bookTitleIndex`
+`LuceneIndex` bean definition, ensuring that the `LuceneIndex` is created before the Region on which it applies.
-Now that we have a `LuceneIndex` we can perform Lucene based data access operations, such as queries.
+Now that once we have a `LuceneIndex`, we can perform Lucene-based data access operations, such as queries.
== Lucene Template Data Accessors
-_Spring Data for Apache Geode_ provides 2 primary templates for Lucene data access operations, depending on
-how low of a level your application is prepared to deal with.
+{sdg-name} provides two primary templates for Lucene data access operations, depending on how low of a level
+your application is prepared to deal with.
-The `LuceneOperations` interface defines query operations using Apache Geode
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/lucene/package-frame.html[Lucene types].
+The `LuceneOperations` interface defines query operations by using {data-store-name}
+{x-data-store-javadoc}/org/apache/geode/cache/lucene/package-summary.html[Lucene types],
+which are defined in the following interface definition:
[source,java]
----
@@ -170,19 +171,20 @@ public interface LuceneOperations {
NOTE: The `[, int resultLimit]` indicates that the `resultLimit` parameter is optional.
-The operations in the `LuceneOperations` interface match the operations provided by the Apache Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/lucene/LuceneQuery.html[LuceneQuery] interface.
-However, SDG has the added value of translating proprietary Apache Geode or Apache Lucene `Exceptions`
-into _Spring's_ highly consistent and expressive DAO
-http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#dao-exceptions[Exception Hierarchy],
-particularly as many modern data access operations involve more than single store or repository.
+The operations in the `LuceneOperations` interface match the operations provided by the {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/cache/lucene/LuceneQuery.html[LuceneQuery] interface.
+However, {sdg-acronym} has the added value of translating proprietary {data-store-name} or Apache Lucene `Exceptions`
+into Spring's highly consistent and expressive DAO
+http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#dao-exceptions[exception hierarchy],
+particularly as many modern data access operations involve more than one store or repository.
-Additionally, SDG's `LuceneOperations` interface can shield your application from interface breaking changes
-introduced by the underlying Apache Geode or Apache Lucene APIs when they do and will occur.
+Additionally, {sdg-acronym}'s `LuceneOperations` interface can shield your application from interface-breaking changes
+introduced by the underlying {data-store-name} or Apache Lucene APIs when they occur.
-However, it would be remorse to only offer a Lucene Data Access Object (DAO) that only uses Apache Geode
-and Apache Lucene data types (e.g. Apache Geode's `LuceneResultStruct`), therefore SDG gives you the
-`ProjectingLuceneOperations` interface to remedy these important application concerns.
+However, it would be sad to offer a Lucene Data Access Object (DAO) that only uses {data-store-name} and Apache Lucene
+data types (such as {data-store-name}'s `LuceneResultStruct`). Therefore, {sdg-acronym} gives you the
+`ProjectingLuceneOperations` interface to remedy these important application concerns. The following listing shows
+the `ProjectingLuceneOperations` interface definition:
[source,java]
----
@@ -198,15 +200,15 @@ public interface ProjectingLuceneOperations {
}
----
-The `ProjectingLuceneOperations` interface primarily uses application domain object types allowing you to work with
-your application data. The `query` method variants accept a projection type and the template applies the query results
-to instances of the given projection type using the _Spring Data Commons_ Projection infrastructure.
+The `ProjectingLuceneOperations` interface primarily uses application domain object types that let you work with
+your application data. The `query` method variants accept a projection type, and the template applies the query results
+to instances of the given projection type by using the Spring Data Commons Projection infrastructure.
-Additionally, the template wraps the paged Lucene query results in an instance of the _Spring Data Commons_
-`Page` abstraction. The same projection logic can still be applied to the results in the page and are lazily projected
+Additionally, the template wraps the paged Lucene query results in an instance of the Spring Data Commons
+`Page` abstraction. The same projection logic can still be applied to the results in the page and are lazily projected
as each page in the collection is accessed.
-By way of example, suppose I have a class representing a `Person` like so...
+By way of example, suppose you have a class representing a `Person`, as follows:
[source,java]
----
@@ -227,7 +229,8 @@ class Person {
}
----
-Additionally, I might have a single interface to represent people as `Customers` depending on my application view...
+Additionally, you might have a single interface to represent people as `Customers`, depending on your application view,
+as follows:
[source,java]
----
@@ -256,48 +259,47 @@ LuceneIndexFactoryBean personLastNameIndex(GemFireCache gemfireCache) {
}
----
-Then it is a simple matter to query for people as either `Person` objects...
+Then you could query for people as `Person` objects, as follows:
[source,java]
----
List people = luceneTemplate.query("lastName: D*", "lastName", Person.class);
----
-Or as a `Page` of type `Customer`...
+Alternatively, you could query for a `Page` of type `Customer`, as follows:
[source,java]
----
Page customers = luceneTemplate.query("lastName: D*", "lastName", 100, 20, Customer.class);
----
-The `Page` can then be used to fetch individual pages of the results...
+The `Page` can then be used to fetch individual pages of the results, as follows:
[source,java]
----
List firstPage = customers.getContent();
----
-Conveniently, the _Spring Data Commons_ `Page` interface implements `java.lang.Iterable` too making it very easy
+Conveniently, the Spring Data Commons `Page` interface also implements `java.lang.Iterable`, making it easy
to iterate over the contents.
-The only restriction to the _Spring Data Commons_ Projection infrastructure is that the projection type
-must be an interface. However, it is possible to extend the provided, out-of-the-box (OOTB)
-SDC Projection infrastructure and provide a custom
-http://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/projection/ProjectionFactory.html[ProjectionFactory]
+The only restriction to the Spring Data Commons Projection infrastructure is that the projection type must be
+an interface. However, it is possible to extend the provided SDC Projection infrastructure and provide a custom
+http://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/projection/ProjectionFactory.html[`ProjectionFactory`]
that uses https://github.com/cglib/cglib[CGLIB] to generate proxy classes as the projected entity.
-A custom `ProjectionFactory` can be set on a Lucene template using `setProjectionFactory(:ProjectionFactory)`.
+You can use `setProjectionFactory(:ProjectionFactory)` to set a custom `ProjectionFactory` on a Lucene template.
-== Annotation configuration support
+== Annotation Configuration Support
-Finally, _Spring Data for Apache Geode_ provides Annotation configuration support for `LuceneIndexes`.
-Eventually, the SDG Lucene support will find its way into the _Repository_ infrastructure extension for Apache Geode
-so that Lucene queries can be expressed as methods on an application `Repository` interface, much like the
-http://docs.spring.io/spring-data-gemfire/docs/current/reference/html/#gemfire-repositories.executing-queries[OQL support]
-today.
+Finally, {sdg-name} provides annotation configuration support for `LuceneIndexes`.
+
+Eventually, the {sdg-acronym} Lucene support will finds its way into the Repository infrastructure extension for
+{data-store-name} so that Lucene queries can be expressed as methods on an application `Repository` interface,
+in much the same way as the <> works today.
However, in the meantime, if you want to conveniently express `LuceneIndexes`, you can do so directly on
-your application domain objects like so...
+your application domain objects, as the following example shows:
[source,java]
----
@@ -318,8 +320,8 @@ class Person {
}
----
-You must use SDG's Annotation configuration support along with the `@EnableEntityDefineRegions` and `@EnableIndexing`
-Annotations to enable this feature...
+To enable this feature, you must use {sdg-acronym}'s annotation configuration support specifically with the
+`@EnableEntityDefineRegions` and `@EnableIndexing` annotations, as follows:
[source,java]
----
@@ -332,12 +334,9 @@ class ApplicationConfiguration {
}
----
-NOTE: Keep in mind that `LuceneIndexes` can only be created on Apache Geode Servers since `LuceneIndexes` only apply
-to `PARTTION` Regions.
+NOTE: `LuceneIndexes` can only be created on {data-store-name} servers since `LuceneIndexes` only apply
+to `PARTITION` Regions.
-Given our definition of the `Person` class above, the SDG Annotation configuration support
-will find the `Person` entity class definition, determine that people will be stored in
-a `PARTITION` Region called "People" and that the `Person` will have an OQL `Index` on `birthDate`
-along with a `LuceneIndex` on `lastName`.
-
-More will be described with this feature in subsequent releases.
+Given our earlier definition of the `Person` class, the {sdg-acronym} annotation configuration support finds
+the `Person` entity class definition and determines that people are stored in a `PARTITION` Region called "`People`"
+ and that the `Person` has an OQL `Index` on `birthDate` along with a `LuceneIndex` on `lastName`.
diff --git a/src/main/asciidoc/reference/mapping.adoc b/src/main/asciidoc/reference/mapping.adoc
index efc74e9d..f822a1cd 100644
--- a/src/main/asciidoc/reference/mapping.adoc
+++ b/src/main/asciidoc/reference/mapping.adoc
@@ -1,15 +1,19 @@
[[mapping]]
-= POJO mapping
+= POJO Mapping
+
+This section covers:
+
+* <>
+* <>
+* The <>
[[mapping.entities]]
== Entity Mapping
-_Spring Data for Apache Geode_ provides support to map entities that will be stored in a Region
-in the Geode In-Memory Data Grid.
+{sdg-name} provides support to map entities that are stored in a Region. The mapping metadata is defined by
+using annotations on application domain classes, as the following example shows:
-The mapping metadata is defined using annotations on application domain classes just like this:
-
-.Mapping a domain class to a Geode Region
+.Mapping a domain class to a {data-store-name} Region
====
[source,java]
----
@@ -31,16 +35,14 @@ public class Person {
----
====
-The first thing you notice here is the `@Region` annotation that can be used to customize the Region
-in which an instance of the `Person` class is stored. The `@Id` annotation can be used to annotate the property
-that shall be used as the cache (Region) key, identifying the Region entry. The `@PersistenceConstructor` annotation
-helps to disambiguate multiple, potentially available constructors taking parameters and explicitly marking
-the constructor annotated as the constructor to be used to construct entities. In an application domain class with no
-or only a single constructor you can omit the annotation.
+The `@Region` annotation can be used to customize the Region in which an instance of the `Person` class is stored.
+The `@Id` annotation can be used to annotate the property that should be used as the cache Region key, identifying
+the Region entry. The `@PersistenceConstructor` annotation helps to disambiguate multiple potentially available
+constructors, taking parameters and explicitly marking the constructor annotated as the constructor to be used to
+construct entities. In an application domain class with no or only a single constructor, you can omit the annotation.
-In addition to storing entities in top-level Regions, entities can be stored in Sub-Regions as well.
-
-For instance:
+In addition to storing entities in top-level Regions, entities can be stored in Sub-Regions as well,
+as the following example shows:
[source,java]
----
@@ -55,39 +57,37 @@ public class Guest extends User {
}
----
-Be sure to use the full-path of the Geode Region, as defined with the _Spring Data Geode_ XML namespace
-using the `id` or `name` attributes of the `<*-region>` element.
+Be sure to use the full path of the {data-store-name} Region, as defined with the {sdg-name} XML namespace
+by using the `id` or `name` attributes of the `<*-region>` element.
[[mapping.entities.region]]
=== Entity Mapping by Region Type
-In addition to the `@Region` annotation, _Spring Data Geode_ also recognizes the Region type-specific
-mapping annotations: `@ClientRegion`, `@LocalRegion`, `@PartitionRegion` and `@ReplicateRegion`.
+In addition to the `@Region` annotation, {sdg-name} also recognizes type-specific Region mapping annotations:
+`@ClientRegion`, `@LocalRegion`, `@PartitionRegion`, and `@ReplicateRegion`.
-Functionally, these annotations are treated exactly the same as the generic `@Region` annotation in the SDG
-mapping infrastructure. However, these additional mapping annotations are useful in _Spring Data Geode's`
-Annotation configuration model. When combined with the `@EnableEntityDefinedRegions` configuration annotation
-on _Spring_ `@Configuration` annotated class, it is possible to generate Regions in the local cache, whether
+Functionally, these annotations are treated exactly the same as the generic `@Region` annotation in the {sdg-acronym}
+mapping infrastructure. However, these additional mapping annotations are useful in {sdg-name}'s
+annotation configuration model. When combined with the `@EnableEntityDefinedRegions` configuration annotation
+on a Spring `@Configuration` annotated class, it is possible to generate Regions in the local cache, whether
the application is a client or peer.
-These annotations allow you, the developer, to be more specific about what type of Region that your application
-entity class should be mapped to, and also has an impact on the data management policies of the Region
-(e.g. partition (a.k.a. sharding) vs. just replicating data).
+These annotations let you be more specific about what type of Region your application entity class should be mapped to
+and also has an impact on the data management policies of the Region (for example, partition -- also known as sharding
+-- versus replicating data).
-Using these Region type-specific mapping annotations with the SDG Annotation config model saves you from having to
-explicitly define these Regions in config.
-
-The details of the new Annotation configuration model will be discussed in more detail in a subsequent releaase.
+Using these type-specific Region mapping annotations with the {sdg-acronym} annotation configuration model saves you
+from having to explicitly define these Regions in configuration.
[[mapping.repositories]]
-=== Repository Mapping
+== Repository Mapping
-As an alternative to specifying the Region in which the entity will be stored using the `@Region` annotation
-on the entity class, you can also specify the `@Region` annotation on the entity's `Repository`.
+As an alternative to specifying the Region in which the entity is stored by using the `@Region` annotation
+on the entity class, you can also specify the `@Region` annotation on the entity's `Repository` interface.
See <> for more details.
-However, let's say you want to store a `Person` in multiple Geode Regions (e.g. `People` and `Customers`),
-then you can define your corresponding `Repository` interface extensions like so:
+However, suppose you want to store a `Person` record in multiple {data-store-name} Regions (for example, `People`
+and `Customers`). Then you can define your corresponding `Repository` interface extensions as follows:
[source,java]
----
@@ -102,7 +102,8 @@ public interface CustomerRepository extends GemfireRepository {
}
----
-Then, using each Repository individually, you can store the entity in multiple Geode Regions.
+Then, using each Repository individually, you can store the entity in multiple {data-store-name} Regions,
+as the following example shows:
[source,java]
----
@@ -120,24 +121,24 @@ class CustomerService {
}
----
-It is not difficult to imagine wrapping the `update` service method in a _Spring_ managed transaction,
-either as a local cache transaction or a global transaction.
+You can even wrap the `update` service method in a Spring managed transaction, either as a local cache transaction
+or a global transaction.
[[mapping.pdx-serializer]]
== Mapping PDX Serializer
-_Spring Data for Apache Geode_ provides a custom
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/PdxSerializer.html[PdxSerializer] implementation
-that uses the mapping information to customize entity serialization.
+{sdg-name} provides a custom {x-data-store-javadoc}/org/apache/geode/pdx/PdxSerializer.html[`PdxSerializer`]
+implementation that uses the mapping information to customize entity serialization.
-Beyond that, it also allows customizing entity instantiation by using the Spring Data `EntityInstantiator` abstraction.
-By default, the serializer uses a `ReflectionEntityInstantiator` that will use the persistence constructor of
-the mapped entity (either the default constructor, a singly declared constructor or an explicitly annotated constructor
-annotated with the `@PersistenceConstructor` annotation).
+It also lets you customize entity instantiation by using the Spring Data `EntityInstantiator` abstraction.
+By default, the serializer uses a `ReflectionEntityInstantiator` that uses the persistence constructor of
+the mapped entity (the default constructor, a singly declared constructor, or a constructor explicitly
+annotated with `@PersistenceConstructor`).
-To provide arguments for constructor parameters, the serializer will read fields with the named constructor parameter,
+To provide arguments for constructor parameters, the serializer reads fields with the named constructor parameter,
explicitly specified using Spring's `@Value` annotation, from the supplied
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/PdxReader.html[PdxReader].
+{x-data-store-javadoc}/org/apache/geode/pdx/PdxReader.html[`PdxReader`],
+as shown in the following example:
.Using `@Value` on entity constructor parameters
====
@@ -145,29 +146,30 @@ http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/PdxReader.h
----
public class Person {
- public Person(@Value("#root.foo") String firstName, @Value("bean") String lastName) {
+ public Person(@Value("#root.thing") String firstName, @Value("bean") String lastName) {
// …
}
}
----
====
-An entity class annotated in this way will have the field `foo` read from the `PdxReader` and passed as the value
-for the constructor parameter, `firstname`. The value for `lastName` will be a _Spring_ bean with the name `bean`.
+An entity class annotated in this way has the `thing` field read from the `PdxReader` and passed as the value
+for the constructor parameter, `firstname`. The value for `lastName` is a Spring bean with the name "`bean`".
-In addition to the custom instantiation logic and strategy provided by `EntityInstantiators`
-the `MappingPdxSerializer` also provides capabilities above and beyond even Apache Geode's own
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[`ReflectionBasedAutoSerializer`].
+In addition to the custom instantiation logic and strategy provided by `EntityInstantiators`,
+the `MappingPdxSerializer` also provides capabilities well beyond {data-store-name}'s own
+{x-data-store-javadoc}/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[`ReflectionBasedAutoSerializer`].
-While Apache Geode's `ReflectionBasedAutoSerializer` conveniently uses Java Reflection to populate entities as well as
-use _Regular Expressions_ to identify types that should be handled (de/serialized) by the `ReflectionBasedAutoSerializer`,
-it cannot, unlike `MappingPdxSerializer`, perform the following:
+While {data-store-name}'s `ReflectionBasedAutoSerializer` conveniently uses Java reflection to populate entities
+and uses regular expressions to identify types that should be handled (serialized and deserialized) by
+the `ReflectionBasedAutoSerializer`, it cannot, unlike `MappingPdxSerializer`, perform the following:
-1. Register custom `PdxSerializer` objects per entity field/property names and/or types.
-2. Conveniently identifies ID properties.
-3. Automatically handles *read-only* properties.
-4. Automatically handles *transient* properties.
-5. Allows more robust *type filtering* in a `null`-safe manner (e.g. not limited to only expressing types via Regex).
+* Register custom `PdxSerializer` objects per entity field and property names and types.
+* Conveniently identifies ID properties.
+* Automatically handles read-only properties.
+* Automatically handles transient properties.
+* Allows more robust type filtering in a `null`-safe manner (for example, not limited to
+only expressing types using regex).
We now explore each feature of the `MappingPdxSerializer` in a bit more detail.
@@ -175,9 +177,9 @@ We now explore each feature of the `MappingPdxSerializer` in a bit more detail.
=== Custom PdxSerializer Registration
The `MappingPdxSerializer` gives you the ability to register custom `PdxSerializers` based on an entity's
-field/property names and/or types.
+field and property names and types.
-For instance, suppose you have defined an entity type modeling a `User` as...
+For instance, suppose you have defined an entity type modeling a `User` as follows:
[source,java]
----
@@ -193,12 +195,12 @@ public class User {
}
----
-While the `User's` "name" probably does not require any special logic to serialize the value for name, serializing
-the `Password` might require additional logic in order to handle the sensitive nature of the field or property.
+While the user's name probably does not require any special logic to serialize the value, serializing the password
+might require additional logic to handle the sensitive nature of the field or property.
Perhaps you want to protect the password when sending the value over the network, between a client and a server,
-and you only want to store the _Salted Hash_. When using the `MappingPdxSerializer` you can register
-a custom `PdxSerializer` to handle the `User's` `Password`, like so...
+and you only want to store the salted hash. When using the `MappingPdxSerializer`, you can register
+a custom `PdxSerializer` to handle the user's password, as follows:
.Registering custom `PdxSerializers` by POJO field/property type
====
@@ -212,12 +214,12 @@ mappingPdxSerializer.setCustomPdxSerializers(customPdxSerializers);
----
After registering the application-defined `SaltedHashPasswordPdxSerializer` instance with the `Password`
-application domain model type, the `MappingPdxSerializer` will consult the custom `PdxSerializer` to
-de/serialize *all* `Password` objects regardless of the containing object (e.g. `User`).
+application domain model type, the `MappingPdxSerializer` consults the custom `PdxSerializer` to serialize
+and deserialize all `Password` objects regardless of the containing object (for example, `User`).
-However, suppose you only want to customize the serialization of `Passwords` on `User` objects, specifically.
-Then, you can register the custom `PdxSerializer` for the `User` type only by specifying the fully-qualified
-name of the `Class's` field/property. For example:
+However, suppose you want to customize the serialization of only `Passwords` on `User` objects.
+To do so, you can register the custom `PdxSerializer` for the `User` type by specifying the fully qualified name
+of the `Class's` field or property, as the following example shows:
.Registering custom `PdxSerializers` by POJO field/property name
====
@@ -230,20 +232,20 @@ customPdxSerializers.put("example.app.auth.model.User.password", new SaltedHashP
mappingPdxSerializer.setCustomPdxSerializers(customPdxSerializers);
----
-Notice the use of the fully-qualified field/propety name (i.e. "example.app.auth.model.User.password")
+Notice the use of the fully-qualified field or property name (that is `example.app.auth.model.User.password`)
as the custom `PdxSerializer` registration key.
-NOTE: You could construct the registration key using a more logical code snippet, such as:
-`User.class.getName().concat(".password");` This is recommended over the example shown above. The example was simply
-trying to be very explicit in the semantics of registration.
+NOTE: You could construct the registration key by using a more logical code snippet, such as the following:
+`User.class.getName().concat(".password");`. We recommended this over the example shown earlier.
+The preceding example tried to be as explicit as possible about the semantics of registration.
[[mapping.pdx-serializer.id-properties]]
=== Mapping ID Properties
-Like Apache Geode's `ReflectionBasedAutoSerializer`, SDG's `MappingPdxSerializer` is also able to determine
-the identifier of the entity. However, `MappingPdxSerializer` does so by using Spring Data's mapping meta-data,
-specifically by finding the entity property designated as the identifier using the
-https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/annotation/Id.html[`@Id`] Spring Data annotation.
+Like {data-store-name}'s `ReflectionBasedAutoSerializer`, {sdg-acronym}'s `MappingPdxSerializer` is also able to
+determine the identifier of the entity. However, `MappingPdxSerializer` does so by using Spring Data's mapping metadata,
+specifically by finding the entity property designated as the identifier using Spring Data's
+{spring-data-commons-javadoc}/org/springframework/data/annotation/Id.html[`@Id`] annotation.
For example:
@@ -258,8 +260,8 @@ class Customer {
}
----
-In this case, the `Customer's` `id` field will be marked as the identifier field in the PDX type meta-data using
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/PdxWriter.html#markIdentityField-java.lang.String-[`PdxWriter.markIdentifierField(:String)`]
+In this case, the `Customer` `id` field is marked as the identifier field in the PDX type metadata by using
+{x-data-store-javadoc}/org/apache/geode/pdx/PdxWriter.html#markIdentityField-java.lang.String-[`PdxWriter.markIdentifierField(:String)`]
when the `PdxSerializer.toData(..)` method is called during serialization.
[[mapping.pdx-serializer.read-only-properties]]
@@ -267,8 +269,9 @@ when the `PdxSerializer.toData(..)` method is called during serialization.
What happens when your entity defines a read-only property?
-First, it is important to understand what a "read-only" property is. If you define a POJO following the http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html[JavaBeans]
-specification (as Spring does), and you have defined a POJO with some read-only property as follows:
+First, it is important to understand what a "`read-only`" property is. If you define a POJO by following the
+http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html[JavaBeans]specification (as Spring does),
+you might define a POJO with a read-only property, as follows:
[source,java]
----
@@ -286,33 +289,33 @@ class ApplicationDomainType {
}
----
-Then the `readOnly` property is "read-only" because it does not provide a setter method; it only has a getter method.
-In this case, the `readOnly` property (not to be confused with the `readOnly` `DomainType` field)
-is considered "read-only".
+The `readOnly` property is "`read-only`" because it does not provide a setter method. It has only a getter method.
+In this case, the `readOnly` property (not to be confused with the `readOnly` `DomainType` field) is considered
+"`read-only`".
-As such, the `MappingPdxSerializer` will not try to write this value back when populating the instance of `DomainType`
-in the `PdxSerializer.fromData(:Class>, :PdxReader)` method.
+As a result, the `MappingPdxSerializer` does not try to write this value back when populating an instance of
+`DomainType` in the `PdxSerializer.fromData(:Class>, :PdxReader)` method.
This is useful in situations where you might be returning a view or projection of some entity type and you only want
-to write state that is writable. Perhaps the view or projection of the entity is based on authorization or some other
-criteria. The point is, you can leverage this feature as is appropriate for your application use cases and requirements.
-If you want the field/property to always be written then simply define a setter.
+to write state that is writable. Perhaps the view or projection of the entity is based on authorization or some other
+criteria. The point is that you can leverage this feature as is appropriate for your application's use cases
+and requirements. If you want the field or property to always be written, you can define a setter.
[[mapping.pdx-serializer.transient-properties]]
=== Mapping Transient Properties
Likewise, what happens when your entity defines `transient` properties?
-You would expect the `transient` fields/properties of your entity not to be serialized to the stream of PDX bytes
-when serializing entity. And, that is exactly what happens, unlike Apache Geode's own
-`ReflectionBasedAutoSerializer`, which serializes everything accessible from the object via _Java Reflection_.
+You would expect the `transient` fields or properties of your entity not to be serialized to the stream of PDX bytes
+when serializing the entity. That is exactly what happens, unlike {data-store-name}'s own `ReflectionBasedAutoSerializer`,
+which serializes everything accessible from the object through Java reflection.
-The `MappingPdxSerializer` will not serialize any fields or properties which are qualified as transient either using
-Java's `transient` keyword (in the case of fields) or when using the
-https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/annotation/Transient.html[`@Transient`]
+The `MappingPdxSerializer` does not serialize any fields or properties that are qualified as being transient either
+by using Java's `transient` keyword (in the case of fields) or by using the
+{spring-data-commons-javadoc}/org/springframework/data/annotation/Transient.html[`@Transient`]
Spring Data annotation on either fields or properties.
-For example, if you defined an enity with transient fields and properties, like so...
+For example, you might define an entity with transient fields and properties as follows:
[source,java]
----
@@ -337,45 +340,43 @@ class Process {
}
----
-Neither the `Process` `id` field nor the readable `hostname` property will be written to the PDX serialized bytes.
+Neither the `Process` `id` field nor the readable `hostname` property are written to the PDX serialized bytes.
[[mapping.pdx-serializer.type-filtering]]
=== Filtering by Class types
-Similar to Apache Geode's `ReflectionBasedAutoSerializer`, SDG's `MappingPdxSerializer` allows a user to filter
-the types of objects that the `MappingPdxSerializer` will handle, i.e. de/serialize.
+Similar to {data-store-name}'s `ReflectionBasedAutoSerializer`, {sdg-acronym}'s `MappingPdxSerializer` lets you filter
+the types of objects that the `MappingPdxSerializer` serializes and deserializes.
-However, unlike Apache Geode's `ReflectionBasedAutoSerializer`, which uses complex _Regular Expressions_ to express
-which types the serializer will handle, SDG's `MappingPdxSerializer` uses the much more robust
+However, unlike {data-store-name}'s `ReflectionBasedAutoSerializer`, which uses complex regular expressions to express
+which types the serializer handles, {sdg-acronym}'s `MappingPdxSerializer` uses the much more robust
https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html[`java.util.function.Predicate`] interface
-and API to express type matching criteria.
+and API to express type-matching criteria.
-Plus, if you feel strongly about using _Regular Expressions_, then you can always implement a `Predicate` using
-_Java's_ https://docs.oracle.com/javase/8/docs/api/java/util/regex/package-summary.html[_Regular Expression_ support].
+If you like to use regular expressions, you can implement a `Predicate` by using
+Java's https://docs.oracle.com/javase/8/docs/api/java/util/regex/package-summary.html[regular expression support].
-The nice part about Java's `Predicate` interface is that you can compose `Predicates` using the convenient
-and appropriate API:
+The nice part about Java's `Predicate` interface is that you can compose `Predicates` by using convenient
+and appropriate API methods, including:
https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html#and-java.util.function.Predicate-[`and(:Predicate)`],
-https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html#or-java.util.function.Predicate-[`or(:Predicate)`]
+https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html#or-java.util.function.Predicate-[`or(:Predicate)`],
and https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html#negate--[`negate()`].
-For example:
+The following example shows the `Predicate` API in use:
[source,java]
----
+Predicate> customerTypes =
+ type -> Customer.class.getPackage().getName().startsWith(type.getName());
- Predicate> customerTypes =
- type -> Customer.class.getPackage().getName().startsWith(type.getName());
-
- Predicate typeFilters = customerTypes
- .or(type -> User.class.isAssignble(type)) // Include User sub-types (e.g. Admin, Guest, etc)
- .and(type -> !Reference.class.getPackage(type.getPackage()); // Exclude all Reference types
-
- mappingPdxSerializer.setTypeFilters(typeFilters);
+Predicate typeFilters = customerTypes
+ .or(type -> User.class.isAssignble(type)) // Include User sub-types (e.g. Admin, Guest, etc)
+ .and(type -> !Reference.class.getPackage(type.getPackage()); // Exclude all Reference types
+mappingPdxSerializer.setTypeFilters(typeFilters);
----
NOTE: In addition to setting your own type filtering `Predicates`, SDG's `MappingPdxSerializer` now automatically
-registers pre-canned `Predicates` that filters types from the `org.apache.geode` package along with `null` objects
+registers pre-defined `Predicates` that filter types from the `org.apache.geode` package along with `null` objects
when calling `PdxSerializer.toData(:Object, :PdxWriter)` or `null` `Class` types when calling
`PdxSerializer.fromData(:Class>, :PdxReader)` methods.
diff --git a/src/main/asciidoc/reference/region.adoc b/src/main/asciidoc/reference/region.adoc
index 8ac2c32f..1458652e 100644
--- a/src/main/asciidoc/reference/region.adoc
+++ b/src/main/asciidoc/reference/region.adoc
@@ -6,12 +6,13 @@ extending `java.util.Map` and enables basic data access using familiar key-value
is wired into application classes that require it so the actual Region type is decoupled from the programming model.
Typically, each Region is associated with one domain object, similar to a table in a relational database.
-Geode implements the following types of Regions:
+{data-store-name} implements the following types of Regions:
-* *REPLICATE* - Data is replicated across all cache members that define the Region. This provides very high
-read performance but writes take longer to perform the replication.
-* *PARTITION* - Data is partitioned into buckets (sharded) among cache members that define the Region. This provides
-high read and write performance and is suitable for large data sets that are too big for a single node.
+* *REPLICATE* - Data is replicated across all cache members in the cluster that define the Region. This provides
+very high read performance but writes take longer to perform the replication.
+* *PARTITION* - Data is partitioned into buckets (sharded) among many cache members in the cluster that define
+the Region. This provides high read and write performance and is suitable for large data sets that are too big
+for a single node.
* *LOCAL* - Data only exists on the local node.
* *Client* - Technically, a client Region is a LOCAL Region that acts as a PROXY to a REPLICATE or PARTITION Region
hosted on cache servers in a cluster. It may hold data created or fetched locally. Alternately, it can be empty.
@@ -19,13 +20,13 @@ Local updates are synchronized to the cache server. Also, a client Region may su
stay up-to-date (synchronized) with changes originating from remote processes that access the same server Region.
For more information about the various Region types and their capabilities as well as configuration options,
-please refer to Apache Geode's documentation on
-http://geode.apache.org/docs/guide/11/developing/region_options/region_types.html[Region Types].
+please refer to {data-store-name}'s documentation on
+{x-data-store-docs}/developing/region_options/region_types.html[Region Types].
[[bootstrap:region:lookup]]
== Using an externally configured Region
-To reference Regions already configured in a Geode native `cache.xml` file, use the `lookup-region` element.
+To reference Regions already configured in a {data-store-name} native `cache.xml` file, use the `lookup-region` element.
Simply declare the target Region name with the `name` attribute. For example, to declare a bean definition identified
as `ordersRegion` for an existing Region named `Orders`, you can use the following bean definition:
@@ -34,8 +35,7 @@ as `ordersRegion` for an existing Region named `Orders`, you can use the followi
----
-If `name` is not specified, the bean's `id` will be used as the name of the Region.
-The example above becomes:
+If `name` is not specified, the bean's `id` will be used as the name of the Region. The example above becomes:
[source,xml]
----
@@ -55,24 +55,24 @@ was used. Alternately, one can reference the cache bean with the `cache-ref` att
----
-`lookup-region` provides a simple way of retrieving existing, pre-configured Regions without exposing
-the Region semantics or setup infrastructure.
+`lookup-region` lets you retrieve existing, pre-configured Regions without exposing the Region semantics
+or setup infrastructure.
[[bootstrap:region:lookup:auto]]
== Auto Region Lookup
-"auto-lookup" allows all Regions defined in a Geode native `cache.xml` file to be imported into a _Spring_
-application context when using the`cache-xml-location` attribute on the `` element.
+"`auto-lookup`" lets you import all Regions defined in a {data-store-name} native `cache.xml` file into
+a Spring `ApplicationContext` when you use the `cache-xml-location` attribute on the `` element.
-For instance, given a `cache.xml` file of...
+For instance, consider the following `cache.xml` file:
[source,xml]
----
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+ version="1.0">
@@ -81,32 +81,32 @@ For instance, given a `cache.xml` file of...
----
-A developer may import the `cache.xml` file as follows...
+You can import the preceding `cache.xml` file as follows:
[source,xml]
----
----
-The developer may then use the `` element (e.g. ``) to reference
-specific Regions as beans in the _Spring_ context, or the user may choose to import all Regions defined in `cache.xml`
-with:
+You can then use the `` element (for example, ``) to reference
+specific Regions as beans in the Spring container, or you can choose to import all Regions defined in `cache.xml`
+by using the following:
[source,xml]
----
----
-_Spring Data Geode_ will automatically create beans for all Geode Regions defined in `cache.xml` that have not been
-explicitly added to the _Spring_ context with explicit `` bean declarations.
+{sdg-name} automatically creates beans for all {data-store-name} Regions defined in `cache.xml` that have not been
+explicitly added to the Spring container with explicit `` bean declarations.
-It is important to realize that _Spring Data Geode_ uses a _Spring_
-http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/config/BeanPostProcessor.html[BeanPostProcessor]
-to post process the cache after it is both created and initialized to determine the Regions defined in Geode to add
-as beans in the _Spring_ application context.
+It is important to realize that {sdg-name} uses a Spring
+{spring-framework-javadoc}/org/springframework/beans/factory/config/BeanPostProcessor.html[BeanPostProcessor]
+to post-process the cache after it is both created and initialized to determine the Regions defined in {data-store-name}
+to add as beans in the Spring `ApplicationContext`.
-You may inject these "auto-looked-up" Regions like any other bean defined in the _Spring_ application context with
-1 exception; you may need to define a `depends-on` association with the '`gemfireCache`' bean as follows...
+You may inject these "`auto-looked-up`" Regions as you would any other bean defined in the Spring `ApplicationContext`,
+with one exception: You may need to define a `depends-on` association with the '`gemfireCache`' bean, as follows:
[source,java]
----
@@ -128,35 +128,35 @@ public class ApplicationDao extends DaoSupport {
}
----
-The example above is applicable when using _Spring's_ `component-scan` functionality.
+The preceding example only applies when you use Spring's `component-scan` functionality.
-If you are declaring your components using _Spring_ XML config, then you would do...
+If you declare your components by using Spring XML config, then you would do the following:
[source,xml]
----
----
-This ensures the Geode cache and all the Regions defined in `cache.xml` get created before any components
-with auto-wire references when using the new `` element.
+Doing so ensures that the {data-store-name} cache and all the Regions defined in `cache.xml` get created before
+any components with auto-wire references when using the new `` element.
[[bootstrap:region:overview]]
== Configuring Regions
-_Spring Data Geode_ provides comprehensive support for configuring any type of Region via the following elements:
+{sdg-name} provides comprehensive support for configuring any type of Region through the following elements:
* LOCAL Region: ``
* PARTITION Region: ``
* REPLICATE Region: ``
* Client Region: ``
-Please see the Apache Geode documentation for a comprehensive description of
-http://geode.apache.org/docs/guide/11/developing/region_options/region_types.html[Region Types].
+See the {data-store-name} documentation for a comprehensive description of
+{x-data-store-docs}/developing/region_options/region_types.html[Region Types].
[[bootstrap:region:attributes]]
=== Common Region Attributes
-The following table lists attributes available for all Region types:
+The following table lists the attributes available for all Region types:
[cols="1,2,2", options="header"]
.Common Region Attributes
@@ -166,55 +166,55 @@ The following table lists attributes available for all Region types:
| Description
| cache-ref
-| Geode Cache bean reference
-| The name of the bean defining the Geode Cache (by default 'gemfireCache').
+| {data-store-name} Cache bean reference
+| The name of the bean defining the {data-store-name} Cache (by default, 'gemfireCache').
| cloning-enabled
-| boolean, default:false
-| When true, the updates are applied to a clone of the value and then the clone is saved to the cache. When false, the value is modified in place in the cache.
+| boolean (default: `false`)
+| When `true`, the updates are applied to a clone of the value and then the clone is saved to the cache. When `false`, the value is modified in place in the cache.
| close
-| boolean, default:false
-| Determines whether the Region should be closed at shutdown.
+| boolean (default: `false`)
+| Determines whether the region should be closed at shutdown.
| concurrency-checks-enabled
-| boolean, default:true
-| Determines whether members perform checks to provide consistent handling for concurrent or out-of-order updates to distributed Regions.
+| 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 Geode's http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/DataPolicy.html[Data Policy]
-| The Region's Data Policy. Note, not all Data Policies are supported for every Region type.
+| See {data-store-name}'s {x-data-store-javadoc}/org/apache/geode/cache/DataPolicy.html[data policy].
+| The region's data policy. Note that not all data policies are supported for every Region type.
| destroy
-| boolean, default:false
-| Determines whether the Region should be destroyed at shutdown.
+| boolean (default: `false`)
+| Determines 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.
+| The name of a configured disk store.
+| A reference to a bean created through the `disk-store` element.
| disk-synchronous
-| boolean, default:true
-| Determines whether Disk Store writes are synchronous.
+| boolean (default: `true`)
+| Determines whether disk store writes are synchronous.
| id
| Any valid bean name.
-| Will be the Region name by default if no `name` attribute is specified.
+| The default region name if no `name` attribute is specified.
| ignore-if-exists
-| boolean, default:false
-| Ignores this bean definition if the Region already exists in the cache, resulting in a lookup instead.
+| boolean (default: `false`)
+| Ignores this bean definition if the region already exists in the cache, resulting in a lookup instead.
| ignore-jta
-| boolean, default:false
-| Determines whether this Region will participate in JTA transactions.
+| boolean (default: `false`)
+| Determines whether this Region participates in JTA (Java Transaction API) transactions.
| index-update-type
-| synchronous or asynchronous, default:synchronous
-| Determines whether Indices will be updated synchronously or asynchronously on entry creation.
+| `synchronous` or `asynchronous` (default: `synchronous`)
+| Determines whether Indices are updated synchronously or asynchronously on entry creation.
| initial-capacity
-| integer, default:16
+| integer (default: 16)
| The initial memory allocation for the number of Region entries.
| key-constraint
@@ -222,28 +222,28 @@ The following table lists attributes available for all Region types:
| Expected key type.
| load-factor
-| float, default:.75
-| Sets the initial parameters on the underlying java.util.ConcurrentHashMap used for storing Region entries.
+| float (default: .75)
+| Sets the initial parameters on the underlying `java.util.ConcurrentHashMap` used for storing region entries.
| name
-| Any valid Region name.
-| The name of the Region. If not specified, it will assume the value of the `id` attribute (a.k.a. bean name).
+| Any valid region name.
+| The name of the region. If not specified, it assumes the value of the `id` attribute (that is, the bean name).
| persistent
-| *boolean, default:false
-| Determines whether the Region will persist entries to local disk (Disk Store).
+| *boolean (default: `false`)
+| Determines whether the region persists entries to local disk (disk store).
| shortcut
-| See http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/RegionShortcut.html
-| The `RegionShortcut` for this Region. Allows easy initialization of the Region based on pre-defined defaults.
+| See {x-data-store-javadoc}/org/apache/geode/cache/RegionShortcut.html
+| The `RegionShortcut` for this region. Allows easy initialization of the region based on pre-defined defaults.
| statistics
-| boolean, default:false
-| Determines whether the Region reports statistics.
+| boolean (default: `false`)
+| Determines whether the region reports statistics.
| template
-| The name of a Region Template.
-| A reference to a bean created via one of the `*region-template` elements.
+| The name of a region template.
+| A reference to a bean created through one of the `*region-template` elements.
| value-constraint
| Any valid, fully-qualified Java class name.
@@ -251,19 +251,21 @@ The following table lists attributes available for all Region types:
|===
[[bootstrap:region:cache-listener]]
-=== CacheListeners
+=== `CacheListener` instances
-`CacheListeners` are registered with a Region to handle Region events such as when entries are created, updated,
-destroyed and so on. A `CacheListener` can be any bean that implements the
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CacheListener.html[`CacheListener`] interface.
-A Region may have multiple listeners, declared using the `cache-listener` element nested in the containing
+`CacheListener` instances are registered with a Region to handle Region events, such as when entries are created,
+updated, destroyed, and so on. A `CacheListener` can be any bean that implements the
+{x-data-store-javadoc}/org/apache/geode/cache/CacheListener.html[`CacheListener`] interface.
+A Region may have multiple listeners, declared with the `cache-listener` element nested in the containing
`*-region` element.
-In the example below, there are two `CacheListener's` declared. The first references a named, top-level _Spring_ bean;
-the second is an anonymous inner bean definition.
+The following example has two declared `CacheListener's`. The first references a named, top-level Spring bean.
+The second is an anonymous inner bean definition.
[source,xml]
----
+
+
@@ -271,17 +273,14 @@ the second is an anonymous inner bean definition.
-
-
----
The following example uses an alternate form of the `cache-listener` element with the `ref` attribute.
-This allows for more concise configuration when defining a single `CacheListener`. Note, the namespace only allows
-a single `cache-listener` element so either the style above or below must be used.
+Doing so allows for more concise configuration when defining a single `CacheListener`.
-WARNING: Using `ref` and a nested declaration in the `cache-listener` element is illegal. The two options are
-mutually exclusive and using both in the same element will result in an exception.
+Note: The XML namespace allows only a single `cache-listener` element, so either the style shown in
+the preceding example or the style in the following example must be used.
[source,xml]
----
@@ -294,31 +293,35 @@ mutually exclusive and using both in the same element will result in an exceptio
----
+WARNING: Using `ref` and a nested declaration in the `cache-listener` element is illegal.
+The two options are mutually exclusive and using both in the same element results in an exception.
+
+
.Bean Reference Conventions
[NOTE]
====
-The `cache-listener` element is an example of a common pattern used in the namespace anywhere Geode provides
-a callback interface to be implemented in order to invoke custom code in response to Cache or Region events.
-Using _Spring's_ IoC container, the implementation is a standard _Spring_ bean. In order to simplify the configuration,
-the schema allows a single occurrence of the `cache-listener` element, but it may contain nested bean references
-and inner bean definitions in any combination if multiple instances are permitted. The convention is to use
-the singular form (i.e., `cache-listener` vs `cache-listeners`) reflecting that the most common scenario will in fact
-be a single instance. We have already seen examples of this pattern in the <>
+The `cache-listener` element is an example of a common pattern used in the XML namespace anywhere {data-store-name}
+provides a callback interface to be implemented in order to invoke custom code in response to cache or Region events.
+When you use Spring's IoC container, the implementation is a standard Spring bean. In order to simplify the configuration,
+the schema allows a single occurrence of the `cache-listener` element, but, if multiple instances are permitted,
+it may contain nested bean references and inner bean definitions in any combination. The convention is to use
+the singular form (that is, `cache-listener` vs `cache-listeners`), reflecting that the most common scenario is,
+in fact, a single instance. We have already seen examples of this pattern in the <>
configuration example.
====
[[bootstrap:region:cache-loaders-writers]]
=== CacheLoaders and CacheWriters
-Similar to `cache-listener`, the namespace provides `cache-loader` and `cache-writer` elements to register
-these Geode components respectively for a Region.
+Similar to `cache-listener`, the XML namespace provides `cache-loader` and `cache-writer` elements to register
+these {data-store-name} components for a Region.
-A `CacheLoader` is invoked on a cache miss to allow an entry to be loaded from an external data source, such as a
-database. A `CacheWriter` is invoked before an entry is created or updated, intended for synchronizing to
-an external data source. The difference is Geode only supports at most a single instance `CacheLoader` and `CacheWriter`
-per Region. However, either declaration style may be used.
+A `CacheLoader` is invoked on a cache miss to let an entry be loaded from an external data source, such as a database.
+A `CacheWriter` is invoked before an entry is created or updated, to allow the entry to be synchronized to an external
+data source. The main difference is that {data-store-name} supports, at most, a single instance of `CacheLoader`
+and `CacheWriter` per Region. However, either declaration style may be used.
-Example:
+The following example declares a Region with both a `CacheLoader` and a `CacheWriter`:
[source,xml]
----
@@ -338,20 +341,20 @@ Example:
----
-See http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CacheLoader.html[`CacheLoader`]
-and http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CacheWriter.html[`CacheWriter`]
-in the Apache Geode documentation for more details.
+See {x-data-store-javadoc}/org/apache/geode/cache/CacheLoader.html[`CacheLoader`]
+and {x-data-store-javadoc}/org/apache/geode/cache/CacheWriter.html[`CacheWriter`]
+in the {data-store-name} documentation for more details.
[[bootstrap:region:compression]]
== Compression
-Geode Regions may also be compressed in order to reduce JVM memory consumption and pressure to possibly avoid
-stop the world GCs. When you enable compression for a Region, all values stored in the Region, in-memory
-are compressed while keys and indexes remain uncompressed. New values are compressed when put into Region
-and all values are decompressed automatically when read back from the Region. Values are not compressed when
+{data-store-name} Regions may also be compressed in order to reduce JVM memory consumption and pressure
+to possibly avoid global GCs. When you enable compression for a Region, all values stored in memory for the Region
+are compressed, while keys and indexes remain uncompressed. New values are compressed when put into the Region
+and all values are decompressed automatically when read back from the Region. Values are not compressed when
persisted to disk or when sent over the wire to other peer members or clients.
-Example:
+The following example shows a Region with compression enabled:
[source,xml]
----
@@ -364,19 +367,19 @@ Example:
----
-Please refer to Apache Geode's documentation for more information on
-http://gemfire.docs.pivotal.io/geode/managing/region_compression/region_compression.html[Region Compression].
+See {data-store-name}'s documentation for more information on
+{x-data-store-docs}/managing/region_compression/region_compression.html[Region Compression].
[[bootstrap:region:subregions]]
== Subregions
-_Spring Data Geode_ also supports Subregions, allowing Regions to be arranged in a hierarchical relationship.
+{sdg-name} also supports Sub-Regions, allowing Regions to be arranged in a hierarchical relationship.
-For example, Geode allows for a */Customer/Address* Region and a different */Employee/Address* Region. Additionally,
-a Subregion may have it's own Subregions and its own configuration. A Subregion does not inherit attributes from
-the parent Region. Regions types may be mixed and matched subject to Geode constraints. A Subregion is naturally
-declared as a child element of a Region. The Subregion's name attribute is the simple name. The above example
-might be configured as:
+For example, {data-store-name} allows for a `/Customer/Address` Region and a different `/Employee/Address` Region.
+Additionally, a Sub-Region may have its own Sub-Regions and configuration. A Sub-Region does not inherit attributes
+from its parent Region. Regions types may be mixed and matched subject to {data-store-name} constraints. A Sub-Region
+is naturally declared as a child element of a Region. The Sub-Region's `name` attribute is the simple name.
+The preceding example might be configured as follows:
[source,xml]
----
@@ -391,19 +394,20 @@ might be configured as:
----
-Note that the `Monospaced ([id])` attribute is not permitted for a Subregion. The Subregions will be created with
-bean names */Customer/Address* and */Employee/Address*, respectively. So they may be injected using the full path name
-into other application beans that need them, such as `GemfireTemplate`. The full path should also be used in
-OQL query strings.
+Note that the `Monospaced ([id])` attribute is not permitted for a Sub-Region. Sub-Regions are created with bean names
+(/Customer/Address and /Employee/Address, respectively, in this case). So they may be injected into other application
+beans, such as a `GemfireTemplate`, that need them by using the full path name of the Region. The full pathname
+of the Region should also be used in OQL query strings.
[[bootstrap:region:templates]]
== Region Templates
-_Spring Data Geode_ also supports Region Templates. This feature allows developers to define common Region
-configuration settings and attributes once and reuse the configuration among many Region bean definitions declared
-in the _Spring_ application context.
+{sdg-name} also supports Region templates.
-_Spring Data Geode_ includes 5 Region template tags in namespace:
+This feature allows developers to define common Region configuration and attributes once and reuse the configuration
+among many Region bean definitions declared in the Spring `ApplicationContext`.
+
+{sdg-name} includes five Region template tags in its namespace:
[cols="1,2", options="header"]
.Region Template Tags
@@ -412,26 +416,26 @@ _Spring Data Geode_ includes 5 Region template tags in namespace:
| Description
| ``
-| Defines common, generic Region attributes; extends `regionType` in the namespace.
+| Defines common generic Region attributes. Extends `regionType` in the XML namespace.
| ``
-| Defines common, 'Local' Region attributes; extends `localRegionType` in the namespace.
+| Defines common 'Local' Region attributes. Extends `localRegionType` in the XML namespace.
| ``
-| Defines common, 'PARTITION' Region attributes; extends `partitionedRegionType` in the namespace.
+| Defines common 'PARTITION' Region attributes. Extends `partitionedRegionType` in the XML namespace.
| ``
-| Defines common, 'REPLICATE' Region attributes; extends `replicatedRegionType` in the namespace.
+| Defines common 'REPLICATE' Region attributes. Extends `replicatedRegionType` in the XML namespace.
| ``
-| Defines common, 'Client' Region attributes; extends `clientRegionType` in the namespace.
+| Defines common 'Client' Region attributes. Extends `clientRegionType` in the XML namespace.
|===
-In addition to the tags, concrete `` elements along with the abstract `` elements
-have a `template` attribute used to define the Region Template from which the Region will inherit its configuration.
-Region Templates may even inherit from other Region Templates.
+In addition to the tags, concrete `` elements (along with the abstract `` elements)
+have a `template` attribute used to define the Region template from which the Region inherits its configuration.
+Region templates may even inherit from other Region templates.
-Here is an example of 1 possible configuration...
+The following example shows one possible configuration:
[source,xml]
----
@@ -475,58 +479,58 @@ Here is an example of 1 possible configuration...
----
-Region Templates work for Subregions as well. Notice that 'TemplateBasedPartitionRegion'
-extends 'PartitionRegionTemplate', which extends 'ExtendedRegionTemplate' that extends 'BaseRegionTemplate'.
-Attributes and sub-elements defined in subsequent, inherited Region bean definitions override what is in the parent.
+Region templates work for Sub-Regions as well. Notice that 'TemplateBasedPartitionRegion' extends 'PartitionRegionTemplate',
+which extends 'ExtendedRegionTemplate', which extends 'BaseRegionTemplate'. Attributes and sub-elements defined in
+subsequent, inherited Region bean definitions override what is in the parent.
=== How Templating Works
-_Spring Data Geode_ applies Region Templates when the _Spring_ application context configuration meta-data is *parsed*,
-and therefore, *must be declared in the order of inheritance*. In other words, parent templates must be defined
-before children. This ensures the proper configuration is applied, especially when element attributes or sub-elements
-are "overridden".
+{sdg-name} applies Region templates when the Spring `ApplicationContext` configuration metadata is parsed, and therefore,
+Region templates must be declared in the order of inheritance. In other words, parent templates must be defined before
+child templates. Doing so ensures that the proper configuration is applied, especially when element attributes
+or sub-elements are overridden.
-IMPORTANT: It is equally important to remember the Region types must only inherit from other similar typed Regions.
+IMPORTANT: It is equally important to remember that the Region types must only inherit from other similarly typed Regions.
For instance, it is not possible for a `` to inherit from a ``.
-NOTE: Region Templates are single-inheritance.
+NOTE: Region templates are single-inheritance.
[[bootstrap:region:regions-subregions-lookups-caution]]
-=== Caution concerning Regions, Subregions and Lookups
+=== Caution concerning Regions, Sub-Regions and Lookups
-Previously, one of the underlying properties of the `replicated-region`, `partitioned-region`, `local-region`
-and `client-region` elements in the _Spring Data Geode_ XML namespace was to perform a lookup first before
-attempting to create a Region. This was done in case the Region already existed, which would be the case
-if the Region was defined in an imported Geode native `cache.xml` configuration file. Therefore, the lookup
-was performed first to avoid any errors. This was by design and subject to change.
+Previously, one of the underlying properties of the `replicated-region`, `partitioned-region`, `local-region`,
+and `client-region` elements in the {sdg-name} XML namespace was to perform a lookup first before attempting to
+create a Region. This was done in case the Region already existed, which would be the case if the Region was defined
+in an imported {data-store-name} native `cache.xml` configuration file. Therefore, the lookup was performed first
+to avoid any errors. This was by design and subject to change.
-This behavior has been altered and the default behavior is now to create the Region first. If the Region
-already exists, then the creation logic fails-fast and an appropriate exception is thrown. However, much like the
-`CREATE TABLE IF NOT EXISTS ...` DDL syntax, the _Spring Data Geode_ `<*-region>` namespace elements now includes
-a `ignore-if-exists` attribute, which re-instates the old behavior by performing a lookup of an existing Region
-identified by name, first. If an existing Region by name is found and `ignore-if-exists` is set to `true`, then
-the Region bean definition defined in _Spring_ config is ignored.
+This behavior has been altered and the default behavior is now to create the Region first. If the Region
+already exists, then the creation logic fails-fast and an appropriate exception is thrown. However, much like the
+`CREATE TABLE IF NOT EXISTS ...` DDL syntax, the {sdg-name} `` XML namespace elements now include
+a `ignore-if-exists` attribute, which reinstates the old behavior by first performing a lookup of an existing Region
+identified by name before attempting to create the Region. If an existing Region is found by name and `ignore-if-exists`
+is set to `true`, then the Region bean definition defined in Spring configuration is ignored.
-WARNING: The _Spring_ team highly recommends that the `replicated-region`, `partitioned-region`, `local-region`
-and `client-region` namespace elements be strictly used for defining new Regions only. One problem that could arise
-if the Regions defined by these elements already existed and the Region elements performed a lookup first is if
-the developer defined different Region semantics and behaviors for eviction, expiration, subscription, etc in his/her
-application config, then the Region definition may not match and could exhibit contrary behaviors to those required
-by the application. Even worse, the application developer may want to define the Region as a distributed Region
-(e.g. PARTITION) but in fact the existing Region definition is LOCAL.
+WARNING: The Spring team highly recommends that the `replicated-region`, `partitioned-region`, `local-region`,
+and `client-region` XML namespace elements be strictly used for defining new Regions only. One problem that could arise
+when the Regions defined by these elements already exist and the Region elements perform a lookup first is, if
+you defined different Region semantics and behaviors for eviction, expiration, subscription, and so on in your
+application config, then the Region definition might not match and could exhibit contrary behaviors to those required
+by the application. Even worse, you might want to define the Region as a distributed Region (for example, `PARTITION`)
+when, in fact, the existing Region definition is local only.
-IMPORTANT: Recommended Practice - Only use `replicated-region`, `partitioned-region`, `local-region` and `client-region`
-namespace elements to define new Regions.
+IMPORTANT: Recommended Practice - Use only `replicated-region`, `partitioned-region`, `local-region`, and `client-region`
+XML namespace elements to define new Regions.
-Consider the following native Geode `cache.xml` configuration file...
+Consider the following native {data-store-name} `cache.xml` configuration file:
[source,xml]
----
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+ version="1.0">
@@ -539,7 +543,7 @@ Consider the following native Geode `cache.xml` configuration file...
----
-Also consider that you may have defined an application DAO as follows...
+Further, consider that you may have defined an application DAO as follows:
[source,java]
----
@@ -552,19 +556,20 @@ public class CustomerAccountDao extends GemDaoSupport {
}
----
-Here, we are injecting a reference to the `Customers/Accounts` Region in our application DAO. As such, it is
-not uncommon for a developer to define beans for all or even some of these Regions in _Spring_ XML configuration
-meta-data as follows...
+Here, we inject a reference to the `Customers/Accounts` Region in our application DAO. Consequently, it is
+not uncommon for a developer to define beans for some or all of these Regions in Spring XML configuration
+metadata as follows:
[source,xml]
+[subs="verbatim,attributes"]
----
@@ -575,12 +580,12 @@ meta-data as follows...
----
-The `Customers/Accounts` and `Customers/Accounts/Orders` Regions are referenced as beans in the _Spring_
-application context as "Customers/Accounts" and "Customers/Accounts/Orders", respectively. The nice thing about
-using the `lookup-region` element and the corresponding syntax above is that it allows a developer
-to reference a Subregion directly without unnecessarily defining a bean for the parent Region (i.e. `Customers`).
+The `Customers/Accounts` and `Customers/Accounts/Orders` Regions are referenced as beans in the Spring container
+as `Customers/Accounts` and `Customers/Accounts/Orders`, respectively. The nice thing about using the `lookup-region`
+element and the corresponding syntax (described earlier) is that it lets you reference a Sub-Region directly without
+unnecessarily defining a bean for the parent Region (`Customers`, in this case).
-However, if now the developer changes his/her configuration meta-data syntax to using the nested format, like so...
+Consider the following bad example, which changes the configuration metadata syntax to use the nested format:
[source,xml]
----
@@ -591,8 +596,8 @@ However, if now the developer changes his/her configuration meta-data syntax to
----
-Or, perhaps the developer erroneously chooses to use the top-level `replicated-region` element along with
-the `ignore-if-exists` attribute set to perform a lookup first, as in...
+Now consider another bad example which uses the top-level `replicated-region` element along with
+the `ignore-if-exists` attribute set to perform a lookup first:
[source,xml]
----
@@ -603,18 +608,19 @@ the `ignore-if-exists` attribute set to perform a lookup first, as in...
----
-Then the Region beans defined in the _Spring_ application context will consist of the following:
+The Region beans defined in the Spring `ApplicationContext` consist of the following:
`{ "Customers", "/Customers/Accounts", "/Customers/Accounts/Orders" }.` This means the dependency injected reference
-above (i.e. `@Resource(name = "Customers/Accounts"))` is now broken since no bean with name "Customers/Accounts"
-is actually defined.
+shown in the earlier example (that is, `@Resource(name = "Customers/Accounts")`) is now broken, since no bean with name
+`Customers/Accounts` is actually defined. For this reason, you should not configure Regions as shown in
+the two preceding examples.
-Geode is flexible in referencing both parent Regions and Subregions with or without the leading forward slash.
-For example, the parent can be referenced as "/Customers" or "Customers" and the child as "/Customers/Accounts"
-or just "Customers/Accounts". However, _Spring Data _Geode is very specific when it comes to naming beans after Regions,
-typically always using the forward slash (/) to represent Subregions (e.g. "/Customers/Accounts").
+{data-store-name} is flexible in referencing both parent Regions and Sub-Regions with or without the leading forward
+slash. For example, the parent can be referenced as `/Customers` or `Customers` and the child as `/Customers/Accounts`
+or `Customers/Accounts`. However, {sdg-name} is very specific when it comes to naming beans after Regions. It always
+uses the forward slash (/) to represent Sub-Regions (for example, `/Customers/Accounts`).
-Therefore, it is recommended that users either use the nested `lookup-region` syntax as shown above,
-or define direct references with a leading forward slash (/) like so...
+Therefore, you should use the non-nested `lookup-region` syntax shown earlier or define direct references with
+a leading forward slash (/), as follows:
[source,xml]
----
@@ -622,24 +628,24 @@ or define direct references with a leading forward slash (/) like so...
----
-The example above where the nested `replicated-region` elements were used to reference the Subregions serves to
-illustrate the problem stated earlier. Are the Customers, Accounts and Orders Regions/Subregions persistent or not?
-Not, since the Regions were defined in the native Geode `cache.xml` configuration file as `REPLICATES` and will exist
-by the time the cache is initialized, or once the `` bean is processed.
+The earlier example, where the nested `replicated-region` elements were used to reference the Sub-Regions, shows
+the problem stated earlier. Are the Customers, Accounts and Orders Regions and Sub-Regions persistent or not?
+They are not persistent, because the Regions were defined in the native {data-store-name} `cache.xml` configuration file
+as `REPLICATE` and exist before the cache bean is initialized (once the `` element is processed).
[[bootstrap:region:eviction]]
== Data Eviction (with Overflow)
Based on various constraints, each Region can have an eviction policy in place for evicting data from memory.
-Currently, in Geode, eviction applies to the _Least Recently Used_ entry (also known as
+Currently, in {data-store-name}, eviction applies to the Least Recently Used entry (also known as
http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used[LRU]). Evicted entries are either destroyed
-or paged to disk (referred to as *overflow* to disk).
+or paged to disk (referred to as "`overflow to disk`").
-_Spring Data Geode_ supports all eviction policies (entry count, memory and heap usage) for PARTITION Regions,
-REPLICATE Regions and client, local Regions using the nested `eviction` element.
+{sdg-name} supports all eviction policies (entry count, memory, and heap usage) for PARTITION Regions, REPLICATE Regions,
+and client, local Regions by using the nested `eviction` element.
For example, to configure a PARTITION Region to overflow to disk if the memory size exceeds more than 512 MB,
-a developer would specify the following configuration:
+you can specify the following configuration:
[source,xml]
----
@@ -649,35 +655,35 @@ a developer would specify the following configuration:
----
IMPORTANT: Replicas cannot use `local destroy` eviction since that would invalidate them.
-See the Geode docs for more information.
+See the {data-store-name} docs for more information.
-When configuring Regions for overflow, it is recommended to configure the storage through the `disk-store` element
+When configuring Regions for overflow, you should configure the storage through the `disk-store` element
for maximum efficiency.
-For a detailed description of eviction policies, please refer to the Geode documentation on
-http://geode.apache.org/docs/guide/11/developing/eviction/chapter_overview.html[Eviction].
+For a detailed description of eviction policies, see the {data-store-name} documentation on
+{x-data-store-docs}/developing/eviction/chapter_overview.html[Eviction].
[[bootstrap:region:expiration]]
== Data Expiration
-Apache Geode allows you to control how long entries exist in the cache. Expiration is driven by elapsed time,
-as opposed to Eviction, which is driven by the entry count or heap/memory usage. Once an entry expires
+{data-store-name} lets you control how long entries exist in the cache. Expiration is driven by elapsed time,
+as opposed to eviction, which is driven by the entry count or heap or memory usage. Once an entry expires,
it may no longer be accessed from the cache.
-Geode supports the following Expiration types:
+{data-store-name} supports the following expiration types:
-* *Time-to-Live (TTL)* - The amount of time in seconds that an object may remain in the cache after the last creation
+* *Time-to-Live (TTL)*: The amount of time in seconds that an object may remain in the cache after the last creation
or update. For entries, the counter is set to zero for create and put operations. Region counters are reset when
the Region is created and when an entry has its counter reset.
-* *Idle Timeout (TTI)* - The amount of time in seconds that an object may remain in the cache after the last access.
+* *Idle Timeout (TTI)*: The amount of time in seconds that an object may remain in the cache after the last access.
The Idle Timeout counter for an object is reset any time its TTL counter is reset. In addition, an entry’s
-_Idle Timeout_ counter is reset any time the entry is accessed through a get operation or a netSearch.
-The _Idle Timeout_ counter for a Region is reset whenever the _Idle Timeout_ is reset for one of its entries.
+Idle Timeout counter is reset any time the entry is accessed through a get operation or a `netSearch`.
+The Idle Timeout counter for a Region is reset whenever the Idle Timeout is reset for one of its entries.
-Each of these may be applied to the Region itself or entries in the Region. _Spring Data Geode_ provides ``,
-``, `` and `` Region child elements to specify timeout values and expiration actions.
+Each of these may be applied to the Region itself or to entries in the Region. {sdg-name} provides ``,
+``, ``, and `` Region child elements to specify timeout values and expiration actions.
-For example:
+The following example shows a `PARTITION` Region with expiration values set:
[source,xml]
----
@@ -687,15 +693,15 @@ For example:
----
-For a detailed description of expiration policies, please refer to the Geode documentation on
-http://geode.apache.org/docs/guide/11/developing/expiration/chapter_overview.html[Expiration].
+For a detailed description of expiration policies, see the {data-store-name} documentation on
+{x-data-store-docs}/developing/expiration/chapter_overview.html[expiration].
[[bootstrap:region:expiration:annotation]]
=== Annotation-based Data Expiration
-With _Spring Data Geode_, a developer has the ability to define Expiration policies and settings on individual
-Region Entry values, or rather, application domain objects directly. For instance, a developer might define Expiration
-settings on a Session-based application domain object like so...
+With {sdg-name}, you can define expiration policies and settings on individual Region entry values (or, to put
+it differently, directly on application domain objects). For instance, you can define expiration policies on
+a Session-based application domain object as follows:
[source,java]
----
@@ -705,9 +711,9 @@ public class SessionBasedApplicationDomainObject {
}
----
-In addition, a developer may also specify Expiration type specific settings on Region Entries using
-`@IdleTimeoutExpiration` and `@TimeToLiveExpiration` annotations for Idle Timeout (TTI) and Time-to-Live (TTL)
-Expiration, respectively...
+You can also specify expiration type specific settings on Region entries by using the `@IdleTimeoutExpiration`
+and `@TimeToLiveExpiration` annotations for Idle Timeout (TTI) and Time-to-Live (TTL) expiration, respectively,
+as the following example shows:
[source,java]
----
@@ -720,15 +726,15 @@ public class AnotherSessionBasedApplicationDomainObject {
----
Both `@IdleTimeoutExpiration` and `@TimeToLiveExpiration` take precedence over the generic `@Expiration` annotation
-when more than one Expiration annotation type is specified, as shown above. Though, neither `@IdleTimeoutExpiration`
-nor `@TimeToLiveExpiration` overrides the other; rather they may compliment each other when different Region Entry
-Expiration types, such as TTL and TTI, are configured.
+when more than one expiration annotation type is specified, as shown in the preceding example. Neither
+`@IdleTimeoutExpiration` nor `@TimeToLiveExpiration` overrides the other. Rather, they compliment each other
+when different Region entry expiration policies, such as TTL and TTI, are configured.
[NOTE]
====
-All @Expiration-based annotations apply only to Region Entry values. Expiration for a "Region" is not covered
-by _Spring Data Geode's_ Expiration annotation support. However, Apache Geode and _Spring Data Geode_ do allow you
-to set Region Expiration using the SDG XML namespace, like so...
+All `@Expiration`-based annotations apply only to Region entry values. Expiration for a Region is not covered by
+{sdg-name}'s expiration annotation support. However, {data-store-name} and {sdg-name} do let you set Region expiration
+by using the {sdg-acronym} XML namespace, as follows:
[source,xml]
----
@@ -739,22 +745,22 @@ to set Region Expiration using the SDG XML namespace, like so...
----
====
-_Spring Data Geode's_ `@Expiration` annotation support is implemented with Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CustomExpiry.html[`CustomExpiry`] interface.
-Refer to Geode's documentation on http://geode.apache.org/docs/guide/11/developing/expiration/configuring_data_expiration.html[Configuring Data Expiration]
+{sdg-name}'s `@Expiration` annotation support is implemented with {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/cache/CustomExpiry.html[`CustomExpiry`] interface.
+See {data-store-name}'s documentation on {x-data-store-docs}/developing/expiration/configuring_data_expiration.html[configuring data expiration]
for more details
-The _Spring Data Geode_ `AnnotationBasedExpiration` class (and `CustomExpiry` implementation) is responsible
-for processing the SDG `@Expiration` annotations and applying the Expiration policy and settings appropriately
-for Region Entry Expiration on request.
+The {sdg-name} `AnnotationBasedExpiration` class (and `CustomExpiry` implementation) is responsible for processing
+the {sdg-acronym} `@Expiration` annotations and applying the expiration policy configuration appropriately for Region
+entry expiration on request.
-To use _Spring Data Geode_ to configure specific Geode Regions to appropriately apply the Expiration policy
-and settings applied to your application domain objects annotated with `@Expiration`-based annotations, you must...
+To use {sdg-name} to configure specific {data-store-name} Regions to appropriately apply the expiration policy to
+your application domain objects annotated with `@Expiration`-based annotations, you must:
-1. Define a bean in the _Spring_ `ApplicationContext` of type `AnnotationBasedExpiration` using the appropriate
-constructor or one of the convenient factory methods. When configuring Expiration for a specific Expiration type,
-such as _Idle Timeout_ or _Time-to-Live_, then you should use one of the factory methods in the
-`AnnotationBasedExpiration` class, like so...
+. Define a bean in the Spring `ApplicationContext` of type `AnnotationBasedExpiration` by using the appropriate
+constructor or one of the convenient factory methods. When configuring expiration for a specific expiration type,
+such as Idle Timeout (TTI) or Time-to-Live (TTL), you should use one of the factory methods in
+the `AnnotationBasedExpiration` class, as follows:
+
[source,xml]
----
@@ -768,18 +774,18 @@ such as _Idle Timeout_ or _Time-to-Live_, then you should use one of the factory
+
[NOTE]
====
-To configure _Idle Timeout_ (TTI) Expiration instead, then you would of course use the `forIdleTimeout` factory method
+To configure Idle Timeout (TTI) Expiration instead, use the `forIdleTimeout` factory method
along with the `` element to set TTI.
====
-2. (optional) Annotate your application domain objects that will be stored in the Region with Expiration policies
-and custom settings using one of _Spring Data Geode's_ `@Expiration` annotations: `@Expiration`,
-`@IdleTimeoutExpiration` and/or `@TimeToLiveExpiration`
+. (optional) Annotate your application domain objects that are stored in the Region with expiration policies
+and custom settings by using one of {sdg-name}'s `@Expiration` annotations: `@Expiration`, `@IdleTimeoutExpiration`,
+or `@TimeToLiveExpiration`
-3. (optional) In cases where particular application domain objects have not been annotated with _Spring Data Geode's_
-`@Expiration` annotations at all, but the Geode Region is configured to use SDG's custom `AnnotationBasedExpiration`
-class to determine the Expiration policy and settings for objects stored in the Region, then it is possible to set
-"default" Expiration attributes on the `AnnotationBasedExpiration` bean by doing the following...
+. (optional) In cases where particular application domain objects have not been annotated with {sdg-name}'s
+`@Expiration` annotations at all, but the {data-store-name} Region is configured to use {sdg-acronym}'s custom
+`AnnotationBasedExpiration` class to determine the expiration policy and settings for objects stored in the Region,
+you can set "`default`" expiration attributes on the `AnnotationBasedExpiration` bean by doing the following:
[source,xml]
----
@@ -798,15 +804,15 @@ class to determine the Expiration policy and settings for objects stored in the
----
-You may have noticed that _Spring Data Geode's_ `@Expiration` annotations use a String as the attributes type rather
-than, and perhaps more appropriately, being strongly typed, i.e. `int` for 'timeout' and SDG'S `ExpirationActionType`
-for 'action'. Why is that?
+You may have noticed that {sdg-name}'s `@Expiration` annotations use a `String` as the attribute type rather
+than, and perhaps more appropriately, being strongly typed -- for example, `int` for 'timeout' and {sdg-acronym}'s
+`ExpirationActionType` for 'action'. Why is that?
-Well, enter one of _Spring Data Geode's_ other features, leveraging _Spring's_ core infrastructure
-for configuration convenience: _Property Placeholders_ and _Spring Expression Language_ (SpEL).
+Well, enter one of {sdg-name}'s other features, leveraging Spring's core infrastructure for configuration convenience:
+property placeholders and Spring Expression Language (SpEL) expressions.
-For instance, a developer can specify both the Expiration 'timeout' and 'action' using _Property Placeholders_
-in the `@Expiration` annotation attributes...
+For instance, a developer can specify both the expiration 'timeout' and 'action' by using property placeholders
+in the `@Expiration` annotation attributes, as the following example shows:
[source,java]
----
@@ -817,7 +823,7 @@ public class ExampleApplicationDomainObject {
}
----
-Then, in your _Spring_ XML config or in JavaConfig, you would declare the following beans...
+Then, in your Spring XML config or in JavaConfig, you can declare the following beans:
[source,xml]
----
@@ -830,13 +836,13 @@ Then, in your _Spring_ XML config or in JavaConfig, you would declare the follow
----
-This is both convenient when multiple application domain objects might share similar Expiration policies and settings,
-or when you wish to externalize the configuration.
+This is convenient both when multiple application domain objects might share similar expiration policies and when
+you wish to externalize the configuration.
-However, a developer may want more dynamic Expiration configuration determined by the state of the running system.
-This is where the power of SpEL comes in and is the recommended approach, actually. Not only can you refer to beans
-in the _Spring_ context and access bean properties, invoke methods, etc, the values for Expiration 'timeout'
-and 'action' can be strongly typed. For example (building on the example above)...
+However, you may want more dynamic expiration configuration determined by the state of the running system. This is where
+the power of SpEL comes into play and is the recommended approach, actually. Not only can you refer to beans
+in the Spring container and access bean properties, invoke methods, and so on, but the values for expiration 'timeout'
+and 'action' can be strongly typed. Consider the following example (which builds on the preceding example):
[source,xml]
----
@@ -850,7 +856,7 @@ and 'action' can be strongly typed. For example (building on the example above)
----
-Then, on your application domain object...
+Then, on your application domain object, you can define a timeout and an action as follows:
[source,java]
----
@@ -861,46 +867,46 @@ public class ExampleApplicationDomainObject {
}
----
-You can imagine that the 'expirationSettings' bean could be a more interesting and useful object rather than a simple
-instance of `java.util.Properties`. In this example, even the Properties (`expirationSettings`) uses SpEL to base
-the action value on the actual Expiration action enumerated type leading to more quickly identified failures
-if the types ever change.
+You can imagine that the 'expirationSettings' bean could be a more interesting and useful object than a simple
+instance of `java.util.Properties`. In the preceding example, the `properties` element (`expirationSettings`) uses SpEL
+to base the action value on the actual `ExpirationAction` enumerated type, quickly leading to identified failures
+if the enumerated type ever changes.
-All of this has been demonstrated and tested in the _Spring Data Geode_ test suite, by way of example. See the
+As an example, all of this has been demonstrated and tested in the {sdg-name} test suite. See the
https://github.com/spring-projects/spring-data-geode[source] for further details.
[[bootstrap:region:persistence]]
== Data Persistence
-Regions can be persistent. Geode ensures that all the data you put into a Region that is configured for persistence
-will be written to disk in a way that is recoverable the next time you recreate the Region. This allows data
-to be recovered after machine or process failure, or even after an orderly shutdown and subsequent restart of
-the Geode data node.
+Regions can be persistent. {data-store-name} ensures that all the data you put into a Region that is configured
+for persistence is written to disk in a way that is recoverable the next time you recreate the Region. Doing so lets
+data be recovered after machine or process failure or even after an orderly shutdown and subsequent restart of
+the {data-store-name} data node.
-To enable persistence with _Spring Data Geode_, simply set the `persistent` attribute to `true` on
-any of the `<*-region>` elements. For example...
+To enable persistence with {sdg-name}, set the `persistent` attribute to `true` on any of the `<*-region>` elements,
+as the following example shows:
[source,xml]
----
----
-Persistence may also be configured using the `data-policy` attribute; set the attribute's value to one of
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/DataPolicy.html[Geode's DataPolicy settings].
-For example...
+Persistence may also be configured by setting the `data-policy` attribute. To do so, set the attribute's value to one of
+{x-data-store-javadoc}/org/apache/geode/cache/DataPolicy.html[{data-store-name}'s DataPolicy settings],
+as the following example shows:
[source,xml]
----
----
-The `DataPolicy` must match the Region type and must also agree with the `persistent` attribute if also explicitly set.
-An initialization exception will be thrown if the `persistent` attribute is set to `false` yet a persistent `DataPolicy`
-was specified (e.g. PERSISTENT_REPLICATE, PERSISTENT_PARTITION).
+The `DataPolicy` must match the Region type and must also agree with the `persistent` attribute if it is also
+explicitly set. If the `persistent` attribute is set to `false` but a persistent `DataPolicy`
+was specified (such as `PERSISTENT_REPLICATE` or `PERSISTENT_PARTITION`), an initialization exception is thrown.
-When persisting Regions, it is recommended to configure the storage through the `disk-store` element
-for maximum efficiency. The DiskStore is referenced using the `disk-store-ref` attribute. Additionally, the Region
-may perform disk writes synchronously or asynchronously:
+For maximum efficiency when persisting Regions, you should configure the storage through the `disk-store` element.
+The `DiskStore` is referenced by using the `disk-store-ref` attribute. Additionally, the Region may perform disk writes
+synchronously or asynchronously. The following example shows a synchronous `DiskStore`:
[source,xml]
----
@@ -908,14 +914,15 @@ may perform disk writes synchronously or asynchronously:
disk-store-ref="myDiskStore" disk-synchronous="true"/>
----
-This is discussed further in <>
+This is discussed further in <>.
[[bootstrap:region:subscription]]
== Subscription Policy
-Geode allows configuration of http://geode.apache.org/docs/guide/11/developing/events/configure_p2p_event_messaging.html[peer-to-peer (P2P) event messaging]
-to control the entry events that the Region will receive. _Spring Data Geode_ provides the ``
-sub-element to set the subscription policy on REPLICATE and PARTITION Regions to either `ALL` or `CACHE_CONTENT`.
+{data-store-name} allows configuration of {x-data-store-docs}/developing/events/configure_p2p_event_messaging.html[peer-to-peer (P2P) event messaging]
+to control the entry events that the Region receives. {sdg-name} provides the `` sub-element to set
+the subscription policy on `REPLICATE` and `PARTITION` Regions to either `ALL` or `CACHE_CONTENT`. The following example
+shows a region with its subscription policy set to `CACHE_CONTENT`:
[source,xml]
----
@@ -927,61 +934,62 @@ sub-element to set the subscription policy on REPLICATE and PARTITION Regions to
[[bootstrap:region:local]]
== Local Region
-_Spring Data Geode_ offers a dedicated `local-region` element for creating local Regions. Local Regions, as the name
-implies, are standalone, meaning they do not share data with any other distributed system member. Other than that,
-all common Region configuration options apply.
+{sdg-name} offers a dedicated `local-region` element for creating local Regions. Local Regions, as the name implies,
+are standalone, meaning that they do not share data with any other distributed system member. Other than that, all
+common Region configuration options apply.
-A minimal declaration looks as follows (again, the example relies on the _Spring Data Geode_ namespace
-naming conventions to wire the cache):
+The following example shows a minimal declaration (again, the example relies on the {sdg-name} XML namespace naming
+conventions to wire the cache):
[source,xml]
----
----
-Here, a local Region is created (if one doesn't exist already). The name of the Region is the same as the bean id
-(`exampleLocalRegion`) and the bean assumes the existence of a Geode cache named `gemfireCache`.
+In the preceding example, a local Region is created (if a Region by the same name does not already exist). The name of
+the Region is the same as the bean ID (`exampleLocalRegion`), and the bean assumes the existence of a {data-store-name}
+cache named `gemfireCache`.
[[bootstrap:region:replicate]]
== Replicated Region
-One of the common Region types is a *REPLICATE* Region or *replica*. In short, when a Region is configured to be
-a REPLICATE, every member that hosts the Region stores a copy of the Region's entries locally. Any update to
-a REPLICATE Region is distributed to all copies of the Region. When a _replica_ is created, it goes through
-an initialization stage in which it discovers other _replicas_ and automatically copies all the entries.
-While one _replica_ is initializing you can still continue to use the other _replica_.
+One of the common Region types is a `REPLICATE` Region or "`replica`". In short, when a Region is configured to be
+a `REPLICATE`, every member that hosts the Region stores a copy of the Region's entries locally. Any update to
+a `REPLICATE` Region is distributed to all copies of the Region. When a replica is created, it goes through
+an initialization stage, in which it discovers other replicas and automatically copies all the entries.
+While one replica is initializing, you can still continue to use the other replicas.
-_Spring Data Geode_ offers a `replicated-region` element. A minimal declaration looks as follows.
-All common configuration options are available for REPLICATE Regions.
+All common configuration options are available for REPLICATE Regions. {sdg-name} offers a `replicated-region` element.
+The following example shows a minimal declaration:
[source,xml]
----
----
-Refer to Geode's documentation on
-http://geode.apache.org/docs/guide/11/developing/distributed_regions/chapter_overview.html[Distributed and Replicated Regions]
+See {data-store-name}'s documentation on
+{x-data-store-docs}/developing/distributed_regions/chapter_overview.html[Distributed and Replicated Regions]
for more details.
[[bootstrap:region:partition]]
== Partitioned Region
-Another Region type supported out-of-the-box by the _Spring Data Geode_ namespace is the PARTITION Region.
+The {sdg-name} XML namespace also supports `PARTITION` Regions.
-To quote the Geode docs:
+To quote the {data-store-name} docs:
-"A partitioned region is a region where data is divided between peer servers hosting the region so that
-each peer stores a subset of the data. When using a partitioned region, applications are presented with
-a logical view of the region that looks like a single map containing all of the data in the region.
-Reads or writes to this map are transparently routed to the peer that hosts the entry that is the target of
-the operation. Geode divides the domain of hashcodes into buckets. Each bucket is assigned to a specific peer,
-but may be relocated at any time to another peer in order to improve the utilization of resources across the cluster."
+"`A partitioned region is a region where data is divided between peer servers hosting the region so that each peer
+stores a subset of the data. When using a partitioned region, applications are presented with a logical view
+of the region that looks like a single map containing all of the data in the region. Reads or writes to this map
+are transparently routed to the peer that hosts the entry that is the target of the operation. {data-store-name}
+divides the domain of hashcodes into buckets. Each bucket is assigned to a specific peer, but may be relocated
+at any time to another peer in order to improve the utilization of resources across the cluster.`"
-A partition is created using the `partitioned-region` element. Its configuration options are similar to that of
-the `replicated-region` plus the partition specific features such as the number of redundant copies,
-total maximum memory, number of buckets, partition resolver and so on.
+A `PARTITION` Region is created by using the `partitioned-region` element. Its configuration options are similar to
+that of the `replicated-region` with the addition of partition-specific features, such as the number of redundant copies,
+total maximum memory, number of buckets, partition resolver, and so on.
-Below is a quick example on setting up a PARTITION Region with 2 redundant copies:
+The following example shows how to set up a `PARTITION` Region with two redundant copies:
[source,xml]
----
@@ -992,15 +1000,16 @@ Below is a quick example on setting up a PARTITION Region with 2 redundant copie
----
-Refer to Geode's documentation on
-http://geode.apache.org/docs/guide/11/developing/partitioned_regions/chapter_overview.html[Partitioned Regions]
+See {data-store-name}'s documentation on
+{x-data-store-docs}/developing/partitioned_regions/chapter_overview.html[Partitioned Regions]
for more details.
[[bootstrap:region:partition:attributes]]
=== Partitioned Region Attributes
-The following table offers a quick overview of configuration options specific to PARTITION Regions.
-These are in addition to the common Region configuration options described <>.
+The following table offers a quick overview of configuration options specific to `PARTITION` Regions.
+These options are in addition to the common Region configuration options
+described <>.
[cols="1,2,2", options="header"]
.partitioned-region attributes
@@ -1011,54 +1020,54 @@ These are in addition to the common Region configuration options described <>,
-`client-region` and `pool` elements. As the names imply, the former defines a client Region while the latter defines
-a Pool of connections to be used/shared by the various client Regions.
+{sdg-name} offers dedicated support for each configuration through its <> elements:
+`client-region` and `pool`. As the names imply, `client-region` defines a client Region, while `pool` defines
+a Pool of connections used and shared by the various client Regions.
-Below is a typical client Region configuration:
+The following example shows a typical client Region configuration:
[source,xml]
----
@@ -1080,26 +1089,27 @@ Below is a typical client Region configuration:
----
-As with the other Region types, `client-region` supports `CacheListener``s` as well as a `CacheLoader` and `CacheWriter`.
-It also requires a connection `Pool` for connecting to either a set of Locators or Servers.
-Each client Region can have its own Pool or they can share the same one.
+As with the other Region types, `client-region` supports `CacheListener` instances as well as a `CacheLoader`
+and a `CacheWriter`. It also requires a connection `Pool` for connecting to a set of either Locators or servers.
+Each client Region can have its own `Pool`, or they can share the same one. If a Pool is not specified, then
+the "DEFAULT" Pool will be used.
-NOTE: In the above example, the Pool is configured with `locator`. A Locator is a separate process used to discover
-cache servers and peer data members in the distributed system and are recommended for production systems. It is also
-possible to configure the Pool to connect directly to one or more cache servers using the `server` element.
+NOTE: In the preceding example, the `Pool` is configured with a Locator. A Locator is a separate process used to discover
+cache servers and peer data members in the distributed system and is recommended for production systems. It is also
+possible to configure the `Pool` to connect directly to one or more cache servers by using the `server` element.
-For a full list of options to set on the client and especially on the Pool, please refer to
-the _Spring Data Geode_ schema (<>) and Geode's documentation on
-http://geode.apache.org/docs/guide/11/topologies_and_comm/cs_configuration/chapter_overview.html[Client/Server Configuration].
+For a full list of options to set on the client and especially on the `Pool`, see
+the {sdg-name} schema ("`<>`") and {data-store-name}'s documentation on
+{x-data-store-docs}/topologies_and_comm/cs_configuration/chapter_overview.html[Client-Server Configuration].
[[bootstrap:region:client:interests]]
=== Client Interests
-To minimize network traffic, each client can separately define its own 'interests' policies, indicating to Geode
-the data it actually requires. In _Spring Data Geode_, 'interests' can be defined for each client Region separately.
-Both Key-based and Regular Expression-based interest types are supported.
+To minimize network traffic, each client can separately define its own 'interests' policies, indicating to
+{data-store-name} the data it actually requires. In {sdg-name}, 'interests' can be defined for each client Region
+separately. Both key-based and regular expression-based interest types are supported.
-For example:
+The following example shows both key-based and regular expression-based `interest` types:
[source,xml]
----
@@ -1113,36 +1123,37 @@ For example:
----
-A special key, `ALL_KEYS`, means 'interest' is registered for all keys. The same can be accomplished using a regex
-of `".\*"`.
+A special key, `ALL_KEYS`, means 'interest' is registered for all keys. The same can be accomplished
+by using the regular expression, `".\*"`.
-The `` _Key_ and _Regular Expression_ elements support 3 attributes: `durable`, `receive-values`
+The `` key and regular expression elements support three attributes: `durable`, `receive-values`,
and `result-policy`.
`durable` indicates whether the 'interest' policy and subscription queue created for the client when the client connects
-to 1 or more servers in the cluster is maintained across client sessions. If the client goes away and comes back,
-a "durable" subscription queue on the server(s) for the client is maintained while the client is disconnected,
-and when the client reconnects, the client will receive any events that occurred while the client was disconnected
-from the servers(s) in the cluster.
+to one or more servers in the cluster is maintained across client sessions. If the client goes away and comes back,
+a `durable` subscription queue on the servers for the client is maintained while the client is disconnected. When the
+client reconnects, the client receives any events that occurred while the client was disconnected from the servers
+in the cluster.
A subscription queue on the servers in the cluster is maintained for each `Pool` of connections defined in the client
-where subscription has also been "enabled" for that `Pool`. The subscription queue is used to store, and possibly
-conflate, events sent to the client. If the subscription queue is durable, it persists between client sessions
-(i.e. connections), potentially up to a specified timeout (if the client does not return within a given time frame
-in order to reduce resource consumption on servers in the cluster). If the subscription queue is not "durable",
-then it will be destroyed when the client disconnects. All you need to decide is, for your application use case,
-is it important for the cache client to receive events while it is disconnected, or is it only important for
-the application (cache client) to receive the "latest" events after it reconnects.
+where a subscription has also been "`enabled`" for that `Pool`. The subscription queue is used to store (and possibly
+conflate) events sent to the client. If the subscription queue is durable, it persists between client sessions
+(that is, connections), potentially up to a specified timeout. If the client does not return within a given time frame
+the client Pool subscription queue is destroyed in order to reduce resource consumption on servers in the cluster.
+If the subscription queue is not `durable`, it is destroyed immediately when the client disconnects. You need to decide
+whether your client should receive events that came while it was disconnected or if it needs to receive only the latest
+events after it reconnects.
The `receive-values` attribute indicates whether or not the entry values are received for create and update events.
-If *true*, values are received; if *false*, only invalidation events are received.
+If `true`, values are received. If `false`, only invalidation events are received.
-And finally, the 'result-policy` is an enumeration of: `KEYS`, `KEYS_VALUE` and `NONE`. The default is `KEYS_VALUES`.
+And finally, the 'result-policy` is an enumeration of: `KEYS`, `KEYS_VALUE`, and `NONE`. The default is `KEYS_VALUES`.
The `result-policy` controls the initial dump when the client first connects to initialize the local cache,
essentially seeding the client with events for all the entries that match the interest policy.
-Client-side interests registration does not do much good without enabling subscription on the `Pool` as mentioned above.
-In fact, it is an error to attempt interests registration without subscription enabled. To do so, you simply...
+Client-side interest registration does not do much good without enabling subscription on the `Pool`, as mentioned earlier.
+In fact, it is an error to attempt interest registration without subscription enabled. The following example shows
+how to do so:
[source,xml]
----
@@ -1152,18 +1163,17 @@ In fact, it is an error to attempt interests registration without subscription e
----
In addition to `subscription-enabled`, can you also set `subscription-ack-interval`,
-`subscription-message-tracking-timeout` and `subscription-redundancy`. `subscription-redundancy` is used to control
-how many copies of the subscription queue should be maintained by the servers in the cluster. If redundancy
-is greater than 1, and the "primary" subscription queue (i.e. server) goes down, then a "secondary" subscription queue
-will take over, keeping the client from missing events in a HA scenario.
+`subscription-message-tracking-timeout`, and `subscription-redundancy`. `subscription-redundancy` is used to control how
+many copies of the subscription queue should be maintained by the servers in the cluster. If redundancy is greater than
+one, and the "`primary`" subscription queue (that is, the server) goes down, then a "`secondary`" subscription queue
+takes over, keeping the client from missing events in a HA scenario.
-In addition to the `Pool` settings, the server-side Regions use an additional attribute,
-`enable-subscription-conflation`, to control the conflation of events that will be sent to the clients. This can also
-help further minimize network traffic and is useful in situations where the application only cares about
-the latest value of an entry. However, in cases where the application is keeping a time series of events that occurred,
-conflation is going to hinder that use case. The default value is *false*. An example Region configuration
-on the server for which the client contains a corresponding client [CACHING_]PROXY Region with interests in Keys
-in this server Region, would look like...
+In addition to the `Pool` settings, the server-side Regions use an additional attribute, `enable-subscription-conflation`,
+to control the conflation of events that are sent to the clients. This can also help further minimize network traffic
+and is useful in situations where the application only cares about the latest value of an entry. However, when the
+application keeps a time series of events that occurred, conflation is going to hinder that use case. The default value
+is `false`. The following example shows a Region configuration on the server, for which the client contains a
+corresponding client `[CACHING_]PROXY` Region with interests in keys in this server Region:
[source,xml]
----
@@ -1172,9 +1182,9 @@ in this server Region, would look like...
----
-To control the amount of time in seconds that "durable" subscription queue is maintained after a client is disconnected
-from the server(s) in the cluster, set the `durable-client-timeout` attribute on the `` element
-like so...
+To control the amount of time (in seconds) that a "`durable`" subscription queue is maintained after a client is
+disconnected from the servers in the cluster, set the `durable-client-timeout` attribute on the ``
+element as follows:
[source,xml]
----
@@ -1185,41 +1195,40 @@ like so...
A full, in-depth discussion of how client interests work and capabilities is beyond the scope of this document.
-Please refer to Apache Geode's documentation on
-http://gemfire.docs.pivotal.io/geode/developing/events/how_client_server_distribution_works.html[Client-to-Server Event Distribution]
+See {data-store-name}'s documentation on
+{x-data-store-docs}/developing/events/how_client_server_distribution_works.html[Client-to-Server Event Distribution]
for more details.
[[bootstrap:region:json]]
== JSON Support
-Apache Geode has support for caching JSON documents in Regions along with the ability to query stored JSON documents
-using the Geode OQL. JSON documents are stored internally as
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/PdxInstance.html[PdxInstance] types
-using the http://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/JSONFormatter.html[JSONFormatter] class
+{data-store-name} has support for caching JSON documents in Regions, along with the ability to query stored JSON
+documents using the {data-store-name} OQL (Object Query Language). JSON documents are stored internally as
+{x-data-store-javadoc}/org/apache/geode/pdx/PdxInstance.html[PdxInstance] types
+by using the {x-data-store-javadoc}/org/apache/geode/pdx/JSONFormatter.html[JSONFormatter] class
to perform conversion to and from JSON documents (as a `String`).
-_Spring Data Geode_ provides the `` element to enable a
-http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#aop-introduction[AOP, _Spring_]
-component to advise appropriate, proxied Region operations, which effectively encapsulates the `JSONFormatter`,
-thereby allowing your applications to work directly with JSON Strings.
+{sdg-name} provides the `` element to enable an
+{spring-framework-docs}/#aop-introduction[AOP] component to advise appropriate, proxied Region operations,
+which effectively encapsulates the `JSONFormatter`, thereby letting your applications work directly with JSON Strings.
-In addition, Java objects written to JSON configured Regions will be automatically converted to JSON using Jackson's
-`ObjectMapper`. Reading these values back will be returned as a JSON String.
+In addition, Java objects written to JSON configured Regions are automatically converted to JSON using Jackson's
+`ObjectMapper`. When these values are read back, they are returned as a JSON String.
By default, `` performs the conversion for all Regions. To apply this feature
-to selected Regions, provide a comma delimited list of Region bean ids via the `region-refs` attribute.
-Other attributes include a `pretty-print` flag (defaults to *false*) and `convert-returned-collections`.
+to selected Regions, provide a comma-delimited list of Region bean IDs in the `region-refs` attribute.
+Other attributes include a `pretty-print` flag (defaults to `false`) and `convert-returned-collections`.
-Also by default, the results of the `getAll()` and `values()` Region operations will be converted for
-configured Regions. This is done by creating a parallel data structure in local memory. This can incur
-significant overhead for large collections, so set the `convert-returned-collections` to *false*
-if you would like to disable automatic conversion for these Region operations.
+Also, by default, the results of the `getAll()` and `values()` Region operations are converted for configured Regions.
+This is done by creating a parallel data structure in local memory. This can incur significant overhead for large
+collections, so set the `convert-returned-collections` to `false` if you would like to disable automatic conversion
+for these Region operations.
-NOTE: Certain Region operations, specifically those that use Geode's proprietary `Region.Entry` such as:
-`entries(boolean)`, `entrySet(boolean)` and `getEntry()` type are not targeted for AOP advice. In addition,
-the `entrySet()` method which returns a `Set>` is also not affected.
+NOTE: Certain Region operations (specifically those that use {data-store-name}'s proprietary `Region.Entry`, such as:
+`entries(boolean)`, `entrySet(boolean)` and `getEntry()` type) are not targeted for AOP advice. In addition,
+the `entrySet()` method (which returns a `Set>`) is also not affected.
-Example configuration:
+The following example configuration shows how to set the `pretty-print` and `convert-returned-collections` attributes:
[source,xml]
----
@@ -1227,4 +1236,4 @@ Example configuration:
----
This feature also works seamlessly with `GemfireTemplate` operations, provided that the template is declared
-as a _Spring_ bean. Currently, the native `QueryService` operations are not supported.
+as a Spring bean. Currently, the native `QueryService` operations are not supported.
diff --git a/src/main/asciidoc/reference/repositories.adoc b/src/main/asciidoc/reference/repositories.adoc
index ce9243ba..3150e370 100644
--- a/src/main/asciidoc/reference/repositories.adoc
+++ b/src/main/asciidoc/reference/repositories.adoc
@@ -1,28 +1,28 @@
[[gemfire-repositories]]
-= Spring Data Geode Repositories
+= {sdg-name} Repositories
-== Introduction
-
-_Spring Data Geode_ provides support to use the _Spring Data Repository_ abstraction to easily persist entities
-into Geode along with execute queries. A general introduction to the _Repository programming model_ is provided
-http://docs.spring.io/spring-data/data-commons/docs/current/reference/html/#repositories[here].
+{sdg-name} provides support for using the Spring Data Repository abstraction to easily persist entities into
+{data-store-name} along with executing queries. A general introduction to the Repository programming model
+is provided http://docs.spring.io/spring-data/data-commons/docs/current/reference/html/#repositories[here].
[[gemfire-repositories.spring-configuration-xml]]
== Spring XML Configuration
-To bootstrap _Spring Data Repositories_, you use the `` element from the _Spring Data Geode_
-Data namespace:
+To bootstrap Spring Data Repositories, use the `` element from the {sdg-name} Data namespace,
+as the following example shows:
-.Bootstrap _Spring Data Geode Repositories_ in XML
+.Bootstrap {sdg-name} Repositories in XML
====
[source,xml]
+[subs="verbatim,attributes"]
----
@@ -30,74 +30,73 @@ Data namespace:
----
====
-This configuration snippet looks for interfaces below the configured base package and creates _Repository_ instances
-for those interfaces backed by a `SimpleGemFireRepository`.
+The preceding configuration snippet looks for interfaces below the configured base package and creates Repository instances
+for those interfaces backed by a https://docs.spring.io/spring-data/geode/docs/current/api/org/springframework/data/gemfire/repository/support/SimpleGemfireRepository.html[`SimpleGemFireRepository`].
-IMPORTANT: You must have your application domain classes correctly mapped to configured Regions
-or the bootstrap process will fail otherwise.
+IMPORTANT: The bootstrap process fails unless you have your application domain classes correctly mapped
+to configured Regions.
[[gemfire-repositories.spring-configuration-java]]
== Spring Java-based Configuration
-Alternatively, many users prefer to use _Spring's_
-https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-java[Java-based container configuration].
+Alternatively, many developers prefer to use Spring's {spring-framework-docs}/core.html#beans-java[Java-based container configuration].
-Using this approach, it is a simple matter to bootstrap _Spring Data Repositories_ using the SDG `@EnableGemfireRepositories`
-annotation:
+Using this approach, you can bootstrap Spring Data Repositories by using the {sdg-acronym} `@EnableGemfireRepositories`
+annotation, as the following example shows:
-.Bootstrap _Spring Data Geode Repositories_ with `@EnableGemfireRepositories`
+.Bootstrap {sdg-name} Repositories with `@EnableGemfireRepositories`
====
[source, java]
----
@SpringBootApplication
@EnableGemfireRepositories(basePackages = "com.example.acme.repository")
-class SpringApplication {
+class SpringDataApplication {
...
}
----
====
Rather than use the `basePackages` attribute, you may prefer to use the type-safe `basePackageClasses` attribute instead.
-The `basePackageClasses` allows you to specify the package containing all your application _Repository_ classes
-by specifying just one of your application _Repository_ interface types. Consider creating a special no-op marker class
-or interface in each package that serves no other purpose than to identify the location of application _Repositories_
+The `basePackageClasses` lets you specify the package that contains all your application Repository classes by
+specifying only one of your application Repository interface types. Consider creating a special no-op marker class
+or interface in each package that serves no purpose other than to identify the location of application Repositories
referenced by this attribute.
-In addition to the `basePackage[sClasses]` attributes, like _Spring's_
-https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/ComponentScan.html[`@ComponentScan`] annotation,
-the `@EnableGemfireRepositories` annotation provides _include_ and _exclude_ filters, based on _Spring's_
-https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/ComponentScan.Filter.html[`ComponentScan.Filter`] type.
-You can use the `filterType` attribute to filter by different aspects, such as whether an application _Repository_ type
-is annotated with a particular `Annotation` or extends a particular class type, and so on. See the
-https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/FilterType.html[`FilterType` _Javadoc_]
+In addition to the `basePackages and basePackageClasses` attributes, like Spring's
+{spring-framework-javadoc}/org/springframework/context/annotation/ComponentScan.html[`@ComponentScan`] annotation,
+the `@EnableGemfireRepositories` annotation provides include and exclude filters, based on Spring's
+{spring-framework-javadoc}/org/springframework/context/annotation/ComponentScan.Filter.html[`ComponentScan.Filter`] type.
+You can use the `filterType` attribute to filter by different aspects, such as whether an application Repository type
+is annotated with a particular annotation or extends a particular class type and so on. See the
+{spring-framework-javadoc}/org/springframework/context/annotation/FilterType.html[`FilterType` Javadoc]
for more details.
-The `@EnableGemfireRepositories` annotation also provides the ability to specify the location of named OQL queries,
-which reside in a Java `Properties` file, using the `namedQueriesLocation` attribute. The property name must match
-the name of a _Repository_ query method and the property value is the OQL query you want executed when
-the _Repository_ query method is called.
+The `@EnableGemfireRepositories` annotation also lets you specify the location of named OQL queries, which reside in
+a Java `Properties` file, by using the `namedQueriesLocation` attribute. The property name must match the name
+of a Repository query method and the property value is the OQL query you want executed when the Repository query method
+is called.
-The `repositoryImplementationPostfix` attribute can be set to an alternate value (defaults to "_Impl_") if your
-application requires 1 or more https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.custom-implementations[custom _Repository_ implementations].
-This feature is commonly used to extend the _Spring Data Repository_ infrastructure in order to implement a feature
-not provided out-of-the-box (OOTB) by the data store (e.g. SDG).
+The `repositoryImplementationPostfix` attribute can be set to an alternate value (defaults to `Impl`) if your
+application requires one or more {spring-data-commons-docs-html}/#repositories.custom-implementations[custom repository implementations].
+This feature is commonly used to extend the Spring Data Repository infrastructure to implement a feature not provided by
+the data store (for example, {sdg-acronym}).
-One example of where custom _Repository_ implementations are needed with Apache Geode is when performing _Joins_.
-_Joins_ are not supported by SDG _Repositories_ OOTB. With an Apache Geode `PARTITION` Region, the _Join_ must be
-performed on collocated `PARTITION` Regions even, since Apache Geode does not support "distributed" _Joins_.
-In addition, the _Equi-Join_ OQL Query must be performed inside a Geode Function.
-See http://geode.apache.org/docs/guide/12/developing/partitioned_regions/join_query_partitioned_regions.html[here]
-for more details on Apache Geode _Equi-Join Queries_.
+One example of where custom repository implementations are needed with {data-store-name} is when performing joins.
+Joins are not supported by {sdg-acronym} Repositories. With a {data-store-name} `PARTITION` Region, the join must be
+performed on collocated `PARTITION` Regions, since {data-store-name} does not support "`distributed`" joins.
+In addition, the Equi-Join OQL Query must be performed inside a {data-store-name} Function.
+See http://gemfire91.docs.pivotal.io/geode/developing/partitioned_regions/join_query_partitioned_regions.html[here]
+for more details on {data-store-name} _Equi-Join Queries_.
-Many other aspects of the SDG's _Repository_ infrastructure extension maybe customized as well. See the
-https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/repository/config/EnableGemfireRepositories.html[`@EnableGemfireRepositories` _Javadoc_]
-for more details on all configuration settings.
+Many other aspects of the {sdg-acronym}'s Repository infrastructure extension may be customized as well. See the
+https://docs.spring.io/spring-data/gemfire/docs/current/api/org/springframework/data/gemfire/repository/config/EnableGemfireRepositories.html[`@EnableGemfireRepositories`]
+Javadoc for more details on all configuration settings.
[[gemfire-repositories.queries.executing]]
== Executing OQL Queries
-_Spring Data Geode Repositories_ enable the definition of query methods to easily execute Geode OQL Queries
-against the Region the managed entity is mapped to.
+{sdg-name} Repositories enable the definition of query methods to easily execute {data-store-name} OQL queries
+against the Region the managed entity maps to, as the following example shows:
.Sample Repository
====
@@ -124,12 +123,14 @@ public interface PersonRepository extends CrudRepository {
----
====
-The first query method listed here will cause the following OQL query to be derived:
-`SELECT x FROM /People x WHERE x.emailAddress = $1`. The second query method works the same way except
-it's returning all entities found whereas the first query method expects a single result to be found.
+The first query method listed in the preceding example causes the following OQL query to be derived:
+`SELECT x FROM /People x WHERE x.emailAddress = $1`. The second query method works the same way except
+it returns all entities found, whereas the first query method expects a single result to be found.
-In case the supported keywords are not sufficient to expresss and declare your OQL query, or the method name
-becomes too verbose, you can annotate the query methods with `@Query` as seen for methods 3 and 4.
+If the supported keywords are not sufficient to declare and express your OQL query, or the method name becomes too
+verbose, then you can annotate the query methods with `@Query` as shown on the third and fourth methods.
+
+The following table gives brief samples of the supported keywords that you can use in query methods:
[cols="1,2,2", options="header"]
.Supported keywords for query methods
@@ -195,61 +196,61 @@ becomes too verbose, you can annotate the query methods with `@Query` as seen fo
| `x.active = false`
|===
-[[gemfire-repositories.queries-oql-extensions]]
-== OQL Query Extensions using Annotations
+[[gemfire-repositories.queries.oql-extensions]]
+== OQL Query Extensions Using Annotations
-Many query languages, such as Apache Geode's OQL (Object Query Language), have extensions that are not directly
-supported by _Spring Data Commons' Repository_ infrastructure.
+Many query languages, such as {data-store-name}'s OQL (Object Query Language), have extensions that are not directly
+supported by Spring Data Commons' Repository infrastructure.
-One of _Spring Data Commons' Repository_ infrastructure goals is to function as the lowest common denominator
-in order to maintain support for and portability across the widest array of data stores available and in use
-for application development today. Technically, this means developers can access multiple different data stores
-supported by _Spring Data Commons_ within their applications by reusing their existing application-specific
-Repository interfaces, a very convenient and powerful abstraction.
+One of Spring Data Commons' Repository infrastructure goals is to function as the lowest common denominator to maintain
+support for and portability across the widest array of data stores available and in use for application development
+today. Technically, this means developers can access multiple different data stores supported by Spring Data Commons
+within their applications by reusing their existing application-specific Repository interfaces -- a convenient
+and powerful abstraction.
-To support Geode's OQL Query language extensions and preserve portability across different data stores,
-_Spring Data Geode_ adds support for OQL Query extensions using Java Annotations. These Annotations will be ignored
-by other _Spring Data Repository_ implementations (e.g. _Spring Data_ JPA or _Spring Data Redis_) that do not have
-similar query language extensions.
+To support {data-store-name}'s OQL Query language extensions and preserve portability across different data stores,
+{sdg-name} adds support for OQL Query extensions by using Java annotations. These annotations are ignored by other
+Spring Data Repository implementations (such as Spring Data JPA or Spring Data Redis) that do not have similar
+query language features.
-For instance, many data stores will most likely not implement Geode's OQL `IMPORT` keyword. By implementing `IMPORT`
-as an Annotation (i.e. `@Import`) rather than as part of the query method signature (specifically, the method 'name'),
-then this will not interfere with the parsing infrastructure when evaluating the query method name to construct
-another data store language appropriate query.
+For instance, many data stores most likely do not implement {data-store-name}'s OQL `IMPORT` keyword. Implementing `IMPORT`
+as an annotation (that is, `@Import`) rather than as part of the query method signature (specifically, the method 'name')
+does not interfere with the parsing infrastructure when evaluating the query method name to construct another data store
+language appropriate query.
-Currently, the set of Geode OQL Query language extensions that are supported by _Spring Data Geode_ include:
+Currently, the set of {data-store-name} OQL Query language extensions that are supported by {sdg-name} include:
[cols="1,2,2,2", options="header"]
-.Supported Geode OQL extensions for Repository query methods
+.Supported {data-store-name} OQL extensions for Repository query methods
|===
| Keyword
| Annotation
| Description
| Arguments
-| http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/query_index/query_index_hints.html#topic_cfb_mxn_jq[HINT]
+| {x-data-store-docs}/developing/query_index/query_index_hints.html#topic_cfb_mxn_jq[HINT]
| `@Hint`
-| OQL Query Index Hints
+| OQL query index hints
| `String[]` (e.g. @Hint({ "IdIdx", "TxDateIdx" }))
-| http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/query_select/the_import_statement.html#concept_2E9F15B2FE9041238B54736103396BF7[IMPORT]
+| {x-data-store-docs}/developing/query_select/the_import_statement.html#concept_2E9F15B2FE9041238B54736103396BF7[IMPORT]
| `@Import`
| Qualify application-specific types.
| `String` (e.g. @Import("org.example.app.domain.Type"))
-| http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/query_select/the_select_statement.html#concept_85AE7D6B1E2941ED8BD2A8310A81753E__section_25D7055B33EC47B19B1B70264B39212F[LIMIT]
+| {x-data-store-docs}/developing/query_select/the_select_statement.html#concept_85AE7D6B1E2941ED8BD2A8310A81753E__section_25D7055B33EC47B19B1B70264B39212F[LIMIT]
| `@Limit`
| Limit the returned query result set.
| `Integer` (e.g. @Limit(10); default is Integer.MAX_VALUE)
-| http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/query_additional/query_debugging.html#concept_2D557E24AAB24044A3DB36B3124F6748[TRACE]
+| {x-data-store-docs}/developing/query_additional/query_debugging.html#concept_2D557E24AAB24044A3DB36B3124F6748[TRACE]
| `@Trace`
-| Enable OQL Query specific debugging.
+| Enable OQL query-specific debugging.
| NA
|===
-As an example, suppose you have a `Customers` application domain class and corresponding Geode Region along with a
-`CustomerRepository` and a query method to lookup `Customers` by last name, like so...
+As an example, suppose you have a `Customers` application domain class and corresponding {data-store-name} Region
+along with a `CustomerRepository` and a query method to lookup `Customers` by last name, as follows:
.Sample Customers Repository
====
@@ -291,15 +292,15 @@ public interface CustomerRepository extends GemfireRepository {
----
====
-This will result in the following OQL Query:
+The preceding example results in the following OQL Query:
` IMPORT org.example.app.domain.Customer; SELECT * FROM /Customers x WHERE x.lastName = $1 LIMIT 10`
-_Spring Data Geode's Repository_ extension and support is careful not to create conflicting declarations when
-the OQL Annotation extensions are used in combination with the `@Query` annotation.
+{sdg-name}'s Repository extension is careful not to create conflicting declarations when the OQL annotation extensions
+are used in combination with the `@Query` annotation.
-As another example, suppose you have a raw `@Query` annotated query method defined in your `CustomerRepository`
-like so...
+As another example, suppose you have a raw `@Query` annotated query method defined in your `CustomerRepository`,
+as follows:
.CustomerRepository
====
@@ -313,37 +314,37 @@ public interface CustomerRepository extends GemfireRepository {
@Import("org.example.app.domain.Customer")
@Query(" SELECT DISTINCT * FROM /Customers c WHERE c.reputation > $1 ORDER BY c.reputation DESC LIMIT 5")
List findDistinctCustomersByReputationGreaterThanOrderByReputationDesc(Integer reputation);
+
}
----
====
-This query method results in the following OQL Query:
+The preceding query method results in the following OQL query:
`IMPORT org.example.app.domain.Customer; SELECT DISTINCT * FROM /Customers x
WHERE x.reputation > $1 ORDER BY c.reputation DESC LIMIT 5`
-As you can see, the `@Limit(10)` annotation will +not+ override the `LIMIT` defined explicitly in the raw query.
-As well, `@Hint("CustomerIdx")` annotation does +not+ override the `HINT` explicitly defined in the raw query.
+The `@Limit(10)` annotation does not override the `LIMIT` explicitly defined in the raw query.
+Also, the `@Hint("CustomerIdx")` annotation does not override the `HINT` explicitly defined in the raw query.
Finally, the `@Trace` annotation is redundant and has no additional effect.
[NOTE]
====
-The "ReputationIdx" Index is probably not the most sensible index given the number of Customers who will possibly have
-the same value for their reputation, which will effectively reduce the effectiveness of the index. Please choose
-indexes and other optimizations wisely as an improper or poorly choosen index can have the opposite effect on your
-performance given the overhead in maintaining the index. The "ReputationIdx" was only used to serve the purpose
-of the example.
+The `ReputationIdx` index is probably not the most sensible index, given the number of customers who may possibly have
+the same value for their reputation, which reduces the effectiveness of the index. Please choose indexes and other
+optimizations wisely, as an improper or poorly chosen index can have the opposite effect on your performance because
+of the overhead in maintaining the index. The `ReputationIdx` was used only to serve the purpose of the example.
====
[[gemfire-repositories.queries.post-processing]]
== Query Post Processing
-Using the Spring Data _Repository_ abstraction, query method convention for defining data store specific queries
-(e.g. OQL) is easy and convenient. However, it is sometimes desirable to still want to inspect or even possibly
-modify the query "generated" from the _Repository_ query method.
+Thanks to using the Spring Data Repository abstraction, the query method convention for defining data store specific
+queries (e.g. OQL) is easy and convenient. However, it is sometimes desirable to still want to inspect or even possibly
+modify the query generated from the Repository query method.
-Since 2.0.x, _Spring Data Geode_ introduces the `o.s.d.gemfire.repository.query.QueryPostProcessor`
-functional interface. The interface is loosely defined as follows...
+Since 2.0.x, {sdg-name} includes the `o.s.d.gemfire.repository.query.QueryPostProcessor` functional interface.
+The interface is loosely defined as follows:
.QueryPostProcessor
====
@@ -365,31 +366,31 @@ interface QueryPostProcessor extends Ordered {
----
====
-There are additional default methods provided to allow users to compose instances of `QueryPostProcessor` very similar
-to how https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html#compose-java.util.function.Function-[java.util.function.Function.andThen(:Function)]
+There are additional default methods provided that let you compose instances of `QueryPostProcessor` similar to how
+https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html#compose-java.util.function.Function-[java.util.function.Function.andThen(:Function)]
and https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html#compose-java.util.function.Function-[java.util.function.Function.compose(:Function)]
work.
-Additionally, you will notice that the `QueryPostProcessor` interface implements the
-https://docs.spring.io/spring/docs/5.0.2.RELEASE/javadoc-api/org/springframework/core/Ordered.html[`org.springframework.core.Ordered`]
-interface, which is useful when multiple `QueryPostProcessors` are declared and registered in the Spring context
-and used to create a pipeline of processing for a group of generated query method queries.
+Additionally, the `QueryPostProcessor` interface implements the
+{spring-framework-javadoc}/org/springframework/core/Ordered.html[`org.springframework.core.Ordered`] interface,
+which is useful when multiple `QueryPostProcessors` are declared and registered in the Spring container and used to
+create a pipeline of processing for a group of generated query method queries.
Finally, the `QueryPostProcessor` accepts type arguments corresponding to the type parameters, `T` and `QUERY`,
-respectively. Type of `T` extends the _Spring Data Commons_ marker interface,
-https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/repository/Repository.html[`org.springframework.data.repository.Repository`].
-We will discuss this further below. All `QUERY` type parameter arguments in _Spring Data Geode's_ case
-will be of type `java.lang.String`.
+respectively. Type `T` extends the Spring Data Commons marker interface,
+{spring-data-commons-javadoc}/org/springframework/data/repository/Repository.html[`org.springframework.data.repository.Repository`].
+We discuss this further later in this section. All `QUERY` type parameter arguments in {sdg-name}'s case are of type
+`java.lang.String`.
-NOTE: It is useful to define the query as type `QUERY` since this `QueryPostProcessor` interface maybe ported to
-_Spring Data Commons_ and therefore must handle all forms of queries by different data stores (e.g. JPA, MongoDB,
+NOTE: It is useful to define the query as type `QUERY`, since this `QueryPostProcessor` interface may be ported to
+Spring Data Commons and therefore must handle all forms of queries by different data stores (such as JPA, MongoDB,
or Redis).
-As user may implement this interface to receive a callback with the query that was generated from the application
+You can implement this interface to receive a callback with the query that was generated from the application
`Repository` interface method when the method is called.
-For example, I might want to log all queries from all application _Repository_ interface definitions. I could do so
-using the following `QueryPostProcessor` implementation...
+For example, you might want to log all queries from all application Repository interface definitions. You could do so
+by using the following `QueryPostProcessor` implementation:
.LoggingQueryPostProcessor
====
@@ -415,10 +416,10 @@ class LoggingQueryPostProcessor implements QueryPostProcessor {
----
====
-Then, I could have typed the `LoggingQueryPostProcessor` specifically to the `CustomerRepository`, like so...
+Then you could have typed the `LoggingQueryPostProcessor` specifically to the `CustomerRepository`, as follows:
.CustomerLoggingQueryPostProcessor
====
@@ -444,12 +445,12 @@ class LoggingQueryPostProcessor implements QueryPostProcessor {
====
However, if you do not have control over the application `CustomerRepository` interface definition,
-then the `QueryPostProcessor` (i.e. `OrderedLimitedCustomerByLastNameQueryPostProcessor`) is convenient.
+then the `QueryPostProcessor` (that is, `OrderedLimitedCustomerByLastNameQueryPostProcessor`) is convenient.
-If I want to ensure the `LoggingQueryPostProcessor` always comes after the other application-defined `QueryPostProcessors`
-that I may have declared and registered in the Spring `ApplicationContext`, then I can set the `order` property
-by overriding the `o.s.core.Ordered.getOrder()` method.
+If you want to ensure that the `LoggingQueryPostProcessor` always comes after the other application-defined
+`QueryPostProcessors` that may have bean declared and registered in the Spring `ApplicationContext`, you can set
+the `order` property by overriding the `o.s.core.Ordered.getOrder()` method, as the following example shows:
.Defining the `order` property
====
@@ -522,9 +523,9 @@ class CustomerQueryPostProcessor implements QueryPostProcessor - removes an entry (by key) from the grid
...
----
-For example to add new items to the grid one can use:
+For example, to add new items to the grid, you can use the following commands:
[source]
----
@@ -76,12 +75,12 @@ null
2
----
-Multiple instances can be ran at the same time. Once started, the new VMs automatically see the existing Region
-and its information:
+Multiple instances can be ran at the same time. Once started, the new VMs automatically see the existing region
+and its information, as the following example shows:
[source]
----
-INFO: Connected to Distributed System ['Spring GemFire World'=xxxx:56218/49320@yyyyy]
+INFO: Connected to Distributed System ['Spring {data-store-name} World'=xxxx:56218/49320@yyyyy]
Hello World!
...
@@ -93,22 +92,22 @@ Hello World!
[one, two]
----
-Experiment with the example, start (and stop) as many instances as you want, run various commands in one instance
-and see how the others react. To preserve data, at least one instance needs to be alive all times. If all instances
+We encourage you to experiment with the example, start (and stop) as many instances as you want, and run various commands in one instance
+and see how the others react. To preserve data, at least one instance needs to be alive all times. If all instances
are shutdown, the grid data is completely destroyed.
[[samples:hello-world:explained]]
=== Hello World Sample Explained
-Hello World uses both _Spring_ XML and annotations for its configuration. The initial bootstrapping configuration is
+The "`Hello World`" sample uses both Spring XML and annotations for its configuration. The initial bootstrapping configuration is
`app-context.xml`, which includes the cache configuration defined in the `cache-context.xml` file
and performs classpath
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-classpath-scanning[component scanning]
-for _Spring_
+for Spring
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-annotation-config[components].
-The cache configuration defines the GemFire cache, Region and for illustrative purposes, a simple `CacheListener`
+The cache configuration defines the {data-store-name} cache, a region, and for illustrative purposes, a `CacheListener`
that acts as a logger.
-The main *beans* are `HelloWorld` and `CommandProcessor` which rely on the `GemfireTemplate` to interact with
-the distributed fabric. Both classes use annotations to define their dependency and life-cycle callbacks.
+The main beans are `HelloWorld` and `CommandProcessor`, which rely on the `GemfireTemplate` to interact with
+the distributed fabric. Both classes use annotations to define their dependency and life-cycle callbacks.
diff --git a/src/main/asciidoc/reference/serialization.adoc b/src/main/asciidoc/reference/serialization.adoc
index 6148b2ba..6c53e21a 100644
--- a/src/main/asciidoc/reference/serialization.adoc
+++ b/src/main/asciidoc/reference/serialization.adoc
@@ -1,39 +1,35 @@
[[serialization]]
-= Working with Apache Geode Serialization
+= Working with {data-store-name} Serialization
-To improve overall performance of the Apache Geode In-memory Data Grid, Geode supports a dedicated
-serialization protocol, called PDX, that is both faster and offers more compact results over
-standard Java serialization in addition to works transparently across various language platforms (Java, C++, .NET).
-Please refer to
-http://geode.apache.org/docs/guide/11/developing/data_serialization/PDX_Serialization_Features.html[PDX Serialization Features]
-and
-https://cwiki.apache.org/confluence/display/GEODE/PDX+Serialization+Internals[PDX Serialization Internals]
-for more details.
+To improve overall performance of the {data-store-name} In-memory Data Grid, {data-store-name} supports a dedicated
+serialization protocol, called PDX, that is both faster and offers more compact results over standard Java serialization
+in addition to working transparently across various language platforms (Java, C++, and .NET).
-This chapter discusses the various ways in which _Spring Data Geode_ simplifies and improves Geode's
+See {x-data-store-docs}/developing/data_serialization/PDX_Serialization_Features.html[PDX Serialization Features]
+and {x-data-store-wiki}/PDX+Serialization+Internals[PDX Serialization Internals] for more details.
+
+This chapter discusses the various ways in which {sdg-name} simplifies and improves {data-store-name}'s
custom serialization in Java.
[[serialization:wiring]]
== Wiring deserialized instances
It is fairly common for serialized objects to have transient data. Transient data is often dependent on the system
-or environment where it lives at a certain point in time. For instance, a `DataSource` is environment specific.
-Serializing such information is useless, and potentially even dangerous, since it is local to a certain VM/machine.
-For such cases, _Spring Data Geode_ offers a special
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/Instantiator.html[`Instantiator`]
-that performs wiring for each new instance created by Geode during deserialization.
+or environment where it lives at a certain point in time. For instance, a `DataSource` is environment specific.
+Serializing such information is useless and potentially even dangerous, since it is local to a certain VM or machine.
+For such cases, {sdg-name} offers a special {x-data-store-javadoc}/org/apache/geode/Instantiator.html[`Instantiator`]
+that performs wiring for each new instance created by {data-store-name} during deserialization.
-Through such a mechanism, one can rely on the _Spring_ container to inject and manage certain dependencies
-making it easy to split transient from persistent data and have *rich domain objects* in a transparent manner.
+Through such a mechanism, you can rely on the Spring container to inject and manage certain dependencies, making it easy
+to split transient from persistent data and have rich domain objects in a transparent manner.
-_Spring_ users might find this approach similar to that of
-http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#aop-atconfigurable[`@Configurable`]).
-The `WiringInstantiator` works just like `WiringDeclarableSupport`, trying to first locate a bean definition
-as a wiring template and falling back to autowiring otherwise.
+Spring users might find this approach similar to that of {spring-framework-docs}/#aop-atconfigurable[`@Configurable`]).
+The `WiringInstantiator` works similarly to `WiringDeclarableSupport`, trying to first locate a bean definition
+as a wiring template and otherwise falling back to auto-wiring.
-Please refer to the previous section (<>) for more details on wiring functionality.
+See the previous section (<>) for more details on wiring functionality.
-To use this SDG `Instantiator`, simply declare it as a bean:
+To use the {sdg-acronym} `Instantiator`, declare it as a bean, as the following example shows:
[source,xml]
----
@@ -45,18 +41,18 @@ To use this SDG `Instantiator`, simply declare it as a bean:
----
-During the _Spring_ container startup, once it is being initialized, the `Instantiator` will, by default, register
-itself with the Geode serialization system and perform wiring on all instances of `SomeDataSerializableClass`
-created by Geode during deserialization.
+During the Spring container startup, once it has been initialized, the `Instantiator`, by default, registers itself with
+the {data-store-name} serialization system and performs wiring on all instances of `SomeDataSerializableClass` created
+by {data-store-name} during deserialization.
[[serialization:instance-generator]]
-== Auto-generating custom `Instantiators`
+== Auto-generating Custom `Instantiators`
For data intensive applications, a large number of instances might be created on each machine as data flows in.
-Out-of-the-box, Geode uses reflection to create new types, but for some scenarios, this might prove to be expensive.
-As always, it is good to perform profiling to quantify whether this is the case or not. For such cases,
-_Spring Data Geode_ allows the automatic generation of `Instatiator` classes which instantiate a new type
-(using the default constructor) without the use of reflection:
+{data-store-name} uses reflection to create new types, but, for some scenarios, this might prove to be expensive.
+As always, it is good to perform profiling to quantify whether this is the case or not. For such cases, {sdg-name}
+allows the automatic generation of `Instatiator` classes, which instantiate a new type (using the default constructor)
+without the use of reflection. The following example shows how to create an instantiator:
[source,xml]
----
@@ -70,6 +66,6 @@ _Spring Data Geode_ allows the automatic generation of `Instatiator` classes whi
----
-The definition above, automatically generates two `Instantiators` for two classes, namely `CustomTypeA`
-and `CustomTypeB` and registers them with Geode, under user id `1025` and `1026`. The two `Instantiators` avoid
-the use of reflection and create the instances directly through Java code.
+The preceding definition automatically generates two `Instantiators` for two classes (`CustomTypeA` and `CustomTypeB`)
+and registers them with {data-store-name} under user ID `1025` and `1026`. The two `Instantiators` avoid the use of
+reflection and create the instances directly through Java code.
diff --git a/src/main/asciidoc/reference/snapshot.adoc b/src/main/asciidoc/reference/snapshot.adoc
index 3d39bfb9..44c546e2 100644
--- a/src/main/asciidoc/reference/snapshot.adoc
+++ b/src/main/asciidoc/reference/snapshot.adoc
@@ -1,25 +1,25 @@
[[bootstrap:snapshot]]
= Configuring the Snapshot Service
-_Spring Data Geode_ supports `Cache` and `Region` snapshots using
-http://geode.apache.org/docs/guide/11/managing/cache_snapshots/chapter_overview.html[Apache Geode's Snapshot Service].
-The out-of-the-box Snapshot Service support offers several convenient features to simplify the use of Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/CacheSnapshotService.html[Cache]
-and http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/RegionSnapshotService.html[Region]
+{sdg-name} supports cache and Region snapshots by using
+{x-data-store-docs}/managing/cache_snapshots/chapter_overview.html[{data-store-name}'s Snapshot Service].
+The out-of-the-box Snapshot Service support offers several convenient features to simplify the use of {data-store-name}'s
+{x-data-store-javadoc}/org/apache/geode/cache/snapshot/CacheSnapshotService.html[Cache]
+and {x-data-store-javadoc}/org/apache/geode/cache/snapshot/RegionSnapshotService.html[Region]
Snapshot Service APIs.
-As the http://geode.apache.org/docs/guide/11/managing/cache_snapshots/chapter_overview.html[Apache Geode documentation]
-describes, snapshots allow you to save and subsequently reload the cached data later, which can be useful for
-moving data between environments, such as from production to a staging or test environment in order to reproduce
-data-related issues in a controlled context. You can imagine combining _Spring Data Geode's_ Snapshot Service support
+As the {x-data-store-docs}/managing/cache_snapshots/chapter_overview.html[{data-store-name} documentation] explains,
+snapshots let you save and subsequently reload the cached data later, which can be useful for moving data between
+environments, such as from production to a staging or test environment in order to reproduce data-related issues
+in a controlled context. You can combine {sdg-name}'s Snapshot Service support
with http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-definition-profiles[Spring's bean definition profiles]
to load snapshot data specific to the environment as necessary.
-_Spring Data Geode's_ support for Apache Geode's Snapshot Service begins with the `` element
-from the `` namespace.
+{sdg-name}'s support for {data-store-name}'s Snapshot Service begins with the `` element
+from the `` XML namespace.
-For example, I might want to define Cache-wide snapshots to be loaded as well as saved using a couple snapshot imports
-and a data export definition as follows:
+For example, you can define cache-wide snapshots to be loaded as well as saved by using a couple of snapshot imports
+and a data export definition, as follows:
[source,xml]
----
@@ -31,13 +31,14 @@ and a data export definition as follows:
----
-You can define as many imports and/or exports as you like. You can define just imports or just exports.
-The file locations and directory paths can be absolute, or relative to the _Spring Data Geode_ application,
-JVM process's working directory.
+You can define as many imports and exports as you like. You can define only imports or only exports. The file locations
+and directory paths can be absolute or relative to the {sdg-name} application, which is the JVM process's
+working directory.
-This is a pretty simple example and the Snapshot Service defined in this case refers to the Geode `Cache` with
-the default name of `gemfireCache` (as described in <>). If you name your cache bean definition
-something other than the default, than you can use the `cache-ref` attribute to refer to the cache bean by name:
+The preceding example is pretty simple, and the Snapshot Service defined in this case refers to the {data-store-name}
+cache instance with the default name of `gemfireCache` (as described in <>). If you name your cache
+bean definition something other than the default, you can use the `cache-ref` attribute to refer to the cache bean
+by name, as follows:
[source,xml]
----
@@ -48,8 +49,7 @@ something other than the default, than you can use the `cache-ref` attribute to
----
-It is also straightforward to define a Snapshot Service for a particular Geode Region by specifying
-the `region-ref` attribute:
+You can also define a Snapshot Service for a particular Region by specifying the `region-ref` attribute, as follows:
[source,xml]
----
@@ -61,39 +61,37 @@ the `region-ref` attribute:
----
-When the `region-ref` attribute is specified, _Spring Data Geode's_ `SnapshotServiceFactoryBean` resolves
-the `region-ref` attribute value to a Region bean defined in the _Spring_ context and proceeds to create a
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/RegionSnapshotService.html[RegionSnapshotService].
-The snapshot import and export definitions function the same way, however, the `location` must refer to a file
-on export.
+When the `region-ref` attribute is specified, {sdg-name}'s `SnapshotServiceFactoryBean` resolves the `region-ref`
+attribute value to a Region bean defined in the Spring container and creates a
+{x-data-store-javadoc}/org/apache/geode/cache/snapshot/RegionSnapshotService.html[`RegionSnapshotService`].
+The snapshot import and export definitions function the same way. However, the `location` must refer to a file
+on an export.
-NOTE: Geode is strict about imported snapshot files actually existing before they are referenced. For exports,
-Geode will create the snapshot file if it does not already exist. If the snapshot file for export already exists,
-the data will be overwritten.
+NOTE: {data-store-name} is strict about imported snapshot files actually existing before they are referenced.
+For exports, {data-store-name} creates the snapshot file. If the snapshot file for export already exists,
+the data is overwritten.
-TIP: _Spring Data Geode_ includes a `suppress-import-on-init` attribute on the `` element
-to suppress the configured Snapshot Service from trying to import data into the Cache or Region on initialization.
-This is useful when data exported from 1 Region is used to feed the import of another Region, for example.
+TIP: {sdg-name} includes a `suppress-import-on-init` attribute on the `` element
+to suppress the configured Snapshot Service from trying to import data into the cache or Region on initialization.
+Doing so is useful, for example, when data exported from one Region is used to feed the import of another Region.
[[bootstrap:snapshot:location]]
== Snapshot Location
-For a `Cache`-based Snapshot Service
-(i.e. http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/CacheSnapshotService.html[CacheSnapshotService])
-a developer would typically pass it a directory containing all the snapshot files to load rather than
-individual snapshot files, as the overloaded
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/CacheSnapshotService.html#load-java.io.File-org.apache.geode.cache.snapshot.SnapshotOptions.SnapshotFormat-[load]
+With the cache-based Snapshot Service
+(that is, a {x-data-store-javadoc}/org/apache/geode/cache/snapshot/CacheSnapshotService.html[`CacheSnapshotService`])
+you would typically pass it a directory containing all the snapshot files to load rather than individual snapshot files,
+as the overloaded {x-data-store-javadoc}/org/apache/geode/cache/snapshot/CacheSnapshotService.html#load-java.io.File-org.apache.geode.cache.snapshot.SnapshotOptions.SnapshotFormat[`load`]
method in the `CacheSnapshotService` API indicates.
-NOTE: Of course, a developer may use the other, overloaded `load(:File[], :SnapshotFormat, :SnapshotOptions)` method
-variant to get specific about which snapshot files are to be loaded into the Geode `Cache`.
+NOTE: Of course, you can use the overloaded `load(:File[], :SnapshotFormat, :SnapshotOptions)` method to get specific
+about which snapshot files to load into the {data-store-name} cache.
-However, _Spring Data Geode_ recognizes that a typical developer workflow might be to extract and export data
-from one environment into several snapshot files, zip all of them up, and then conveniently move the ZIP file
+However, {sdg-name} recognizes that a typical developer workflow might be to extract and export data
+from one environment into several snapshot files, zip all of them up, and then conveniently move the zip file
to another environment for import.
-Therefore, _Spring Data Geode_ enables the developer to specify a JAR or ZIP file on import for a `Cache`-based
-Snapshot Service as follows:
+Therefore, {sdg-name} lets you specify a jar or zip file on import for a `cache`-based Snapshot Service, as follows:
[source,xml]
----
@@ -102,19 +100,18 @@ Snapshot Service as follows:
----
-_Spring Data Geode_ will conveniently extract the provided ZIP file and treat it like a directory import (load).
+{sdg-name} conveniently extracts the provided zip file and treats it as a directory import (load).
[[bootstrap:snapshot:filters]]
== Snapshot Filters
The real power of defining multiple snapshot imports and exports is realized through the use of snapshot filters.
-Snapshot filters implement Apache Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/SnapshotFilter.html[SnapshotFilter]
-interface and are used to filter Region entries for inclusion into the Region on import
-and for inclusion into the snapshot on export.
+Snapshot filters implement {data-store-name}'s {x-data-store-javadoc}/org/apache/geode/cache/snapshot/SnapshotFilter.html[`SnapshotFilter`] interface
+and are used to filter Region entries for inclusion into the Region on import and for inclusion into the snapshot
+on export.
-_Spring Data Geode_ makes it brain dead simple to utilize snapshot filters on import and export using the `filter-ref`
-attribute or an anonymous, nested bean definition:
+{sdg-name} lets you use snapshot filters on import and export by using the `filter-ref` attribute or an anonymous,
+nested bean definition, as the following example shows:
[source,xml]
----
@@ -123,39 +120,35 @@ attribute or an anonymous, nested bean definition:
-
-
-
----
-In addition, more complex snapshot filters can be expressed with the `ComposableSnapshotFilter` _Spring Data Geode_
-provided class. This class implements Geode's
-http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/SnapshotFilter.html[SnapshotFilter]
-interface as well as the https://en.wikipedia.org/wiki/Composite_pattern[Composite] software design pattern.
+In addition, you can express more complex snapshot filters by using the `ComposableSnapshotFilter` class.
+This class implements {data-store-name}'s {x-data-store-javadoc}/org/apache/geode/cache/snapshot/SnapshotFilter.html[SnapshotFilter] interface
+as well as the https://en.wikipedia.org/wiki/Composite_pattern[Composite] software design pattern.
-In a nutshell, the https://en.wikipedia.org/wiki/Composite_pattern[Composite] software design pattern allows developers
-to compose multiple objects of the same type and treat the aggregate as single instance of the object type,
-a very powerful and useful abstraction.
+In a nutshell, the https://en.wikipedia.org/wiki/Composite_pattern[Composite] software design pattern lets you
+compose multiple objects of the same type and treat the aggregate as single instance of the object type -- a
+powerful and useful abstraction.
-`ComposableSnapshotFilter` has two factory methods, `'and'` and `'or'`, allowing developers to logically combine
-individual snapshot filters using the AND and OR logical operators, respectively. The factory methods take a
-list of `SnapshotFilters`.
+`ComposableSnapshotFilter` has two factory methods, `and` and `or`. They let you logically combine individual snapshot
+filters using the AND and OR logical operators, respectively. The factory methods take a list of `SnapshotFilters`.
-In this case, the developer is only limited by his/her imagination to leverage this powerful construct.
-
-For instance:
+The following example shows a definition for a `ComposableSnapshotFilter`:
[source,xml]
----
@@ -171,7 +164,7 @@ For instance:
----
-The developer could then go onto combine the `activesUsersSinceFilter` with another filter using `'or'` like so:
+You could then go on to combine the `activesUsersSinceFilter` with another filter by using `or`, as follows:
[source,xml]
----
@@ -180,7 +173,7 @@ The developer could then go onto combine the `activesUsersSinceFilter` with anot
-
+
@@ -189,36 +182,37 @@ The developer could then go onto combine the `activesUsersSinceFilter` with anot
[[bootstrap::snapshot::events]]
== Snapshot Events
-By default, _Spring Data Geode_ uses Apache Geode's Snapshot Services on startup to import data and shutdown
-to export data. However, you may want to trigger periodic, event-based snapshots, for either import or export
-from within your _Spring_ application.
+By default, {sdg-name} uses {data-store-name}'s Snapshot Services on startup to import data and on shutdown
+to export data. However, you may want to trigger periodic, event-based snapshots, for either import or export,
+from within your Spring application.
-For this purpose, _Spring Data Geode_ defines two additional _Spring_ application events, extending _Spring's_
-http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/ApplicationEvent.html[ApplicationEvent]
+For this purpose, {sdg-name} defines two additional Spring application events, extending Spring's
+http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/ApplicationEvent.html[`ApplicationEvent`]
class for imports and exports, respectively: `ImportSnapshotApplicationEvent` and `ExportSnapshotApplicationEvent`.
-The two application events can be targeted at the entire Geode Cache, or individual Geode Regions. The constructors
-in these classes accept an optional Region pathname (e.g. "/Example") as well as 0 or more `SnapshotMetadata` instances.
+The two application events can be targeted for the entire {data-store-name} cache or for individual {data-store-name}
+Regions. The constructors in these classes accept an optional Region pathname (such as `/Example`) as well as zero
+or more `SnapshotMetadata` instances.
-The array of `SnapshotMetadata` is used to override the snapshot meta-data defined by ``
-and `` sub-elements in XML, which will be used in cases where snapshot application events
-do not explicitly provide `SnapshotMetadata`. Each individual `SnapshotMetadata` instance can define it's own
-`location` and `filters` properties.
+The array of `SnapshotMetadata` overrides the snapshot metadata defined by ``
+and `` sub-elements, which are used in cases where snapshot application events do not
+explicitly provide `SnapshotMetadata`. Each individual `SnapshotMetadata` instance can define its own `location`
+and `filters` properties.
-Import/export snapshot application events are received by all snapshot service beans defined in the _Spring_
-`ApplicationContext`. However, import/export events are only processed by "matching" Snapshot Service beans.
+All snapshot service beans defined in the Spring `ApplicationContext` receive import and export snapshot
+application events. However, only matching Snapshot Service beans process import and export events.
A Region-based `[Import|Export]SnapshotApplicationEvent` matches if the Snapshot Service bean defined
-is a `RegionSnapshotService` and it's Region reference (as determined by the `region-ref` attribute) matches
-the Region's pathname specified by the snapshot application event.
+is a `RegionSnapshotService` and its Region reference (as determined by the `region-ref` attribute) matches
+the Region's pathname, as specified by the snapshot application event.
-A Cache-based `[Import|Export]SnapshotApplicationEvent` (i.e. a snapshot application event without a Region pathname)
+A Cache-based `[Import|Export]SnapshotApplicationEvent` (that is, a snapshot application event without a Region pathname)
triggers all Snapshot Service beans, including any `RegionSnapshotService` beans, to perform either an import or export,
respectively.
-It is very easy to use _Spring's_
-http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/ApplicationEventPublisher.html[ApplicationEventPublisher]
-interface to fire import and/or export snapshot application events from your application like so:
+You can use Spring's
+{spring-framework-javadoc}/org/springframework/context/ApplicationEventPublisher.html[`ApplicationEventPublisher`]
+interface to fire import and export snapshot application events from your application as follows:
[source,java]
----
@@ -232,26 +226,30 @@ public class ExampleApplicationComponent {
private Region, ?> example;
public void someMethod() {
+
...
+ File dataSnapshot = new File(System.getProperty("user.dir"), "/path/to/export/data.snapshot");
+
SnapshotFilter myFilter = ...;
- SnapshotMetadata exportSnapshotMetadata = new SnapshotMetadata(new File(System.getProperty("user.dir"),
- "/path/to/export/data.snapshot"), myFilter, null);
+ SnapshotMetadata exportSnapshotMetadata =
+ new SnapshotMetadata(dataSnapshot, myFilter, null);
- eventPublisher.publishEvent(new ExportSnapshotApplicationEvent(this, example.getFullPath(), exportSnapshotMetadata);
+ ExportSnapshotApplicationEvent exportSnapshotEvent =
+ new ExportSnapshotApplicationEvent(this, example.getFullPath(), exportSnapshotMetadata)
+
+ eventPublisher.publishEvent(exportSnapshotEvent);
...
}
}
----
-In this particular example, only the "/Example" Region's Snapshot Service bean will pick up and handle the export event,
-saving the filtered, "/Example" Region's data to the "data.snapshot" file in a sub-direcrtory
-of the application's working directory.
+In the preceding example, only the `/Example` Region's Snapshot Service bean picks up and handles the export event,
+saving the filtered, "`/Example`" Region's data to the `data.snapshot` file in a sub-directory of the application's
+working directory.
-Using _Spring_ application events and messaging subsystem is a good way to keep your application loosely coupled.
-It is also not difficult to imagine that the snapshot application events could be fired on a periodic basis
-using _Spring's_
-http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#scheduling-task-scheduler[Scheduling]
-services.
+Using the Spring application events and messaging subsystem is a good way to keep your application loosely coupled.
+You can also use Spring's {spring-framework-docs}/#scheduling-task-scheduler[Scheduling] services to fire
+snapshot application events on a periodic basis.