SGF-732 - Change branding from Spring Data GemFire to Spring Data for Pivotal GemFire.
Change branding from 'Gemfire' or 'GemFire' to 'Pivotal GemFire'.
This commit is contained in:
40
README.md
40
README.md
@@ -1,25 +1,25 @@
|
||||
Spring Data GemFire
|
||||
===================
|
||||
Spring Data for Pivotal GemFire
|
||||
===============================
|
||||
|
||||
The primary goal of the [Spring Data GemFire](http://projects.spring.io/spring-data-gemfire) project
|
||||
is to make it easier to build highly scalable, _Spring_ powered applications using [Pivotal GemFire](https://pivotal.io/pivotal-gemfire)
|
||||
The primary goal of the [Spring Data for Pivotal GemFire](http://projects.spring.io/spring-data-gemfire) project
|
||||
is to make it easier to build highly scalable, _Spring_ powered applications using [Pivotal GemFire](https://pivotal.io/pivotal-gemfire)
|
||||
as the underlying distributed, in-memory data management platform.
|
||||
|
||||
# Examples
|
||||
|
||||
For examples on using the _Spring Data GemFire_, see the
|
||||
For examples on using the _Spring Data for Pivotal GemFire_, see the
|
||||
[spring-gemfire-examples](https://github.com/SpringSource/spring-gemfire-examples) project.
|
||||
|
||||
# Getting Help
|
||||
|
||||
Read the main project [website](http://projects.spring.io/spring-data-gemfire/) along with
|
||||
Read the main project [website](http://projects.spring.io/spring-data-gemfire/) along with
|
||||
the [User Guide](http://docs.spring.io/spring-data-gemfire/docs/current/reference/html/).
|
||||
|
||||
Look at the source code and the [JavaDocs](http://docs.spring.io/spring-data-gemfire/docs/current/api/).
|
||||
|
||||
For more detailed questions, visit [_StackOverflow_](https://stackoverflow.com/questions/tagged/spring-data-gemfire).
|
||||
|
||||
If you are new to _Spring_ as well as _Spring Data GemFire_, look for information about
|
||||
If you are new to _Spring_ as well as _Spring Data for Pivotal GemFire_, look for information about
|
||||
[_Spring_ projects](http://spring.io/projects).
|
||||
|
||||
Quick Start
|
||||
@@ -66,7 +66,7 @@ dependencies {
|
||||
}
|
||||
~~~~~
|
||||
|
||||
* Configure a GemFire cache and Region (REPLICATE, PARTITION and so on):
|
||||
* Configure a Pivotal GemFire cache and Region (REPLICATE, PARTITION and so on):
|
||||
|
||||
~~~~~ xml
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
@@ -90,7 +90,7 @@ dependencies {
|
||||
region.put(Long.valueOf(1), new Person("Jon", "Doe"));
|
||||
~~~~~
|
||||
|
||||
* And/Or `GemFireTemplate` to interact with GemFire:
|
||||
* And/Or `GemFireTemplate` to interact with Pivotal GemFire:
|
||||
|
||||
~~~~~ java
|
||||
template.query("person = 1");
|
||||
@@ -98,8 +98,8 @@ template.query("person = 1");
|
||||
|
||||
# Building
|
||||
|
||||
_Spring Data GemFire_ uses Maven as its build system. To compile the project, simply type the following Maven command
|
||||
from the root folder:
|
||||
_Spring Data for Pivotal GemFire_ uses Maven as its build system. To compile the project, simply type
|
||||
the following Maven command from the root folder:
|
||||
|
||||
mvn clean install
|
||||
|
||||
@@ -108,18 +108,18 @@ from the root folder:
|
||||
|
||||
Here are some ways for you to get involved in the community:
|
||||
|
||||
* Get involved with the _Spring_ community on the _Spring_ Community Forums (_StackOverflow_).
|
||||
Please help out on the [forum](https://stackoverflow.com/questions/tagged/spring-data-gemfire)
|
||||
* Get involved with the _Spring_ community on the _Spring_ Community Forums (_StackOverflow_).
|
||||
Please help out on the [forum](https://stackoverflow.com/questions/tagged/spring-data-gemfire)
|
||||
by responding to questions and joining the debate.
|
||||
* Create [JIRA](https://jira.spring.io/browse/SGF) tickets for bugs and new features and comment and vote on the bugs
|
||||
* Create [JIRA](https://jira.spring.io/browse/SGF) tickets for bugs and new features and comment and vote on the bugs
|
||||
you are interested in.
|
||||
* GitHub is for social coding. If you want to write code, we encourage contributions through pull requests
|
||||
from [forks of this repository](http://help.github.com/forking/). If you want to contribute code this way,
|
||||
* GitHub is for social coding. If you want to write code, we encourage contributions through pull requests
|
||||
from [forks of this repository](http://help.github.com/forking/). If you want to contribute code this way,
|
||||
please reference a JIRA ticket as well covering the specific issue you are addressing.
|
||||
* Watch for upcoming articles on _Spring_ by [subscribing](http://spring.io/blog) to spring.io.
|
||||
|
||||
Before we accept a non-trivial patch or pull request we will need you to
|
||||
[sign the Contributor License Agreement](https://cla.pivotal.io/sign/spring). Signing the contributor’s agreement
|
||||
does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions,
|
||||
and you will get an author credit if we do. If you forget to do so, you'll be reminded when you submit a pull request.
|
||||
Before we accept a non-trivial patch or pull request we will need you to
|
||||
[sign the Contributor License Agreement](https://cla.pivotal.io/sign/spring). Signing the contributor’s agreement
|
||||
does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions,
|
||||
and you will get an author credit if we do. If you forget to do so, you'll be reminded when you submit a pull request.
|
||||
Active contributors might be asked to join the core team, and given the ability to merge pull requests.
|
||||
|
||||
@@ -20,7 +20,7 @@ apply plugin: 'propdeps'
|
||||
apply plugin: 'docbook-reference'
|
||||
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
|
||||
|
||||
description = 'Spring Data GemFire'
|
||||
description = 'Spring Data for Pivotal GemFire'
|
||||
group = 'org.springframework.data'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -13,7 +13,7 @@
|
||||
<artifactId>spring-data-gemfire</artifactId>
|
||||
<version>2.0.8.BUILD-SNAPSHOT</version>
|
||||
|
||||
<name>Spring Data GemFire</name>
|
||||
<name>Spring Data for Pivotal GemFire</name>
|
||||
|
||||
<properties>
|
||||
<dist.key>SGF</dist.key>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
description = 'Spring Data GemFire Samples - Hello World'
|
||||
description = 'Spring Data for Pivotal GemFire Samples - Hello World'
|
||||
|
||||
apply plugin: 'base'
|
||||
apply plugin: 'idea'
|
||||
@@ -21,7 +21,7 @@ dependencies {
|
||||
|
||||
runtime "log4j:log4j:$log4jVersion"
|
||||
runtime "org.slf4j:slf4j-log4j12:$slf4jVersion"
|
||||
|
||||
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
testCompile "org.springframework:spring-test:$springVersion"
|
||||
}
|
||||
@@ -34,4 +34,4 @@ run {
|
||||
systemProperties['java.net.preferIPv4Stack'] = 'true'
|
||||
}
|
||||
|
||||
defaultTasks 'run'
|
||||
defaultTasks 'run'
|
||||
|
||||
@@ -20,15 +20,17 @@ import org.springframework.context.support.AbstractApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
/**
|
||||
* Hello World startup class. Bootstraps the Spring container which in turns starts GemFire and the actual application.
|
||||
* Hello World startup class.
|
||||
*
|
||||
* Bootstraps the Spring container which in turns starts Pivotal GemFire and the actual application.
|
||||
*
|
||||
* Accepts as optional parameters location of one (or multiple) application contexts that will
|
||||
* be used for configuring the Spring container. See the reference documentation for more
|
||||
* {@link http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/resources.html information}.
|
||||
*
|
||||
*
|
||||
* Note that in most (if not all) managed environments writing such a class is not needed
|
||||
* as Spring already provides the required integration.
|
||||
*
|
||||
*
|
||||
* @see org.springframework.web.context.ContextLoaderListener
|
||||
* @author Costin Leau
|
||||
*/
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd">
|
||||
|
||||
<!-- GemFire cache bean -->
|
||||
<!-- Pivotal GemFire cache bean -->
|
||||
<gfe:cache properties-ref="props" />
|
||||
<util:properties id="props" location="cache.properties"/>
|
||||
|
||||
<!-- GemFire transaction manager -->
|
||||
<!-- Pivotal GemFire transaction manager -->
|
||||
<gfe:transaction-manager />
|
||||
|
||||
|
||||
<!-- hello world region -->
|
||||
<!-- since no name is given, the region will be named after the bean -->
|
||||
<gfe:replicated-region id="myWorld">
|
||||
@@ -22,7 +22,7 @@
|
||||
<bean class="org.springframework.data.gemfire.samples.helloworld.CacheLogger"/>
|
||||
</gfe:cache-listener>
|
||||
</gfe:replicated-region>
|
||||
|
||||
|
||||
<bean id="gemfireTemplate" class="org.springframework.data.gemfire.GemfireTemplate" p:region-ref="myWorld"/>
|
||||
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[[appendix-schema]]
|
||||
[appendix]
|
||||
= Spring Data GemFire Schema
|
||||
= Spring Data for Pivotal GemFire Schema
|
||||
:resourcesDir: {basedocdir}/../resources
|
||||
|
||||
- http://www.springframework.org/schema/gemfire/spring-gemfire.xsd[Spring Data GemFire Core Schema (`gfe`-namespace)]
|
||||
- http://www.springframework.org/schema/gemfire/spring-data-gemfire.xsd[Spring Data GemFire Data Access Schema (`gfe-data`-namespace)]
|
||||
- http://www.springframework.org/schema/gemfire/spring-gemfire.xsd[Spring Data for Pivotal GemFire Core Schema (`gfe`-namespace)]
|
||||
- http://www.springframework.org/schema/gemfire/spring-data-gemfire.xsd[Spring Data for Pivotal GemFire Data Access Schema (`gfe-data`-namespace)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
= Spring Data GemFire Reference Guide
|
||||
= Spring Data for Pivotal GemFire Reference Guide
|
||||
Costin Leau , David Turanski , John Blum , Oliver Gierke
|
||||
:revnumber: {version}
|
||||
:revdate: {localdate}
|
||||
@@ -6,7 +6,7 @@ Costin Leau , David Turanski , John Blum , Oliver Gierke
|
||||
:toc:
|
||||
:!toc-placement:
|
||||
|
||||
(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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[[introduction]]
|
||||
= Introduction
|
||||
|
||||
This reference guide for _Spring Data GemFire_ explains how to use the _Spring Framework_ to configure and develop
|
||||
applications with Pivotal GemFire. It presents the basic concepts, semantics and provides numerous examples
|
||||
to help you get started.
|
||||
Welcome! The _Spring Data for Pivotal GemFire_ reference guide explains how to use the _Spring Framework_
|
||||
to configure and develop applications with Pivotal GemFire. It presents the basic concepts and provides
|
||||
numerous examples to help you get started.
|
||||
|
||||
@@ -1,48 +1,49 @@
|
||||
[[new-features]]
|
||||
= New Features
|
||||
|
||||
NOTE: As of the 1.2.0.RELEASE, this project, formerly known as _Spring GemFire_, has been renamed to
|
||||
_Spring Data GemFire_ to reflect that it is now a module of the
|
||||
http://projects.spring.io/spring-data/[Spring Data] project.
|
||||
NOTE: As of the 1.2.0.RELEASE, this project, formerly known as _Spring Pivotal GemFire_, has been renamed to
|
||||
_Spring Data for Pivotal GemFire_ to reflect that it is now a module of the
|
||||
http://projects.spring.io/spring-data/[Spring Data] project
|
||||
and built on https://pivotal.io/pivotal-gemfire[Pivotal GemFire].
|
||||
|
||||
[[new-in-1-2-0]]
|
||||
== New in the 1.2 Release
|
||||
|
||||
* Full support for GemFire configuration via the SDG *gfe* namespace. Now GemFire components may be configured completely without requiring a native *cache.xml* file.
|
||||
* WAN Gateway support for GemFire 6.6.x. See <<bootstrap:gateway>>.
|
||||
* Full support for Pivotal GemFire configuration via the SDG *gfe* namespace. Now Pivotal GemFire components may be configured completely without requiring a native *cache.xml* file.
|
||||
* WAN Gateway support for Pivotal GemFire 6.6.x. See <<bootstrap:gateway>>.
|
||||
* Spring Data Repository support using a dedicated SDG namespace, *gfe-data*. See <<gemfire-repositories>>
|
||||
* Namespace support for registering GemFire Functions. See <<bootstrap:function>>
|
||||
* Namespace support for registering Pivotal GemFire Functions. See <<bootstrap:function>>
|
||||
* A top-level `<disk-store>` element has been added to the SDG *gfe* namespace to allow sharing of persist stores among Regions,
|
||||
and other components that support persistent backup or overflow. See <<bootstrap-diskstore>>
|
||||
+
|
||||
WARNING: The `<*-region>` elements no longer allow a nested `<disk-store>` element.
|
||||
+
|
||||
* GemFire Sub-Regions are supported via nested `<*-region>` elements.
|
||||
* Pivotal GemFire Sub-Regions are supported via nested `<*-region>` elements.
|
||||
* A `<local-region>` element has been added to configure a Local Region.
|
||||
* Support for the re-designed WAN Gateway in GemFire 7.0.
|
||||
* Support for the re-designed WAN Gateway in Pivotal GemFire 7.0.
|
||||
|
||||
[[new-in-1-3-0]]
|
||||
== New in the 1.3 Release
|
||||
|
||||
* Annotation support for GemFire Functions. It is now possible to declare and register Functions written as POJOs using annotations. In addition, Function executions are defined as
|
||||
* Annotation support for Pivotal GemFire Functions. It is now possible to declare and register Functions written as POJOs using annotations. In addition, Function executions are defined as
|
||||
annotated interfaces, similar to the way Spring Data Repositories work. See <<function-annotations>>.
|
||||
* Added a `<datasource>` element to the SDG *gfe-data* namespace to simplify establishing a basic <<data-access:datasource,client connection>> to a GemFire data grid.
|
||||
* Added a `<datasource>` element to the SDG *gfe-data* namespace to simplify establishing a basic <<data-access:datasource,client connection>> to a Pivotal GemFire data grid.
|
||||
* Added a `<json-region-autoproxy>` element to the SDG *gfe-data* namespace to <<bootstrap:region:json,support JSON>> features introduced
|
||||
in GemFire 7.0, enabling Spring AOP to perform the necessary conversions automatically on Region operations.
|
||||
* Upgraded to GemFire 7.0.1 and added namespace support for new AsyncEventQueue attributes.
|
||||
in Pivotal GemFire 7.0, enabling Spring AOP to perform the necessary conversions automatically on Region operations.
|
||||
* Upgraded to Pivotal GemFire 7.0.1 and added namespace support for new AsyncEventQueue attributes.
|
||||
* Added support for setting subscription interest policy on Regions.
|
||||
* Support for void returns on Function executions. See <<function-annotations>> for complete details.
|
||||
* Support for persisting Local Regions. See <<bootstrap:region:local>> and <<bootstrap:region:common:attributes>>.
|
||||
* Support for entry time-to-live and entry idle-time on a GemFire Client Cache. See <<bootstrap:cache:client>>.
|
||||
* Support for multiple Spring Data GemFire web-based applications using a single GemFire cluster, operating concurrently inside tc Server.
|
||||
* Support for concurrency-checks-enabled on all GemFire Cache Region definitions using the SDG *gfe* namespace. See <<bootstrap:region:common:attributes>>.
|
||||
* Support for entry time-to-live and entry idle-time on a Pivotal GemFire Client Cache. See <<bootstrap:cache:client>>.
|
||||
* Support for multiple Spring Data for Pivotal GemFire web-based applications using a single Pivotal GemFire cluster, operating concurrently inside tc Server.
|
||||
* Support for concurrency-checks-enabled on all Pivotal GemFire Cache Region definitions using the SDG *gfe* namespace. See <<bootstrap:region:common:attributes>>.
|
||||
* Support for Cache Loaders and Cache Writers on Client, Local Regions. See <<bootstrap:region:common:loaders-writers>>.
|
||||
* Support for registering CacheListeners, AsyncEventQueues and Gateway Senders on GemFire Cache Sub-Regions.
|
||||
* Support for PDX persistent keys in GemFire Regions.
|
||||
* Support for registering CacheListeners, AsyncEventQueues and Gateway Senders on Pivotal GemFire Cache Sub-Regions.
|
||||
* Support for PDX persistent keys in Pivotal GemFire Regions.
|
||||
* Support for correct Partition Region bean creation in a Spring context when collocation is specified with the *colocated-with* attribute.
|
||||
* Full support for GemFire Cache Sub-Regions using proper, nested `<*-region>` element syntax in the SDG *gfe* namespace.
|
||||
* Upgraded Spring Data GemFire to Spring Framework 3.2.8.
|
||||
* Upgraded Spring Data GemFire to Spring Data Commons 1.7.1.
|
||||
* Full support for Pivotal GemFire Cache Sub-Regions using proper, nested `<*-region>` element syntax in the SDG *gfe* namespace.
|
||||
* Upgraded Spring Data for Pivotal GemFire to Spring Framework 3.2.8.
|
||||
* Upgraded Spring Data for Pivotal GemFire to Spring Data Commons 1.7.1.
|
||||
|
||||
[[new-in-1-4-0]]
|
||||
== New in the 1.4 Release
|
||||
@@ -50,27 +51,27 @@ in GemFire 7.0, enabling Spring AOP to perform the necessary conversions automat
|
||||
* Upgrades to Pivotal GemFire 7.0.2.
|
||||
* Upgrades to _Spring Data Commons_ 1.8.x.RELEASE.
|
||||
* Upgrades to _Spring Framework_ 3.2.x.RELEASE.
|
||||
* Integrates _Spring Data GemFire_ with _Spring Boot_, which includes both a *spring-boot-starter-data-gemfire* POM
|
||||
along with a _Spring Boot_ sample application demonstrating GemFire Cache Transactions configured with SDG
|
||||
* Integrates _Spring Data for Pivotal GemFire_ with _Spring Boot_, which includes both a *spring-boot-starter-data-gemfire* POM
|
||||
along with a _Spring Boot_ sample application demonstrating Pivotal GemFire Cache Transactions configured with SDG
|
||||
and bootstrapped with _Spring Boot_.
|
||||
* Support for bootstrapping a Spring `ApplicationContext` in a GemFire Server when started from _Gfsh_.
|
||||
* Support for bootstrapping a Spring `ApplicationContext` in a Pivotal GemFire Server when started from _Gfsh_.
|
||||
See <<gemfire-bootstrap>> for more details.
|
||||
* Support for persisting application domain object/entities to multiple GemFire Cache Regions.
|
||||
* Support for persisting application domain object/entities to multiple Pivotal GemFire Cache Regions.
|
||||
See <<mapping.entities>> for more details.
|
||||
* Support for persisting application domain object/entities to GemFire Cache Sub-Regions, avoiding collisions
|
||||
* Support for persisting application domain object/entities to Pivotal GemFire Cache Sub-Regions, avoiding collisions
|
||||
when Sub-Regions are uniquely identifiable, but identically named.
|
||||
See <<mapping.entities>> for more details.
|
||||
* Adds strict XSD type rules to, and full support for, Data Policies and Region Shortcuts
|
||||
on all GemFire Cache Region types.
|
||||
on all Pivotal GemFire Cache Region types.
|
||||
* Changed the default behavior of SDG `<*-region>` elements from lookup to always create a new Region
|
||||
along with an option to restore old behavior using the *ignore-if-exists* attribute.
|
||||
See <<bootstrap:region:common:attributes, Common Region Attributes>>
|
||||
and <<bootstrap:region:common:regions-subregions-lookups-caution>>
|
||||
for more details.
|
||||
* _Spring Data GemFire_ can now be fully built and ran on JDK 7 and JDK 8.
|
||||
* _Spring Data for Pivotal GemFire_ can now be fully built and ran on JDK 7 and JDK 8.
|
||||
|
||||
CAUTION: Pivotal GemFire has not yet been fully tested and certified to run JDK 8; See
|
||||
http://gemfire.docs.pivotal.io/docs-gemfire/supported_configs/supported_configs_and_system_reqs.html[GemFire User Guide]
|
||||
http://gemfire.docs.pivotal.io/docs-gemfire/supported_configs/supported_configs_and_system_reqs.html[Pivotal GemFire User Guide]
|
||||
for additional details.
|
||||
|
||||
[[new-in-1-5-0]]
|
||||
@@ -80,12 +81,12 @@ for additional details.
|
||||
* Upgrades to _Spring Data Commons_ 1.9.x.RELEASE.
|
||||
* Upgrades to _Spring Framework_ 4.0.x.RELEASE.
|
||||
* Reference Guide migrated to Asciidoc.
|
||||
* Renewed support for deploying _Spring Data GemFire_ in an OSGi container.
|
||||
* Removed all default values in the _Spring Data GemFire_ XML namespace Region-type elements to
|
||||
rely on GemFire defaults instead.
|
||||
* Renewed support for deploying _Spring Data for Pivotal GemFire_ in an OSGi container.
|
||||
* Removed all default values in the _Spring Data for Pivotal GemFire_ XML namespace Region-type elements to
|
||||
rely on Pivotal GemFire defaults instead.
|
||||
* Added convenience to automatically create Disk Store directory locations.
|
||||
* SDG annotated Function implementations can now be executed from _Gfsh_.
|
||||
* Enable GemFire `GatewayReceivers` to be started manually.
|
||||
* Enable Pivotal GemFire `GatewayReceivers` to be started manually.
|
||||
* Support for Auto Region Lookups. See <<bootstrap:region:auto-lookup>> for further details.
|
||||
* Support for Region Templates. See <<bootstrap:region:common:region-templates>> for further details.
|
||||
|
||||
@@ -95,10 +96,10 @@ rely on GemFire defaults instead.
|
||||
* Upgrades to Pivotal GemFire 8.0.0.
|
||||
* Upgrades to _Spring Data Commons_ 1.10.x.RELEASE.
|
||||
* Maintains support on _Spring Framework_ 4.0.x.RELEASE.
|
||||
* Adds support for GemFire 8's new Cluster-based Configuration.
|
||||
* Enables 'auto-reconnect' functionality to be employed in Spring-configured GemFire Servers.
|
||||
* Adds support for Pivotal GemFire 8's new Cluster-based Configuration.
|
||||
* Enables 'auto-reconnect' functionality to be employed in Spring-configured Pivotal GemFire Servers.
|
||||
* Allows the creation of concurrent and parallel Async Event Queues and Gateway Senders.
|
||||
* Adds support for GemFire 8's Region data compression.
|
||||
* Adds support for Pivotal GemFire 8's Region data compression.
|
||||
* Adds attributes to set both critical and warning percentages on Disk Store usage.
|
||||
* Supports the capability to add the new EventSubstitutionFilters to GatewaySenders.
|
||||
|
||||
@@ -109,7 +110,7 @@ rely on GemFire defaults instead.
|
||||
* Upgrades to _Spring Data Commons_ 1.11.x.RELEASE.
|
||||
* Upgrades to _Spring Framework_ 4.1.x.RELEASE.
|
||||
* Early access support for Pivotal GemFire.
|
||||
* Support for adding _Spring_-defined Cache Listeners, Loaders and Writers on "existing" GemFire Regions
|
||||
* Support for adding _Spring_-defined Cache Listeners, Loaders and Writers on "existing" Pivotal GemFire Regions
|
||||
configured in _Spring_ XML, `cache.xml` or even with Pivotal GemFire's _Cluster Config_.
|
||||
* _Spring_ JavaConfig support added to `SpringContextBootstrappingInitializer`.
|
||||
* Support for custom `ClassLoaders` in `SpringContextBootstrappingInitializer` to load _Spring_-defined bean classes.
|
||||
@@ -135,10 +136,10 @@ endpoint lists configured with _Spring's_ property placeholders.
|
||||
* Adds `durable-client-id` and `durable-client-timeout` attributes to `<gfe:client-cache>`.
|
||||
* GemfirePersistentProperty now properly handles other non-entity, scalar-like types (e.g. `BigDecimal`, `BigInteger`).
|
||||
* Prevents SDG-defined `Pools` from being destroyed before `Regions` that use those `Pools`.
|
||||
* Handles case-insensitive GemFire OQL queries defined as _Repository_ query methods.
|
||||
* Changes `GemFireCache.evict(key)` to call `Region.remove(key)` in SDG's _Spring Cache Abstraction_ support.
|
||||
* Handles case-insensitive Pivotal GemFire OQL queries defined as _Repository_ query methods.
|
||||
* Changes `Pivotal GemFireCache.evict(key)` to call `Region.remove(key)` in SDG's _Spring Cache Abstraction_ support.
|
||||
* Fixes `RegionNotFoundException` with _Repository_ queries on a client `Region` associated with a specific `Pool`
|
||||
configured for GemFire server groups.
|
||||
configured for Pivotal GemFire server groups.
|
||||
* Changes `Gateway Senders/Receivers` to no longer be tied to the _Spring_ container.
|
||||
|
||||
[[new-in-1-9-0]]
|
||||
@@ -151,9 +152,9 @@ configured for GemFire server groups.
|
||||
* Adds support for suspend and resume in the `GemfireTransactionManager`.
|
||||
* Adds support in _Repositories_ to use the bean `id` property as the Region key when the `@Id` annotation
|
||||
is not present.
|
||||
* Uses `MappingPdxSerializer` as the default GemFire serialization strategy when `@EnablePdx` is used.
|
||||
* Uses `MappingPdxSerializer` as the default Pivotal GemFire serialization strategy when `@EnablePdx` is used.
|
||||
* Enables `GemfireCacheManager` to explicitly list Region names to be used in the _Spring's Caching Abstraction_.
|
||||
* Configure GemFire Caches, CacheServers, Locators, Pools, Regions, Indexes, DiskStores, Expiration, Eviction,
|
||||
* Configure Pivotal GemFire Caches, CacheServers, Locators, Pools, Regions, Indexes, DiskStores, Expiration, Eviction,
|
||||
Statistics, Mcast, HttpService, Auth, SSL, Logging, System Properties.
|
||||
* Repository support with multiple _Spring Data_ modules on the classpath.
|
||||
|
||||
@@ -171,4 +172,4 @@ Statistics, Mcast, HttpService, Auth, SSL, Logging, System Properties.
|
||||
* Renames `@EnableIndexes` to `@EnableIndexing`.
|
||||
* Introduces a `InterestsBuilder` class to easily and conveniently express Interests in keys/values between client
|
||||
and server when using JavaConfig.
|
||||
* Adds support for Off-Heap, Redis Adapter and GemFire's new Security framework to the Annotation configuration model.
|
||||
* Adds support for Off-Heap, Redis Adapter and Pivotal GemFire's new Security framework to the Annotation configuration model.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[[requirements]]
|
||||
= Requirements
|
||||
|
||||
_Spring Data GemFire_ requires JDK 8.0, http://projects.spring.io/spring-framework[Spring Framework] 5
|
||||
_Spring Data for Pivotal GemFire_ requires JDK 8.0, http://projects.spring.io/spring-framework[Spring Framework] 5
|
||||
and http://geode.apache.org/[Pivotal GemFire] 9.0.x.
|
||||
|
||||
@@ -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-gemfire[Spring Data GemFire source code]
|
||||
* https://jira.spring.io/browse/SGF[Spring Data GemFire 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://projects.spring.io/spring-data-gemfire[Spring Data for Pivotal GemFire Project Page]
|
||||
* https://github.com/spring-projects/spring-data-gemfire[Spring Data for Pivotal GemFire source code]
|
||||
* https://jira.spring.io/browse/SGF[Spring Data for Pivotal GemFire JIRA]
|
||||
* http://stackoverflow.com/questions/tagged/spring-data-gemfire[Spring Data for Pivotal GemFire on StackOverflow]
|
||||
* http://forum.spring.io/forum/spring-projects/data/gemfire[Archive of the Spring Data for Pivotal GemFire Forum on Spring IO]
|
||||
* https://pivotal.io/pivotal-gemfire[Pivotal GemFire Home Page]
|
||||
* http://gemfire.docs.pivotal.io/gemfire/about_gemfire.html[Pivotal GemFire Documentation]
|
||||
* http://gemfire.docs.pivotal.io/latest/gemfire/about_gemfire.html[Pivotal GemFire Documentation]
|
||||
* http://geode.apache.org/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]
|
||||
* https://issues.apache.org/jira/projects/GEODE/issues/GEODE-4748?filter=allopenissues[Apache Geode JIRA]
|
||||
* http://stackoverflow.com/questions/tagged/gemfire[Pivotal GemFire on StackOverflow]
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
= Preface
|
||||
|
||||
_Spring Data GemFire_ focuses on integrating the _Spring Framework's_ powerful, non-invasive programming model
|
||||
and concepts with Pivotal GemFire to simplify configuration and development of Java applications using GemFire.
|
||||
_Spring Data for Pivotal GemFire_ focuses on integrating the _Spring Framework's_ powerful, non-invasive programming model
|
||||
and concepts with Pivotal GemFire to simplify configuration and development of Java applications using Pivotal GemFire.
|
||||
|
||||
This document assumes the reader already has a basic familiarity with the _Spring Framework_ and Pivotal GemFire
|
||||
concepts and APIs.
|
||||
This document assumes the reader already has a basic understanding and some familiarity with the core _Spring Framework_
|
||||
and Pivotal GemFire concepts and APIs.
|
||||
|
||||
While every effort has been made to ensure this documentation is comprehensive and complete, with no errors,
|
||||
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 (e.g. data distribution management
|
||||
with partitioning for HA while still preserving consistency). Additionally, some typos might have crept in.
|
||||
using partitioning with 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 GemFire_ team by raising an appropriate
|
||||
https://jira.spring.io/browse/DATAGEODE[issue].
|
||||
to the attention of the _Spring Data_ team by raising an appropriate
|
||||
https://jira.spring.io/browse/SGF[issue in JIRA].
|
||||
|
||||
Thank you.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
= Bootstrapping Pivotal GemFire using Spring Annotations
|
||||
|
||||
_Spring Data for Pivotal GemFire_ (SDG) 2.0 introduces a **new** Annotation-based configuration model
|
||||
to bootstrap and configure Pivotal GemFire using the Spring container.
|
||||
to configure and bootstrap Pivotal GemFire using the Spring container.
|
||||
|
||||
The primary motivation for introducing an Annotation-based approach to the configuration of Pivotal GemFire in
|
||||
a Spring context is to enable application developers to _**get up and running** as **quickly**
|
||||
@@ -26,7 +26,7 @@ http://gemfire.docs.pivotal.io/geode/topologies_and_comm/multi_site_configuratio
|
||||
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.
|
||||
|
||||
The Annotation-based configuration model is an alternative to XML-based configuration using _Spring Data GemFire's_
|
||||
The Annotation-based configuration model is an alternative to XML-based configuration using _Spring Data for Pivotal GemFire'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 <<bootstrap, Bootstrapping
|
||||
Pivotal GemFire with the Spring Container>> for more details.
|
||||
@@ -34,7 +34,7 @@ Pivotal GemFire with the Spring Container>> for more details.
|
||||
NOTE: As of SDG 2.0, the new Annotation-based configuration model does not yet have configuration support
|
||||
for Pivotal GemFire's WAN components and topology.
|
||||
|
||||
Like _Spring Boot_, _Spring Data GemFire's_ Annotation-based configuration model was designed as an opinionated,
|
||||
Like _Spring Boot_, _Spring Data for Pivotal GemFire's_ Annotation-based configuration model was designed as an opinionated,
|
||||
_convention over configuration_ approach for using Pivotal GemFire. Indeed, this Annotation-based configuration model
|
||||
was inspired by _Spring Boot_ as well as several other Spring and _Spring Data_ projects.
|
||||
|
||||
@@ -49,7 +49,7 @@ unnecessarily configure a large number of attributes or properties just to use t
|
||||
Again, _getting up and running as quickly and as easily as possible_ is the primary objective.
|
||||
|
||||
However, the option to customize the configuration meta-data and behavior of Pivotal GemFire is there should an application
|
||||
developer need it and _Spring Data GemFire's_ Annotation-based configuration will quietly back away. The application
|
||||
developer need it and _Spring Data for Pivotal GemFire'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 Pivotal GemFire feature or embedded service using Annotations.
|
||||
|
||||
@@ -151,7 +151,7 @@ _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 GemFire_ approach, with Annotations.
|
||||
will prefer to configure and start your servers using the _Spring Data for Pivotal GemFire_ approach, with Annotations.
|
||||
|
||||
As an application developer, you will no doubt want to customize the "DEFAULT" `Pool` setup by Pivotal GemFire
|
||||
to possibly connect to 1 or more Locators, for instance...
|
||||
@@ -245,7 +245,7 @@ One of the finer features of Spring is the ability to use _property placeholders
|
||||
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!
|
||||
|
||||
So, _Spring Data GemFire_ borrows from another commonly used pattern in Spring, `Configurers`. Many different
|
||||
So, _Spring Data for Pivotal GemFire_ 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`].
|
||||
|
||||
@@ -254,7 +254,7 @@ the configuration of a component, or bean on startup. The framework calls back
|
||||
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 GemFire_ provides several `Configurer` callback interfaces to customize different aspects of Annotation-based
|
||||
_Spring Data for Pivotal GemFire_ 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:
|
||||
|
||||
* `ClientCacheConfigurer`
|
||||
@@ -320,9 +320,9 @@ In addition, when the `Configurer` is declared as a bean in the Spring context,
|
||||
of other Spring container features, such as _property placeholders_, or _SpEL expressions_ using the `@Value` annotation
|
||||
on factory method parameters, and so on.
|
||||
|
||||
All _Spring Data GemFire_-provided `Configurers` take 2 bits of information in the callback: the name of the bean created
|
||||
All _Spring Data for Pivotal GemFire_-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 GemFire component (e.g. a `ClientCache` instance is created and configured with
|
||||
create and configure the Pivotal GemFire component (e.g. a `ClientCache` instance is created and configured with
|
||||
SDG's `ClientCacheFactoryBean`).
|
||||
|
||||
NOTE: SDG `FactoryBeans` are part of the SDG public API and are what an application developer would use in Spring's
|
||||
@@ -486,7 +486,7 @@ the use case.
|
||||
As mentioned previously, Pivotal GemFire 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.
|
||||
|
||||
It is often convenient for application developers as they are developing their _Spring Boot_, _Spring Data GemFire_
|
||||
It is often convenient for application developers as they are developing their _Spring Boot_, _Spring Data for Pivotal GemFire_
|
||||
applications to startup up a small cluster of 2 or 3 Pivotal GemFire servers. Rather than starting a separate Locator
|
||||
process, a user can simply annotate her _Spring Boot_ `@CacheServerApplication` class with `@EnableLocator`.
|
||||
|
||||
@@ -828,7 +828,7 @@ domain object type-specific `PdxSerializer` instances, but acts as a single `Pdx
|
||||
|
||||
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 GemFire_ will take care of registering it with Pivotal GemFire on the user's behalf.
|
||||
_Spring Data for Pivotal GemFire_ will take care of registering it with Pivotal GemFire on the user's behalf.
|
||||
|
||||
.Spring `ClientCache` application with PDX enabled, using a custom, composite `PdxSerializer`
|
||||
[source, java]
|
||||
@@ -847,7 +847,7 @@ public class ClientApplication {
|
||||
|
||||
It is also possible to declare Pivotal GemFire's
|
||||
http://gemfire-91-javadocs.docs.pivotal.io/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 GemFire's_ more robust,
|
||||
as a bean definition in a Spring context. Alternatively, you should use _Spring Data for Pivotal GemFire'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
|
||||
handling than reflection alone.
|
||||
@@ -882,7 +882,7 @@ with SSL, or they can all be collectively configured at once to use SSL using th
|
||||
It is easy to specify which Pivotal GemFire components that the SSL configuration settings should applied to using
|
||||
the nested `@EnableSsl` annotation `Component` enum...
|
||||
|
||||
.Spring `ClientCache` application with SSL enabled by Aache GemFire component
|
||||
.Spring `ClientCache` application with SSL enabled by Aache Pivotal GemFire component
|
||||
[source, java]
|
||||
----
|
||||
@SpringBootApplication
|
||||
@@ -900,36 +900,36 @@ More details on Pivotal GemFire SSL support can be found
|
||||
http://gemfire.docs.pivotal.io/geode/managing/security/ssl_overview.html[here].
|
||||
|
||||
[[bootstrap-annotation-config-gemfire-properties]]
|
||||
== Configuring GemFire Properties
|
||||
== Configuring Pivotal GemFire Properties
|
||||
|
||||
While many of the http://gemfire.docs.pivotal.io/geode/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 _GemFire Properties_ are still accessible from the `@EnableGemFireProperties` annotation.
|
||||
the less commonly used _Pivotal GemFire Properties_ are still accessible from the `@EnablePivotal GemFireProperties` annotation.
|
||||
|
||||
Using the `@EnableGemFireProperties` annotation on your application class is convenient and a nice alternative to
|
||||
creating a `gemfire.properties` file or setting _GemFire Properties_ as Java System properties on the command-line
|
||||
Using the `@EnablePivotal GemFireProperties` annotation on your application class is convenient and a nice alternative to
|
||||
creating a `gemfire.properties` file or setting _Pivotal GemFire Properties_ as Java System properties on the command-line
|
||||
when launching your application.
|
||||
|
||||
TIP: It is recommended that these _GemFire Properties_ be set in a `gemfire.properties` file when deploying
|
||||
TIP: It is recommended that these _Pivotal GemFire 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.
|
||||
|
||||
A few examples of some of the less common _GemFire Properties_ that a user usually need not worry about include,
|
||||
A few examples of some of the less common _Pivotal GemFire Properties_ that a user usually need not worry about include,
|
||||
but are not limited to: `ack-wait-threshold`, `disable-tcp`, `socket-buffer-size`, etc.
|
||||
|
||||
To individually set any _GemFire Property_, simply annotate your application class with `@EnableGemFireProperties`
|
||||
and set the _GemFire Properties_ you want to change from the default, out-of-the-box value set by Pivotal GemFire...
|
||||
To individually set any _Pivotal GemFire Property_, simply annotate your application class with `@EnablePivotal GemFireProperties`
|
||||
and set the _Pivotal GemFire Properties_ you want to change from the default, out-of-the-box value set by Pivotal GemFire...
|
||||
|
||||
.Spring `ClientCache` application with specific _GemFire Properties_ set
|
||||
.Spring `ClientCache` application with specific _Pivotal GemFire Properties_ set
|
||||
[source, java]
|
||||
----
|
||||
@SpringBootApplication
|
||||
@ClientCacheApplication
|
||||
@EnableGemFireProperties(conflateEvents = true, socketBufferSize = 16384)
|
||||
@EnablePivotal GemFireProperties(conflateEvents = true, socketBufferSize = 16384)
|
||||
public class ClientApplication { .. }
|
||||
----
|
||||
|
||||
Keep in mind, some of the _GemFire Properties_ are client specific (e.g. `conflateEvents`) while others are
|
||||
Keep in mind, some of the _Pivotal GemFire Properties_ are client specific (e.g. `conflateEvents`) while others are
|
||||
server specific (e.g. `distributedSystemId`, `enableNetworkPartitionDetection`, `enforceUniqueHost`, `memberTimeout`,
|
||||
`redundancyZone`, etc).
|
||||
|
||||
@@ -951,7 +951,7 @@ Region as a table in a relational database. Generally, a Region should only sto
|
||||
more conducive for building effective `Indexes` and writing queries. We will talk about Indexing
|
||||
<<bootstrap-annotation-config-indexes,later>>.
|
||||
|
||||
Previously, _Spring Data GemFire_ users needed to explicitly define and declare the Regions used in their applications
|
||||
Previously, _Spring Data for Pivotal GemFire_ 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]...
|
||||
@@ -960,10 +960,10 @@ https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#
|
||||
[source, java]
|
||||
----
|
||||
@Configuration
|
||||
class GemFireConfiguration {
|
||||
class Pivotal GemFireConfiguration {
|
||||
|
||||
@Bean("Example")
|
||||
PartitionedRegionFactoryBean exampleRegion(GemFireCache gemfireCache) {
|
||||
PartitionedRegionFactoryBean exampleRegion(Pivotal GemFireCache gemfireCache) {
|
||||
|
||||
PartitionedRegionFactoryBean<Long, Example> exampleRegion =
|
||||
new PartitionedRegionFactoryBean<>();
|
||||
@@ -999,12 +999,12 @@ Now users can define and configure Regions based on their application domain obj
|
||||
a user need to explicitly define `Region` bean definitions in Spring configuration meta-data, unless finer-grained
|
||||
control is required.
|
||||
|
||||
To simplify Region creation, _Spring Data GemFire_ combines the use of _Spring Data_ _Repositories_ with the expressive
|
||||
To simplify Region creation, _Spring Data for Pivotal GemFire_ 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
|
||||
https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories[_Spring Data Repository_ abstraction]
|
||||
and _Spring Data GemFire's_ <<gemfire-repositories,implementation/extension>> of _Spring Data's_ _Repository abstraction_,
|
||||
and _Spring Data for Pivotal GemFire's_ <<gemfire-repositories,implementation/extension>> of _Spring Data's_ _Repository abstraction_,
|
||||
which has been specifically customized to optimize data access operations for Pivotal GemFire.
|
||||
|
||||
First, an application developer starts by defining the application domain objects...
|
||||
@@ -1045,16 +1045,16 @@ operations (CRUD) along with support for simple queries (e.g. `findById(..)`).
|
||||
more sophisticated queries simply by declaring query methods on the _Repository_ interface
|
||||
(e.g. `List<BooK> findByAuthor(Author author);`).
|
||||
|
||||
Under-the-hood, _Spring Data GemFire_ provides an implementation of the applications _Repository_ interface when
|
||||
Under-the-hood, _Spring Data for Pivotal GemFire_ 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 <<gemfire-repositories.executing-queries,conventions>>.
|
||||
|
||||
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 GemFire_ mapping annotation, `@Region` on the entity's type. Of course, if
|
||||
and stored by declaring the _Spring Data for Pivotal GemFire_ 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").
|
||||
|
||||
_Spring Data GemFire_ uses the mapping context containing mapping meta-data for all the entities defined in your
|
||||
_Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
To enable and use this feature, simply annotate the application class with `@EnableEntityDefinedRegions`...
|
||||
@@ -1070,7 +1070,7 @@ class ClientApplication { .. }
|
||||
----
|
||||
|
||||
TIP: Creating Regions from entity classes is the most useful when using _Spring Data Repositories_ in your application.
|
||||
_Spring Data GemFire's_ _Repository_ support is enabled with the `@EnableGemfireRepositories` annotation, as shown
|
||||
_Spring Data for Pivotal GemFire's_ _Repository_ support is enabled with the `@EnableGemfireRepositories` annotation, as shown
|
||||
in the example above.
|
||||
|
||||
By default, the `@EnableEntityDefinedRegions` annotation will scan for entity classes recursively starting from
|
||||
@@ -1116,7 +1116,7 @@ See http://gemfire.docs.pivotal.io/geode/developing/region_options/storage_distr
|
||||
in the Pivotal GemFire User Guide for more details.
|
||||
|
||||
When the user annotates her application domain object types with the generic `@Region` mapping annotation,
|
||||
_Spring Data GemFire_ will decide which type of `Region` to create. SDG's default strategy takes the cache type
|
||||
_Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
For example, if the application was declared as a `ClientCache` using the `@ClientCacheApplication` annotation,
|
||||
@@ -1124,7 +1124,7 @@ then SDG would create a client `PROXY` `Region`. Or, if the application was dec
|
||||
`@PeerCacheApplication` or `@CacheServerApplication` annotations, then SDG would create 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 GemFire_, 4 new Region mapping annotations have been introduced:
|
||||
applied by _Spring Data for Pivotal GemFire_, 4 new Region mapping annotations have been introduced:
|
||||
|
||||
* `ClientRegion`
|
||||
* `LocalRegion`
|
||||
@@ -1223,16 +1223,16 @@ Along with <<bootstrap-annotation-config-region-eviction, _Eviction_>>, _Expirat
|
||||
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 Pivotal GemFire.
|
||||
|
||||
_Spring Data GemFire's_ Annotation-based Expiration configuration is based on
|
||||
_Spring Data for Pivotal GemFire's_ Annotation-based Expiration configuration is based on
|
||||
<<bootstrap:region:expiration:annotation, earlier and existing entry expiration annotation support>> added in
|
||||
_Spring Data GemFire version 1.5.
|
||||
_Spring Data for Pivotal GemFire_ version 1.5.
|
||||
|
||||
Essentially, _Spring Data GemFire's_ Expiration annotation support is based on a provided, custom implementation of
|
||||
Essentially, _Spring Data for Pivotal GemFire's_ Expiration annotation support is based on a provided, custom implementation of
|
||||
Pivotal GemFire's http://gemfire-91-javadocs.docs.pivotal.io/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.
|
||||
|
||||
_Spring Data GemFire_ provides the following Expiration annotations used on application domain object types,
|
||||
_Spring Data for Pivotal GemFire_ provides the following Expiration annotations used on application domain object types,
|
||||
out-of-the-box...
|
||||
|
||||
* `Expiration`
|
||||
@@ -1384,14 +1384,14 @@ expressed by the query's projection. Different types of Indexes can be created,
|
||||
http://gemfire.docs.pivotal.io/geode/developing/query_index/creating_key_indexes.html[Key]
|
||||
and http://gemfire.docs.pivotal.io/geode/developing/query_index/creating_hash_indexes.html[Hash] Indexes.
|
||||
|
||||
_Spring Data GemFire_ makes it very easy to create Indexes on Regions where the data is stored and accessed.
|
||||
_Spring Data for Pivotal GemFire_ 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...
|
||||
|
||||
.Index bean definition using Java config
|
||||
[source, java]
|
||||
----
|
||||
@Bean("BooksIsbnIndex")
|
||||
IndexFactoryBean bookIsbnIndex(GemFireCache gemfireCache) {
|
||||
IndexFactoryBean bookIsbnIndex(Pivotal GemFireCache gemfireCache) {
|
||||
|
||||
IndexFactoryBean bookIsbnIndex = new IndexFactoryBean();
|
||||
|
||||
@@ -1446,7 +1446,7 @@ 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 GemFire_,
|
||||
which identifies the field containing the unique identifier for `Book` instances, and in _Spring Data for Pivotal GemFire_,
|
||||
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 Pivotal GemFire KEY Index.
|
||||
@@ -1460,7 +1460,7 @@ is exactly the name of the field or property. The `fromClause` is derived from
|
||||
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 GemFire_.
|
||||
provided by _Spring Data for Pivotal GemFire_.
|
||||
|
||||
.Application domain object type modeling a Book using cutomized Indexes
|
||||
[source, java]
|
||||
@@ -1510,7 +1510,7 @@ Essentially, Indexes are defined from fields/properties on the entity class type
|
||||
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.
|
||||
|
||||
While Lucene queries are not supported on _Spring Data GemFire_ _Repositories_ (yet), SDG does provide comprehensive
|
||||
While Lucene queries are not supported on _Spring Data for Pivotal GemFire_ _Repositories_ (yet), SDG does provide comprehensive
|
||||
https://docs.spring.io/spring-data-gemfire/docs/current/reference/html/#bootstrap:lucene[support] for Pivotal GemFire
|
||||
Lucene queries using the familiar Spring _Template_ design pattern.
|
||||
|
||||
@@ -1526,7 +1526,7 @@ http://gemfire-91-javadocs.docs.pivotal.io/org/apache/geode/cache/RegionFactory.
|
||||
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 GemFire_, happens
|
||||
is to first define all the Indexes upfront and then create them all at once, which, in _Spring Data for Pivotal GemFire_, happens
|
||||
when the Spring context is refreshed.
|
||||
|
||||
Indexes can be defined upfront then created all at once by setting the `define` attribute on the `@EnableIndexing`
|
||||
@@ -1560,7 +1560,7 @@ will use the "DEFAULT" `DiskStore`.
|
||||
However, it is possible and recommended to define Region-specific `DiskStores` when persisting or overflowing data
|
||||
to disk.
|
||||
|
||||
_Spring Data GemFire_ provides Annotation support for defining and creating application Region `DiskStores`
|
||||
_Spring Data for Pivotal GemFire_ 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.
|
||||
@@ -1584,7 +1584,7 @@ class ServerApplication { .. }
|
||||
|
||||
Again, more than 1 `DiskStore` can be defined using the composite, `@EnableDiskStores` annotation.
|
||||
|
||||
Like other Annotations in _Spring Data GemFire's_ Annotation-based configuration model, both `@EnableDiskStore`
|
||||
Like other Annotations in _Spring Data for Pivotal GemFire's_ Annotation-based configuration model, both `@EnableDiskStore`
|
||||
and `@EnableDiskStores` have many attributes along with associated configuration properties to customize
|
||||
the `DiskStores` created at runtime.
|
||||
|
||||
@@ -1594,7 +1594,7 @@ Individual `DiskStore` configuration will override a particular global setting,
|
||||
annotation conveniently defines common configuration attributes applied across all `DiskStores` aggregated by
|
||||
the annotation.
|
||||
|
||||
_Spring Data GemFire_ also provides the `DiskStoreConfigurer` callback interface, which can be declared in Java config
|
||||
_Spring Data for Pivotal GemFire_ 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...
|
||||
|
||||
.Spring application with custom DiskStore configuration
|
||||
@@ -1644,7 +1644,7 @@ occur. The data that a client application may be interested in is expressed as
|
||||
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.
|
||||
|
||||
_Spring Data GemFire_ makes defining and registering CQs along with an associated listener to handle and process CQ
|
||||
_Spring Data for Pivotal GemFire_ makes defining and registering CQs along with an associated listener to handle and process CQ
|
||||
events without all the cruft of Pivotal GemFire'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
|
||||
<<apis:continuous-query, _Continuous Query Listener Container_>>.
|
||||
@@ -1691,7 +1691,7 @@ Additionally, the POJO method signature should adhere to the requirements outlin
|
||||
See the `@EnableContinuousQueries` and `@ContinuousQuery` annotation _Javadoc_ for more details on
|
||||
available attributes and configuration settings.
|
||||
|
||||
More details on _Spring Data GemFire's_ Continuous Query support can be found
|
||||
More details on _Spring Data for Pivotal GemFire's_ Continuous Query support can be found
|
||||
<<apis:continuous-query, here>>.
|
||||
|
||||
More details on Pivotal GemFire's Continuous Queries can be found
|
||||
@@ -1700,14 +1700,14 @@ http://gemfire.docs.pivotal.io/geode/developing/continuous_querying/chapter_over
|
||||
[[bootstrap-annotation-config-caching]]
|
||||
== Configuring Spring's Cache Abstraction
|
||||
|
||||
With _Spring Data GemFire_, Pivotal GemFire can be used as a caching provider in Spring's
|
||||
With _Spring Data for Pivotal GemFire_, Pivotal GemFire 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].
|
||||
|
||||
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 Data GemFire_, a Spring `Cache` corresponds directly to a Region. The Region must exist before any
|
||||
In _Spring Data for Pivotal GemFire_, 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.
|
||||
|
||||
@@ -1733,19 +1733,19 @@ class PointOfSaleService
|
||||
}
|
||||
----
|
||||
|
||||
To make the application developer's life easier when using _Spring Data GemFire_ and Pivotal GemFire with
|
||||
To make the application developer's life easier when using _Spring Data for Pivotal GemFire_ and Pivotal GemFire with
|
||||
_Spring's Cache Abstraction_, 2 new features have been added to the **new** Annotation-based configuration model.
|
||||
|
||||
Given the following Spring caching configuration...
|
||||
|
||||
.Enabling Caching using Pivotal GemFire with Spring Data GemFire
|
||||
.Enabling Caching using Pivotal GemFire with Spring Data for Pivotal GemFire
|
||||
[source, java]
|
||||
----
|
||||
@EnableCaching
|
||||
class CachingConfiguration {
|
||||
|
||||
@Bean
|
||||
GemfireCacheManager cacheManager(GemFireCache gemfireCache) {
|
||||
GemfireCacheManager cacheManager(Pivotal GemFireCache gemfireCache) {
|
||||
|
||||
GemfireCacheManager cacheManager = new GemfireCacheManager();
|
||||
|
||||
@@ -1755,7 +1755,7 @@ class CachingConfiguration {
|
||||
}
|
||||
|
||||
@Bean("BookPricesCache")
|
||||
ReplicatedRegionFactoryBean<Book, Price> bookPricesRegion(GemFireCache gemfireCache) {
|
||||
ReplicatedRegionFactoryBean<Book, Price> bookPricesRegion(Pivotal GemFireCache gemfireCache) {
|
||||
|
||||
ReplicatedRegionFactoryBean<Book, Price> bookPricesRegion =
|
||||
new ReplicatedRegionFactoryBean<>();
|
||||
@@ -1774,9 +1774,9 @@ class CachingConfiguration {
|
||||
}
|
||||
----
|
||||
|
||||
Using _Spring Data GemFire's_ new features, the same caching configuration can be simplified to...
|
||||
Using _Spring Data for Pivotal GemFire's_ new features, the same caching configuration can be simplified to...
|
||||
|
||||
.Enabling GemFire Caching
|
||||
.Enabling Pivotal GemFire Caching
|
||||
[source, java]
|
||||
----
|
||||
@EnableGemfireCaching
|
||||
@@ -1818,7 +1818,7 @@ https://docs.spring.io/spring/docs/current/spring-framework-reference/integratio
|
||||
[[bootstrap-annotation-config-cluster]]
|
||||
== Configuring Cluster Configuration Push
|
||||
|
||||
This may be the most exciting **new** feature in _Spring Data GemFire_.
|
||||
This may be the most exciting **new** feature in _Spring Data for Pivotal GemFire_.
|
||||
|
||||
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
|
||||
@@ -1827,9 +1827,9 @@ remember the configuration pushed by the client, when using HTTP. If all the no
|
||||
will come back up with the same configuration as before.
|
||||
|
||||
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 GemFire_, users does **not** need to use
|
||||
on all the servers in the cluster, manually. Except now, with _Spring Data for Pivotal GemFire_, 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 GemFire_, already contains all the configuration meta-data needed to create Regions and Indexes
|
||||
_Spring Data for Pivotal GemFire_, already contains all the configuration meta-data needed to create Regions and Indexes
|
||||
for the user.
|
||||
|
||||
When users are using the _Spring Data Repository_ abstraction, we know all the Regions (e.g. `@Region` annotated
|
||||
@@ -1842,7 +1842,7 @@ or otherwise, and whether for configuration, for mapping, or whatever purpose.
|
||||
|
||||
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 GemFire_ will take care of all the Pivotal GemFire plumbing required by those framework
|
||||
and so on) and _Spring Data for Pivotal GemFire_ will take care of all the Pivotal GemFire plumbing required by those framework
|
||||
services on the user's behalf.
|
||||
|
||||
Pushing configuration from the client to the servers in the cluster and having the cluster remember it is made possible
|
||||
@@ -1852,7 +1852,7 @@ schema-related changes (e.g. `gfsh> create region --name=Example --type=PARTITIO
|
||||
from the shell.
|
||||
|
||||
Of course, since the cluster "remembers" the prior configuration pushed by a client from a previous run, perhaps,
|
||||
_Spring Data GemFire_ is careful not to stomp on any existing Regions and Indexes already defined in the servers.
|
||||
_Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
NOTE: Currently there is no option to overwrite any existing Region or Index definitions. To recreate a Region
|
||||
@@ -1860,7 +1860,7 @@ or Index, the user must use _Gfsh_ to destroy the Region or Index first and then
|
||||
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: Unlike _Gfsh_, _Spring Data GemFire_ only supports the creation of Regions and Indexes on the servers from a client.
|
||||
NOTE: Unlike _Gfsh_, _Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
For a moment, just imagine the power expressed in the following configuration...
|
||||
@@ -1891,7 +1891,7 @@ behavior, etc, and the developer is in business. Nothing the user did in this c
|
||||
and plumbing required in the application's back-end services (e.g. Pivotal GemFire). Database users have similar
|
||||
features. Now Spring, Pivotal GemFire developers can too!
|
||||
|
||||
When combined with a couple more _Spring Data GemFire_ Annotations...
|
||||
When combined with a couple more _Spring Data for Pivotal GemFire_ Annotations...
|
||||
|
||||
* `@EnableContinuousQueries`
|
||||
* `@EnableGemfireFunctionExecutions`
|
||||
@@ -1904,7 +1904,7 @@ See the `@EnableClusterConfiguration` annotation _Javadoc_ for more details.
|
||||
[[bootstrap-annotation-config-security]]
|
||||
== Configuring Security
|
||||
|
||||
Without a doubt, application _Security_ is extremely important and _Spring Data GemFire_ provides comprehensive support
|
||||
Without a doubt, application _Security_ is extremely important and _Spring Data for Pivotal GemFire_ provides comprehensive support
|
||||
for securing both Pivotal GemFire clients and servers.
|
||||
|
||||
Recently, Pivotal GemFire introduced a new http://gemfire.docs.pivotal.io/geode/managing/security/implementing_security.html[Integrated Security] framework,
|
||||
@@ -1913,7 +1913,7 @@ One of the main features and benefits of this new Security framework is that it
|
||||
https://shiro.apache.org/[Apache Shiro] and can therefore delegate both authentication and authorization requests
|
||||
to Apache Shiro when enforcing security.
|
||||
|
||||
The following demonstrates how _Spring Data GemFire_ can simplify Pivotal GemFire's Security story even further.
|
||||
The following demonstrates how _Spring Data for Pivotal GemFire_ can simplify Pivotal GemFire's Security story even further.
|
||||
|
||||
[[bootstrap-annotation-config-security-server]]
|
||||
=== Configuring Server Security
|
||||
@@ -1930,7 +1930,7 @@ method when creating an instance of an Pivotal GemFire peer `Cache`.
|
||||
and _permissions_ defined for your application, then set the Pivotal GemFire `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 GemFire's_ **new**
|
||||
3. Using just Apache Shiro, annotate your _Spring Boot_ application class with _Spring Data for Pivotal GemFire'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!
|
||||
@@ -1965,7 +1965,7 @@ class ServerApplication {
|
||||
PropertiesRealm propertiesRealm = new PropertiesRealm();
|
||||
|
||||
propertiesRealm.setResourcePath("classpath:shiro.properties");
|
||||
propertiesRealm.setPermissionResolver(new GemFirePermissionResolver());
|
||||
propertiesRealm.setPermissionResolver(new Pivotal GemFirePermissionResolver());
|
||||
|
||||
return propertiesRealm;
|
||||
}
|
||||
@@ -1982,10 +1982,10 @@ or perhaps a custom implementation of an Apache Shiro `Realm` implemented by the
|
||||
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 1 or more Apache Shiro `Realms` have been
|
||||
defined as beans in the Spring context, _Spring Data GemFire_ will detect this configuration and use Apache Shiro
|
||||
defined as beans in the Spring context, _Spring Data for Pivotal GemFire_ will detect this configuration and use Apache Shiro
|
||||
as the Security provider to secure your Pivotal GemFire servers when the `@EnableSecurity` annotation is used.
|
||||
|
||||
TIP: Earlier, information was posted on _Spring Data GemFire's_ support for Pivotal GemFire's **new** Integrated Security
|
||||
TIP: Earlier, information was posted on _Spring Data for Pivotal GemFire's_ support for Pivotal GemFire'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].
|
||||
|
||||
@@ -2011,7 +2011,7 @@ http://gemfire-91-javadocs.docs.pivotal.io/org/apache/geode/security/AuthInitial
|
||||
3. And finally, a user would typically specify the user credentials in a proprietary, Pivotal GemFire
|
||||
`gfsecurity.properties` file.
|
||||
|
||||
_Spring Data GemFire_ simplifies all of that using the same `@EnableSecurity` annotation as applied to
|
||||
_Spring Data for Pivotal GemFire_ 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
|
||||
@@ -2059,7 +2059,7 @@ The following tips will help users get the most out of using the **new** Annotat
|
||||
== Configuration Organization
|
||||
|
||||
As we saw in the section on <<bootstrap-annotation-config-cluster, _Configuring Cluster Configuration Push_>>, when
|
||||
many Pivotal GemFire and/or _Spring Data GemFire_ features are enabled using Annotations, we start to stack a lot of
|
||||
many Pivotal GemFire and/or _Spring Data for Pivotal GemFire_ 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
|
||||
to start compartmentalizing the configuration a bit.
|
||||
|
||||
@@ -2088,7 +2088,7 @@ We could break this configuration down by concern. For example...
|
||||
[source, java]
|
||||
----
|
||||
@SpringBootApplication
|
||||
@Import({ GemFireConfiguration.class, CachingConfiguration.class,
|
||||
@Import({ Pivotal GemFireConfiguration.class, CachingConfiguration.class,
|
||||
FunctionsConfiguration.class, QueriesConfiguration.class,
|
||||
RepositoriesConfiguration.class })
|
||||
class ClientApplication { .. }
|
||||
@@ -2096,7 +2096,7 @@ class ClientApplication { .. }
|
||||
@ClientCacheApplication
|
||||
@EnableClusterConfiguration
|
||||
@EnableGemfireCacheTransactions
|
||||
class GemFireConfiguration { .. }
|
||||
class Pivotal GemFireConfiguration { .. }
|
||||
|
||||
@EnableGemfireCaching
|
||||
@EnableCachingDefinedRegions
|
||||
@@ -2138,14 +2138,14 @@ Again, Pivotal GemFire's new _Integrated Security_ framework can be enabled on b
|
||||
* `@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 GemFire_. See <<bootstrap-annotation-config-regions, Configuring Regions>>
|
||||
using Spring and _Spring Data for Pivotal GemFire_. See <<bootstrap-annotation-config-regions, Configuring Regions>>
|
||||
and <<bootstrap-annotation-config-cluster, Configuring Cluster Configuration Push>> 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 <<apis:declarable, feature>>
|
||||
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
|
||||
* `@EnablePivotal GemFireAsLastResource` - is actually discussed in
|
||||
<<apis:global-transaction-management, Global - JTA Transaction Management>> with Pivotal GemFire.
|
||||
* `@EnableMcast` - enables Pivotal GemFire's old peer discovery mechanism using UDP-based Multi-cast Networking.
|
||||
(_Deprecated_; users should be using Pivotal GemFire Locators instead; see
|
||||
@@ -2157,7 +2157,7 @@ as beans in the Spring context, intercepting the Region op 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 GemFire_'s
|
||||
As we learned in the previous sections, there is a tremendous amount of power provided by _Spring Data for Pivotal GemFire_'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 Pivotal GemFire with Spring.
|
||||
|
||||
@@ -2166,7 +2166,7 @@ Java config, or even XML, if you prefer. You can even combine all 3 approaches
|
||||
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 GemFire_ using an Annotation,
|
||||
provide a bean definition that would otherwise be provided by _Spring Data for Pivotal GemFire_ 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[[bootstrap]]
|
||||
= Bootstrapping Pivotal GemFire with the Spring container
|
||||
|
||||
_Spring Data GemFire_ provides full configuration and initialization of the Pivotal GemFire In-Memory Data Grid (IMDG)
|
||||
_Spring Data for Pivotal GemFire_ provides full configuration and initialization of the Pivotal GemFire In-Memory Data Grid (IMDG)
|
||||
using the _Spring_ IoC container. The framework includes several classes to help simplify the configuration of
|
||||
Pivotal GemFire 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.
|
||||
@@ -12,18 +12,18 @@ see the Pivotal GemFire http://geode.apache.org/docs/[product documentation].
|
||||
[[bootstrap:namespace:xml]]
|
||||
== Advantages of using Spring over Pivotal GemFire `cache.xml`
|
||||
|
||||
_Spring Data GemFire's_ XML namespace supports full configuration of the Pivotal GemFire In-Memory Data Grid (IMDG).
|
||||
_Spring Data for Pivotal GemFire's_ XML namespace supports full configuration of the Pivotal GemFire In-Memory Data Grid (IMDG).
|
||||
The XML namespace is the preferred way to configure Pivotal GemFire in a _Spring_ context in order to properly
|
||||
manage GemFire's lifecycle inside the _Spring_ container. While support for GemFire's native `cache.xml` persists
|
||||
for legacy reasons, GemFire application developers are encouraged to do everything in _Spring_ XML to take advantage of
|
||||
manage Pivotal GemFire's lifecycle inside the _Spring_ container. While support for Pivotal GemFire's native `cache.xml` persists
|
||||
for legacy reasons, Pivotal GemFire 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 GemFire_ makes extensive use of _Spring's_
|
||||
`FactoryBean` pattern to simplify the creation, configuration and initialization of GemFire components.
|
||||
SpEL, and environment profiles. Behind the XML namespace, _Spring Data for Pivotal GemFire_ makes extensive use of _Spring's_
|
||||
`FactoryBean` pattern to simplify the creation, configuration and initialization of Pivotal GemFire components.
|
||||
|
||||
Pivotal GemFire 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 GemFire components. This is a significant improvement over native `cache.xml`,
|
||||
which provides relatively limited configuration options and requires callbacks to implement GemFire's `Declarable`
|
||||
as normal _Spring_ beans and injected into Pivotal GemFire components. This is a significant improvement over native `cache.xml`,
|
||||
which provides relatively limited configuration options and requires callbacks to implement Pivotal GemFire's `Declarable`
|
||||
interface (see <<apis:declarable>> to see how you can still use `Declarables` within _Spring's_ IoC/DI container).
|
||||
|
||||
In addition, IDEs, such as the _Spring Tool Suite_ (STS), provide excellent support for _Spring_ XML namespaces
|
||||
@@ -32,7 +32,7 @@ including code completion, pop-up annotations, and real time validation, making
|
||||
[[bootstrap:namespace]]
|
||||
== Using the Core Namespace
|
||||
|
||||
To simplify configuration, _Spring Data GemFire_ provides a dedicated XML namespace for configuring core Pivotal GemFire
|
||||
To simplify configuration, _Spring Data for Pivotal GemFire_ provides a dedicated XML namespace for configuring core Pivotal GemFire
|
||||
components. It is possible to configure beans directly using _Spring's_ standard `<bean>` 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
|
||||
@@ -40,9 +40,9 @@ http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/
|
||||
in the _Spring Framework_ reference documentation.
|
||||
|
||||
NOTE: _Spring Data Repository_ support uses a separate XML namespace. See <<gemfire-repositories>> for more information
|
||||
on how to configure _Spring Data GemFire_ Repositories.
|
||||
on how to configure _Spring Data for Pivotal GemFire_ Repositories.
|
||||
|
||||
To use the _Spring Data GemFire_ XML namespace, simply declare it in your _Spring_ XML configuration meta-data:
|
||||
To use the _Spring Data for Pivotal GemFire_ XML namespace, simply declare it in your _Spring_ XML configuration meta-data:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -60,17 +60,17 @@ To use the _Spring Data GemFire_ XML namespace, simply declare it in your _Sprin
|
||||
|
||||
</beans>
|
||||
----
|
||||
<1> _Spring Data GemFire_ XML namespace prefix. Any name will do but through out this reference documentation,
|
||||
<1> _Spring Data for Pivotal GemFire_ XML namespace prefix. Any name will do but through out this reference documentation,
|
||||
`gfe` will be 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 GemFire_ library.
|
||||
and is valid), _Spring_ will resolve the schema locally as it is included in the _Spring Data for Pivotal GemFire_ 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 GemFire components as it avoids declaring the prefix. To achieve this, simply swap the namespace
|
||||
composed mainly of Pivotal GemFire components as it avoids declaring the prefix. To achieve this, simply swap the namespace
|
||||
prefix declaration above:
|
||||
|
||||
[source,xml]
|
||||
@@ -89,7 +89,7 @@ prefix declaration above:
|
||||
|
||||
</beans>
|
||||
----
|
||||
<1> The default namespace declaration for this XML document points to the _Spring Data GemFire_ XML namespace.
|
||||
<1> The default namespace declaration for this XML document points to the _Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
= Configuring a Cache
|
||||
|
||||
To use Pivotal GemFire, a developer needs to either create a new `Cache` or connect to an existing one.
|
||||
With the current version of GemFire, there can be only one open Cache per VM (technically, per `ClassLoader`).
|
||||
With the current version of Pivotal GemFire, there can be only one open Cache per VM (technically, 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
|
||||
@@ -19,11 +19,11 @@ A peer cache with default configuration can be created with a very simple declar
|
||||
----
|
||||
|
||||
During Spring container initialization, any application context containing this cache definition will register
|
||||
a `CacheFactoryBean` that creates a Spring bean named `gemfireCache` referencing a GemFire `Cache` instance.
|
||||
a `CacheFactoryBean` that creates a Spring bean named `gemfireCache` referencing a Pivotal GemFire `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.
|
||||
|
||||
All _Spring Data GemFire_ components that depend on the cache respect this naming convention, so there is no need
|
||||
All _Spring Data for Pivotal GemFire_ 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:
|
||||
@@ -33,9 +33,9 @@ the `id` attribute:
|
||||
<gfe:cache id="myCache"/>
|
||||
----
|
||||
|
||||
A GemFire `Cache` can be fully configured using Spring, however, GemFire's native XML configuration file, `cache.xml`,
|
||||
is also supported. For situations where the GemFire cache needs to be configured natively, simply provide a reference
|
||||
to the GemFire XML configuration file using the `cache-xml-location` attribute:
|
||||
A Pivotal GemFire `Cache` can be fully configured using Spring, however, Pivotal GemFire's native XML configuration file, `cache.xml`,
|
||||
is also supported. For situations where the Pivotal GemFire cache needs to be configured natively, simply provide a reference
|
||||
to the Pivotal GemFire XML configuration file using the `cache-xml-location` attribute:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -49,7 +49,7 @@ NOTE: The configuration makes use of Spring's http://docs.spring.io/spring/docs/
|
||||
abstraction to locate the file. This allows various search patterns to 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 GemFire System
|
||||
In addition to referencing an external XML configuration file, a developer may also specify Pivotal GemFire System
|
||||
http://geode.apache.org/docs/guide/11/reference/topics/gemfire_properties.html[properties]
|
||||
using any of Spring's `Properties` support features.
|
||||
|
||||
@@ -127,22 +127,22 @@ or child elements:
|
||||
----
|
||||
|
||||
<1> Various cache options are supported by attributes. For further information regarding anything shown in this example,
|
||||
please consult the GemFire http://docs.pivotal.io/gemfire[product documentation].
|
||||
please consult the Pivotal GemFire 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
|
||||
(common in web applications), set this value to `false`.
|
||||
<2> Setting the `enable-auto-reconnect` attribute to true (default is false), allows a disconnected GemFire member to
|
||||
automatically reconnect and rejoin the GemFire cluster.
|
||||
See the GemFire http://geode.apache.org/docs/guide/11/managing/autoreconnect/member-reconnect.html[product documentation]
|
||||
<2> Setting the `enable-auto-reconnect` attribute to true (default is false), allows a disconnected Pivotal GemFire member to
|
||||
automatically reconnect and rejoin the Pivotal GemFire cluster.
|
||||
See the Pivotal GemFire http://geode.apache.org/docs/guide/11/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 GemFire `cache.xml` is used to configure the GemFire cache node
|
||||
(whether client or peer). This option allows GemFire components (e.g. `CacheLoader`) expressed in `cache.xml`
|
||||
Spring (XML) configuration meta-data and Pivotal GemFire `cache.xml` is used to configure the Pivotal GemFire cache node
|
||||
(whether client or peer). This option allows Pivotal GemFire 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
|
||||
used in conjunction with `cache-xml-location`.
|
||||
<4> Setting the `use-cluster-configuration` attribute to `true` (default is `false`) enables a GemFire member to
|
||||
<4> Setting the `use-cluster-configuration` attribute to `true` (default is `false`) enables a Pivotal GemFire member to
|
||||
retrieve the common, shared Cluster-based configuration from a Locator.
|
||||
See the GemFire http://geode.apache.org/docs/guide/11/configuring/cluster_config/gfsh_persist.html[product documentation]
|
||||
See the Pivotal GemFire http://geode.apache.org/docs/guide/11/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].
|
||||
@@ -155,16 +155,16 @@ must implement http://geode.apache.org/releases/latest/javadoc/org/apache/geode/
|
||||
[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 GemFire's http://geode.apache.org/docs/guide/11/developing/region_options/dynamic_region_creation.html[DynamicRegionFactory],
|
||||
<8> Enable Pivotal GemFire's http://geode.apache.org/docs/guide/11/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 GemFire transaction.
|
||||
<9> Declares a JNDI binding to enlist an external DataSource in a Pivotal GemFire transaction.
|
||||
|
||||
[[bootstrap:cache:pdx-serialization]]
|
||||
=== Enabling PDX Serialization
|
||||
|
||||
The example above includes a number of attributes related to GemFire's enhanced serialization framework, PDX.
|
||||
The example above includes a number of attributes related to Pivotal GemFire'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. GemFire provides
|
||||
is enabled by registering a `PdxSerializer` which is specified via the `pdx-serializer` attribute. Pivotal GemFire 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.
|
||||
@@ -176,17 +176,17 @@ More information on serialization support can be found in <<serialization>>
|
||||
|
||||
Setting the `<gfe:cache enable-auto-reconnect="[true|false*]>` attribute to `true` should be done with care.
|
||||
|
||||
Generally, 'auto-reconnect' should only be enabled in cases where _Spring Data GemFire's_ XML namespace is used to
|
||||
configure and bootstrap a new, non-application GemFire Server to add to a cluster. In other words, 'auto-reconnect'
|
||||
should not be enabled when _Spring Data GemFire_ is used to develop and build an GemFire application that also happens
|
||||
to be a peer cache member of the GemFire cluster.
|
||||
Generally, 'auto-reconnect' should only be enabled in cases where _Spring Data for Pivotal GemFire's_ XML namespace is used to
|
||||
configure and bootstrap a new, non-application Pivotal GemFire Server to add to a cluster. In other words, 'auto-reconnect'
|
||||
should not be enabled when _Spring Data for Pivotal GemFire_ is used to develop and build an Pivotal GemFire application that also happens
|
||||
to be a peer cache member of the Pivotal GemFire cluster.
|
||||
|
||||
The main reason for this is that most GemFire applications use references to the GemFire cache or Regions in order to
|
||||
The main reason for this is that most Pivotal GemFire applications use references to the Pivotal GemFire 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 GemFire component references (e.g. Cache, Regions, etc) become invalid.
|
||||
and all Pivotal GemFire component references (e.g. Cache, Regions, etc) 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.
|
||||
@@ -195,19 +195,19 @@ 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 GemFire components are reconstructed. Therefore, all old references, which may have been
|
||||
Cache, Regions and other Pivotal GemFire 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.
|
||||
|
||||
GemFire makes no guarantee, even when using the GemFire public Java API, that application Cache, Region or other
|
||||
component references will be automatically refreshed by the reconnect operation. As such, GemFire applications
|
||||
Pivotal GemFire makes no guarantee, even when using the Pivotal GemFire public Java API, that application Cache, Region or other
|
||||
component references will be automatically refreshed by the reconnect operation. As such, Pivotal GemFire 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 Pivotal GemFire is not recommended for peer cache GemFire applications.
|
||||
this "feature" of Pivotal GemFire is not recommended for peer cache Pivotal GemFire applications.
|
||||
|
||||
For more information about 'auto-reconnect', see GemFire's
|
||||
For more information about 'auto-reconnect', see Pivotal GemFire's
|
||||
http://geode.apache.org/docs/guide/11/managing/autoreconnect/member-reconnect.html[product documentation].
|
||||
|
||||
[[bootstrap:cache:cluster-configuration]]
|
||||
@@ -216,15 +216,15 @@ http://geode.apache.org/docs/guide/11/managing/autoreconnect/member-reconnect.ht
|
||||
Pivotal GemFire'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 GemFire Distributed System when the member joins.
|
||||
the Pivotal GemFire Distributed System when the member joins.
|
||||
|
||||
This feature of _Spring Data GemFire_ (setting the `use-cluster-configuration` attribute to `true`) works in the same way
|
||||
as the `cache-xml-location` attribute, except the source of the GemFire configuration meta-data comes from the network
|
||||
This feature of _Spring Data for Pivotal GemFire_ (setting the `use-cluster-configuration` attribute to `true`) works in the same way
|
||||
as the `cache-xml-location` attribute, except the source of the Pivotal GemFire configuration meta-data comes from the network
|
||||
via a Locator as opposed to a native `cache.xml` file residing in the local file system.
|
||||
|
||||
All GemFire native configuration meta-data, whether from `cache.xml` or from the Cluster Configuration Service,
|
||||
All Pivotal GemFire 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 GemFire configuration meta-data and would most likely be specific to the application.
|
||||
native Pivotal GemFire configuration meta-data and would most likely be specific to the application.
|
||||
|
||||
Again, to enable this feature, just specify the following in the _Spring_ XML config:
|
||||
|
||||
@@ -233,17 +233,17 @@ Again, to enable this feature, just specify the following in the _Spring_ XML co
|
||||
<gfe:cache use-cluster-configuration="true"/>
|
||||
----
|
||||
|
||||
NOTE: While certain GemFire tools, like _Gfsh_, have their actions "recorded" when schema-like changes are made
|
||||
(e.g. `gfsh>create region --name=Example --type=PARTITION`), _Spring Data GemFire's_ configuration meta-data
|
||||
is not recorded. The same is true when using GemFire's public Java API directly; it too is not recorded.
|
||||
NOTE: While certain Pivotal GemFire tools, like _Gfsh_, have their actions "recorded" when schema-like changes are made
|
||||
(e.g. `gfsh>create region --name=Example --type=PARTITION`), _Spring Data for Pivotal GemFire's_ configuration meta-data
|
||||
is not recorded. The same is true when using Pivotal GemFire's public Java API directly; it too is not recorded.
|
||||
|
||||
For more information on GemFire's Cluster Configuration Service, see the
|
||||
For more information on Pivotal GemFire's Cluster Configuration Service, see the
|
||||
http://geode.apache.org/docs/guide/11/configuring/cluster_config/gfsh_persist.html[product documentation].
|
||||
|
||||
[[bootstrap:cache:server]]
|
||||
== Configuring a GemFire CacheServer
|
||||
== Configuring a Pivotal GemFire CacheServer
|
||||
|
||||
_Spring Data GemFire_ includes dedicated support for configuring a
|
||||
_Spring Data for Pivotal GemFire_ 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:
|
||||
|
||||
@@ -262,7 +262,7 @@ allowing complete configuration through the Spring container:
|
||||
|
||||
<gfe:cache/>
|
||||
|
||||
<!-- Example depicting serveral GemFire CacheServer configuration options -->
|
||||
<!-- Example depicting serveral Pivotal GemFire CacheServer configuration options -->
|
||||
<gfe:cache-server id="advanced-config" auto-startup="true"
|
||||
bind-address="localhost" host-name-for-clients="localhost" port="${gemfire.cache.server.port}"
|
||||
load-poll-interval="2000" max-connections="22" max-message-count="1000" max-threads="16"
|
||||
@@ -290,21 +290,21 @@ and the http://docs.spring.io/spring/docs/current/spring-framework-reference/htm
|
||||
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 GemFire_ will start *after*
|
||||
NOTE: To avoid initialization problems, the `CacheServer` started by _Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
[[bootstrap:cache:client]]
|
||||
== Configuring a GemFire ClientCache
|
||||
== Configuring a Pivotal GemFire ClientCache
|
||||
|
||||
In addition to defining a GemFire peer http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/Cache.html[Cache],
|
||||
_Spring Data GemFire_ also supports the definition of a GemFire http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/client/ClientCache.html[ClientCache]
|
||||
In addition to defining a Pivotal GemFire peer http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/Cache.html[Cache],
|
||||
_Spring Data for Pivotal GemFire_ also supports the definition of a Pivotal GemFire 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 GemFire peer <<bootstrap:cache,Cache>> and is supported by the `org.springframework.data.gemfire.client.ClientCacheFactoryBean`.
|
||||
the Pivotal GemFire peer <<bootstrap:cache,Cache>> and is supported by the `org.springframework.data.gemfire.client.ClientCacheFactoryBean`.
|
||||
|
||||
The simplest definition of a GemFire cache client using default configuration can be accomplished with the following
|
||||
The simplest definition of a Pivotal GemFire cache client using default configuration can be accomplished with the following
|
||||
declaration:
|
||||
|
||||
[source,xml]
|
||||
@@ -342,9 +342,9 @@ initialization will include a call to http://geode.apache.org/releases/latest/ja
|
||||
Client-side configuration is covered in more detail in <<bootstrap:region:client>>.
|
||||
|
||||
[[bootstrap:cache:client:pool]]
|
||||
=== GemFire's DEFAULT Pool and Spring Data GemFire Pool Definitions
|
||||
=== Pivotal GemFire's DEFAULT Pool and Spring Data for Pivotal GemFire Pool Definitions
|
||||
|
||||
If a GemFire `ClientCache` is local-only, then no Pool definition is required. For instance, a developer may define:
|
||||
If a Pivotal GemFire `ClientCache` is local-only, then no Pool definition is required. For instance, a developer may define:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -354,14 +354,14 @@ If a GemFire `ClientCache` is local-only, then no Pool definition is required.
|
||||
----
|
||||
|
||||
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 GemFire's
|
||||
no Pool is necessary. This is true for any client-side, local-only Region, as defined by the Pivotal GemFire's
|
||||
http://geode.apache.org/releases/latest/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.
|
||||
|
||||
When a client cache, Pool and proxy-based Region are all defined, but not explicitly identified, _Spring Data GemFire_
|
||||
When a client cache, Pool and proxy-based Region are all defined, but not explicitly identified, _Spring Data for Pivotal GemFire_
|
||||
will resolve the references automatically for you.
|
||||
|
||||
For example:
|
||||
@@ -378,10 +378,10 @@ 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 GemFire's DEFAULT Pool from `gemfirePool` and the client Region
|
||||
as "Example". However, the client cache will initialize Pivotal GemFire's DEFAULT Pool from `gemfirePool` and the client Region
|
||||
will use the `gemfirePool` when distributing data between the client and the server.
|
||||
|
||||
Basically, _Spring Data GemFire_ resolves the above configuration to the following:
|
||||
Basically, _Spring Data for Pivotal GemFire_ resolves the above configuration to the following:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -394,7 +394,7 @@ Basically, _Spring Data GemFire_ resolves the above configuration to the followi
|
||||
<gfe:client-region id="Example" cache-ref="gemfireCache" pool-name="gemfirePool" shortcut="PROXY"/>
|
||||
----
|
||||
|
||||
GemFire still creates a Pool called "DEFAULT". _Spring Data GemFire_ will just cause the "DEFAULT" Pool to be
|
||||
Pivotal GemFire still creates a Pool called "DEFAULT". _Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
@@ -419,12 +419,12 @@ Consider the following:
|
||||
<gfe:client-region id="YetAnotherExample" shortcut="LOCAL"/>
|
||||
----
|
||||
|
||||
In this setup, the GemFire client cache's "DEFAULT" Pool is initialized from "locatorPool" as specified with the
|
||||
`pool-name` attribute. There is no _Spring Data GemFire_-defined `gemfirePool` since both Pools were explicitly
|
||||
In this setup, the Pivotal GemFire client cache's "DEFAULT" Pool is initialized from "locatorPool" as specified with the
|
||||
`pool-name` attribute. There is no _Spring Data for Pivotal GemFire_-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
|
||||
GemFire's "DEFAULT" Pool, which was configured from the "locatorPool" based on the client cache bean definition's
|
||||
Pivotal GemFire's "DEFAULT" Pool, which 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`.
|
||||
|
||||
@@ -4,25 +4,25 @@
|
||||
A powerful functionality offered by Pivotal GemFire 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 GemFire matches the query predicate. _Spring Data GemFire_ provides dedicated support for CQs through
|
||||
that gets added to Pivotal GemFire matches the query predicate. _Spring Data for Pivotal GemFire_ 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 _Spring Data GemFire_ 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 GemFire_ takes care
|
||||
Basically _Spring Data for Pivotal GemFire_ 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 for Pivotal GemFire_ 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 Pivotal GemFire.
|
||||
|
||||
NOTE: Currently, Continuous Query is only supported in GemFire's client/server topology. Additionally, the client Pool
|
||||
used is required to have the subscription enabled. Please refer to the GemFire
|
||||
NOTE: Currently, Continuous Query is only supported in Pivotal GemFire's client/server topology. Additionally, the client Pool
|
||||
used is required to have the subscription enabled. Please refer to the Pivotal GemFire
|
||||
http://geode.apache.org/docs/guide/11/developing/continuous_querying/implementing_continuous_querying.html[documentation]
|
||||
for more information.
|
||||
|
||||
[[apis:continuous-query:container]]
|
||||
== Continuous Query Listener Container
|
||||
|
||||
_Spring Data GemFire_ simplifies creation, registration, life-cycle and dispatch of CQ events by taking care of
|
||||
_Spring Data for Pivotal GemFire_ 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,7 +33,7 @@ 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 GemFire infrastructure concerns to the framework.
|
||||
(and reacting to it), and delegate the boilerplate Pivotal GemFire 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
|
||||
@@ -45,10 +45,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 GemFire_ CQ support. In a nutshell,
|
||||
The `ContinuousQueryListenerAdapter` class is the final component in _Spring Data for Pivotal GemFire_ 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 GemFire's http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/CqListener.html[CqListener].
|
||||
similar to Pivotal GemFire's http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/CqListener.html[CqListener].
|
||||
|
||||
Consider the following interface definition. Notice the various event handling methods and their parameters:
|
||||
|
||||
@@ -75,7 +75,7 @@ class DefaultEventDelegate implements EventDelegate {
|
||||
}
|
||||
----
|
||||
|
||||
In particular, note how the above implementation of the `EventDelegate` interface has *no* GemFire dependencies at all.
|
||||
In particular, note how the above implementation of the `EventDelegate` interface has *no* Pivotal GemFire 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
|
||||
@@ -115,7 +115,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 GemFire_ namespace to declare the event listener container
|
||||
The example above uses the _Spring Data for Pivotal GemFire_ namespace to declare the event listener container
|
||||
and automatically register the listeners. The full blown, *beans* definition is displayed below:
|
||||
|
||||
[source,xml]
|
||||
@@ -142,6 +142,6 @@ and automatically register the listeners. The full blown, *beans* definition is
|
||||
</bean>
|
||||
----
|
||||
|
||||
Each time an event is received, the adapter automatically performs type translation between the GemFire event
|
||||
Each time an event is received, the adapter automatically performs type translation between the Pivotal GemFire 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).
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
[[data-access]]
|
||||
= Using the Data Access Namespace
|
||||
|
||||
In addition to the core XML namespace (`gfe`), _Spring Data GemFire_ provides a `gfe-data` XML namespace
|
||||
primarily intended to simplify the development of Pivotal GemFire client applications. This namespace currently contains
|
||||
support for GemFire <<gemfire-repositories, Repositories>> and function <<function-execution, execution>> as well as
|
||||
includes a `<datasource>` tag that offers a convenient way to connect to the Pivotal GemFire data grid.
|
||||
In addition to the core XML namespace (`gfe`), _Spring Data for Pivotal GemFire_ provides a data access XML namespace (`gfe-data`),
|
||||
which is primarily intended to simplify the development of Pivotal GemFire client applications. This namespace currently contains
|
||||
support for Pivotal GemFire <<gemfire-repositories, Repositories>> and function <<function-execution, execution>>
|
||||
as well as includes a `<datasource>` tag offering a convenient way to connect to a Pivotal GemFire cluster.
|
||||
|
||||
[[data-access:datasource]]
|
||||
== An Easy Way to Connect to GemFire
|
||||
== An Easy Way to Connect to Pivotal GemFire
|
||||
|
||||
For many applications, a basic connection to a GemFire data grid using default values is sufficient.
|
||||
_Spring Data GemFire's_ `<datasource>` tag provides a simple way to access data. The data source creates
|
||||
For many applications, a basic connection to a Pivotal GemFire data grid using default values is sufficient.
|
||||
_Spring Data for Pivotal GemFire's_ `<datasource>` 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.
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
|
||||
Once the Pivotal GemFire Cache and Regions have been configured, they can be injected and used inside application objects.
|
||||
This chapter describes the integration with _Spring's_ Transaction Management functionality and DAO exception hierarchy.
|
||||
This chapter also covers support for dependency injection of GemFire managed objects.
|
||||
This chapter also covers support for dependency injection of Pivotal GemFire managed objects.
|
||||
|
||||
[[apis:template]]
|
||||
== GemfireTemplate
|
||||
|
||||
As with many other high-level abstractions provided by _Spring_ projects, _Spring Data GemFire_ provides a *template*
|
||||
to simplify GemFire data access. The class provides several *one-liner* methods containing common Region operations,
|
||||
but also has the ability to *execute* code against the native GemFire API without having to deal with GemFire checked
|
||||
exceptions by using a `GemfireCallback`.
|
||||
As with many other high-level abstractions provided by _Spring_, _Spring Data for Pivotal GemFire_ provides a *template*
|
||||
to simplify Pivotal GemFire data access operations. The class provides several methods containing common Region operations,
|
||||
but also provides the capability to *execute* code against native Pivotal GemFire APIs without having to deal with
|
||||
Pivotal GemFire checked exceptions by using a `GemfireCallback`.
|
||||
|
||||
The template class requires a GemFire `Region` instance, and once configured, is thread-safe and can be reused
|
||||
The template class requires a Pivotal GemFire `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 GemFire `Region` without having to deal with checked exceptions, threading or resource management concerns:
|
||||
the Pivotal GemFire `Region` without having to deal with checked exceptions, threading or resource management concerns:
|
||||
|
||||
[source,java]
|
||||
----
|
||||
template.execute(new GemfireCallback<Iterable<String>>() {
|
||||
public Iterable<String> doInGemfire(Region region) throws GemFireCheckedException, GemFireException {
|
||||
|
||||
public Iterable<String> doInGemfire(Region region)
|
||||
throws Pivotal GemFireCheckedException, Pivotal GemFireException {
|
||||
|
||||
Region<String, String> localRegion = (Region<String, String>) region;
|
||||
|
||||
localRegion.put("1", "one");
|
||||
@@ -39,10 +42,10 @@ template.execute(new GemfireCallback<Iterable<String>>() {
|
||||
----
|
||||
|
||||
For accessing the full power of the Pivotal GemFire 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,
|
||||
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,7 +63,7 @@ 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 GemFire as long as the `CacheFactoryBean` is declared, e.g. using either a `<gfe:cache/>`
|
||||
is enabled when using Pivotal GemFire as long as the `CacheFactoryBean` is declared, e.g. using either a `<gfe:cache/>`
|
||||
or `<gfe:client-cache>` declaration, which acts as an exception translator and is automatically detected by
|
||||
the _Spring_ infrastructure and used accordingly.
|
||||
|
||||
@@ -76,7 +79,7 @@ about _Spring's Transaction Management_ infrastructure as it offers a consistent
|
||||
transparently across multiple APIs and can be configured either programmatically or declaratively
|
||||
(the most popular choice).
|
||||
|
||||
For Pivotal GemFire, _Spring Data GemFire_ provides a dedicated, per-cache, `PlatformTransactionManager` that,
|
||||
For Pivotal GemFire, _Spring Data for Pivotal GemFire_ provides a dedicated, per-cache, `PlatformTransactionManager` that,
|
||||
once declared, allows Region operations to be executed atomically through _Spring_:
|
||||
|
||||
[source,xml]
|
||||
@@ -84,8 +87,8 @@ once declared, allows Region operations to be executed atomically through _Sprin
|
||||
<gfe:transaction-manager id="txManager" cache-ref="myCache"/>
|
||||
----
|
||||
|
||||
NOTE: The example above can be simplified even further by eliminating the `cache-ref` attribute if the GemFire cache
|
||||
is defined under the default name, `gemfireCache`. As with the other _Spring Data GemFire_ namespace elements,
|
||||
NOTE: The example above can be simplified even further by eliminating the `cache-ref` attribute if the Pivotal GemFire cache
|
||||
is defined under the default name, `gemfireCache`. As with the other _Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
@@ -126,15 +129,15 @@ There are a series of steps you must complete to properly use Pivotal GemFire as
|
||||
involving more than 1 transactional resource. Additionally, there can only be 1 non-XA compliant resource
|
||||
(e.g. Pivotal GemFire) in such an arrangement.
|
||||
|
||||
1) First, you must complete Steps 1-4 in GemFire's documentation
|
||||
1) First, you must complete Steps 1-4 in Pivotal GemFire'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 GemFire]_ application
|
||||
NOTE: #1 above is independent of your _Spring [Boot] and/or [Data Pivotal GemFire]_ application
|
||||
and must be completed successfully.
|
||||
|
||||
2) Referring to Step 5 in GemFire's http://gemfire90.docs.pivotal.io/geode/developing/transactions/JTA_transactions.html#concept_csy_vfb_wk[documentation],
|
||||
_Spring Data GemFire's_ Annotation support will attempt to set the `GemFireCache`, http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/cache/GemFireCache.html#setCopyOnRead-boolean-[`copyOnRead`]
|
||||
property for you when using the `@EnableGemFireAsLastResource` annotation.
|
||||
2) Referring to Step 5 in Pivotal GemFire's http://gemfire90.docs.pivotal.io/geode/developing/transactions/JTA_transactions.html#concept_csy_vfb_wk[documentation],
|
||||
_Spring Data for Pivotal GemFire's_ Annotation support will attempt to set the `Pivotal GemFireCache`, http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/cache/Pivotal GemFireCache.html#setCopyOnRead-boolean-[`copyOnRead`]
|
||||
property for you when using the `@EnablePivotal GemFireAsLastResource` annotation.
|
||||
|
||||
However, if SDG's auto-configuration is unsuccessful then you must explicitly set the `copy-on-read` attribute on the
|
||||
`<gfe:cache>` or `<gfe:client-cache>` element in XML or the `copyOnRead` property of the SDG `CacheFactoryBean` class
|
||||
@@ -189,18 +192,18 @@ Client Cache JavaConfig:
|
||||
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 GemFire's http://gemfire90.docs.pivotal.io/geode/developing/transactions/JTA_transactions.html#concept_csy_vfb_wk[documentation]
|
||||
3) At this point, you *skip* Steps 6-8 in Pivotal GemFire'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 _Spring Data GemFire's_ *new* `@EnableGemFireAsLastResource` annotation and a combination of _Spring's_
|
||||
with _Spring Data for Pivotal GemFire's_ *new* `@EnablePivotal GemFireAsLastResource` 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 GemFire's_ `@EnableGemFireAsLastResource` configuration does the trick.
|
||||
infrastructure and _Spring Data for Pivotal GemFire's_ `@EnablePivotal GemFireAsLastResource` configuration does the trick.
|
||||
|
||||
The configuration looks like this...
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Configuration
|
||||
@EnableGemFireAsLastResource
|
||||
@EnablePivotal GemFireAsLastResource
|
||||
@EnableTransactionManagement(order = 1)
|
||||
class GeodeConfiguration {
|
||||
|
||||
@@ -210,7 +213,7 @@ class GeodeConfiguration {
|
||||
|
||||
The only requirements are...
|
||||
|
||||
3.1) The `@EnableGemFireAsLastResource` annotation must be declared on the same _Spring_ `@Configuration` class
|
||||
3.1) The `@EnablePivotal GemFireAsLastResource` 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
|
||||
@@ -233,15 +236,15 @@ public JtaTransactionManager transactionManager(UserTransaction userTransaction)
|
||||
----
|
||||
|
||||
NOTE: The configuration in section <<apis:transaction-management>> does *not* apply here.
|
||||
The use of _Spring Data GemFire's_ `GemfireTransactionManager` is applicable only in "Local", Cache Transactions,
|
||||
The use of _Spring Data for Pivotal GemFire'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.
|
||||
|
||||
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 GemFire's_ `@EnableGemFireAsLastResource` annotation imports configuration containing 2 Aspect
|
||||
bean definitions that handles the GemFire `o.a.g.ra.GFConnectionFactory.getConnection()`
|
||||
Effectively, _Spring Data for Pivotal GemFire's_ `@EnablePivotal GemFireAsLastResource` annotation imports configuration containing 2 Aspect
|
||||
bean definitions that handles the Pivotal GemFire `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,8 +260,8 @@ 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
|
||||
+ GemFire API yourself, as shown in the
|
||||
GemFire http://gemfire90.docs.pivotal.io/geode/developing/transactions/jca_adapter_example.html#concept_swv_z2p_wk[example].
|
||||
+ Pivotal GemFire API yourself, as shown in the
|
||||
Pivotal GemFire 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
|
||||
(shown above) is...
|
||||
@@ -281,7 +284,7 @@ class MyTransactionalService ... {
|
||||
`@Transactional` boundary is entered by your application (i.e. when the `MyTransactionSerivce.someTransactionalMethod()`
|
||||
is called).
|
||||
|
||||
#2 & #3 are handled by _Spring Data GemFire's_ new Aspects enabled with the `@EnableGemFireAsLastResource` annotation.
|
||||
#2 & #3 are handled by _Spring Data for Pivotal GemFire's_ new Aspects enabled with the `@EnablePivotal GemFireAsLastResource` 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 Pivotal GemFireAsLastResourceConnectionAcquiringAspect - Acquiring Pivotal GemFire Connection
|
||||
from Pivotal GemFire 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,7 +303,7 @@ 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 Pivotal GemFireAsLastResourceConnectionClosingAspect - Closed Pivotal GemFire Connection @ [Reference [...]]
|
||||
----
|
||||
|
||||
For more details on using Pivotal GemFire in JTA transactions,
|
||||
@@ -320,7 +323,7 @@ include::{basedocdir}/reference/cq-container.adoc[]
|
||||
|
||||
Pivotal GemFire 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 GemFire. Using native GemFire configuration, each user type declared through XML must implement
|
||||
supported by Pivotal GemFire. Using native Pivotal GemFire 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.
|
||||
|
||||
@@ -330,7 +333,7 @@ pluggable components to focus on the application logic and not the location or c
|
||||
or other collaborators.
|
||||
|
||||
However, if you are starting a green field project, it is recommended that you configure Cache, Region,
|
||||
and other pluggable GemFire components directly in _Spring_. This avoids inheriting from the `Declarable` interface
|
||||
and other pluggable Pivotal GemFire 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.
|
||||
@@ -356,15 +359,15 @@ As an example of configuring a `Declarable` component using _Spring_, consider t
|
||||
</cache-loader>
|
||||
----
|
||||
|
||||
To simplify the task of parsing, converting the parameters and initializing the object, _Spring Data GemFire_ offers
|
||||
a base class (`WiringDeclarableSupport`) that allows GemFire user objects to be wired through a *template* bean definition
|
||||
To simplify the task of parsing, converting the parameters and initializing the object, _Spring Data for Pivotal GemFire_ offers
|
||||
a base class (`WiringDeclarableSupport`) that allows Pivotal GemFire 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 GemFire release there is no concept of an *object factory* and the types declared are instantiated
|
||||
In the current Pivotal GemFire 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 Pivotal GemFire.
|
||||
****
|
||||
|
||||
@@ -416,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 GemFire. For cases where the bean name uses a different convention,
|
||||
one can pass in the `bean-name` parameter in the GemFire configuration:
|
||||
as a template for wiring the instance created by Pivotal GemFire. For cases where the bean name uses a different convention,
|
||||
one can pass in the `bean-name` parameter in the Pivotal GemFire configuration:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -513,7 +516,7 @@ the `DBLoader` code.
|
||||
[[apis:spring-cache-abstraction]]
|
||||
== Support for the Spring Cache Abstraction
|
||||
|
||||
_Spring Data GemFire_ provides an implementation of the _Spring_
|
||||
_Spring Data for Pivotal GemFire_ provides an implementation of the _Spring_
|
||||
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#cache[Cache Abstraction]
|
||||
to position Pivotal GemFire as a _caching provider_ in Spring's caching infrastructure.
|
||||
|
||||
@@ -549,7 +552,7 @@ is used (i.e. "gemfireCache"), i.e. `<gfe:cache>` without an explicit ID.
|
||||
When the `GemfireCacheManager` (Singleton) bean instance is declared and declarative caching is enabled
|
||||
(either in XML with `<cache:annotation-driven/>` or in JavaConfig with _Spring's_ `@EnableCaching` annotation),
|
||||
the _Spring_ caching annotations (e.g. `@Cacheable`) identify the "caches" that will cache data in-memory
|
||||
using GemFire Regions.
|
||||
using Pivotal GemFire Regions.
|
||||
|
||||
These caches (i.e. Regions) must exist before the caching annotations that use them otherwise an error will occur.
|
||||
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
[[bootstrap:diskstore]]
|
||||
= Configuring a DiskStore
|
||||
|
||||
_Spring Data GemFire_ supports `DiskStore` configuration via the `disk-store` element.
|
||||
_Spring Data for Pivotal GemFire_ supports `DiskStore` configuration and creation via the `disk-store` element.
|
||||
|
||||
For example:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<gfe:disk-store id="diskStore1" queue-size="50" auto-compact="true"
|
||||
max-oplog-size="10" time-interval="9999">
|
||||
<gfe:disk-dir location="/gemfire/store1/" max-size="20"/>
|
||||
<gfe:disk-dir location="/gemfire/store2/" max-size="20"/>
|
||||
<gfe:disk-store id="Example" auto-compact="true" max-oplog-size="10"
|
||||
queue-size="50" time-interval="9999">
|
||||
<gfe:disk-dir location="/disk/location/one" max-size="20"/>
|
||||
<gfe:disk-dir location="/disk/location/two" max-size="20"/>
|
||||
</gfe:disk-store>
|
||||
----
|
||||
|
||||
`DiskStores` are used by Regions for file system persistent backup and overflow of evicted entries
|
||||
as well as persistent backup of WAN Gateways. Multiple GemFire components may share the same `DiskStore`.
|
||||
Additionally, multiple file system directories may be defined for a single `DiskStore`.
|
||||
as well as persistent backup for WAN Gateways. Multiple Pivotal GemFire components may share the same `DiskStore`.
|
||||
Additionally, multiple file system directories may be defined for a single `DiskStore` as shown in the example above.
|
||||
|
||||
Please refer to Pivotal GemFire'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].
|
||||
Please refer to Pivotal GemFire's documentation for a complete explanation of
|
||||
http://gemfire.docs.pivotal.io/95/geode/developing/storing_data_on_disk/chapter_overview.html[Persistence and Overflow]
|
||||
along with configuration options on `DiskStores`.
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
|
||||
== Introduction
|
||||
|
||||
_Spring Data GemFire_ includes annotation support to simplify working with GemFire
|
||||
_Spring Data for Pivotal GemFire_ includes annotation support to simplify working with Pivotal GemFire
|
||||
http://geode.apache.org/docs/guide/11/developing/function_exec/chapter_overview.html[Function Execution].
|
||||
Under-the-hood, the Pivotal GemFire API provides classes to implement and register GemFire
|
||||
Under-the-hood, the Pivotal GemFire API provides classes to implement and register Pivotal GemFire
|
||||
http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/Function.html[Functions]
|
||||
that are deployed on GemFire servers, which may then be invoked by other peer member applications
|
||||
that are deployed on Pivotal GemFire servers, which may then be invoked by other peer member applications
|
||||
or remotely from cache clients.
|
||||
|
||||
Functions can execute in parallel, distributed among multiple GemFire servers in the cluster, aggregating results
|
||||
Functions can execute in parallel, distributed among multiple Pivotal GemFire 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 Pivotal GemFire 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,
|
||||
as with any RPC protocol, requires some boilerplate code.
|
||||
|
||||
_Spring Data GemFire_, 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 GemFire_ introduces
|
||||
annotations to declaratively register public methods of a POJO class as GemFire Functions along with the ability to
|
||||
_Spring Data for Pivotal GemFire_, 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 for Pivotal GemFire_ introduces
|
||||
annotations to declaratively register public methods of a POJO class as Pivotal GemFire Functions along with the ability to
|
||||
invoke registered Functions [remotely] via annotated interfaces.
|
||||
|
||||
== Implementation vs Execution
|
||||
@@ -44,8 +44,8 @@ to aggregate and acquire the execution results. In certain cases, a custom `Res
|
||||
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 GemFire's client-server topology. While it is common for an application using a `ClientCache`
|
||||
to invoke a Function on one or more GemFire servers in a cluster, it is also possible to execute Functions
|
||||
than client and server in Pivotal GemFire's client-server topology. While it is common for an application using a `ClientCache`
|
||||
to invoke a Function on one or more Pivotal GemFire 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.
|
||||
@@ -53,7 +53,7 @@ of the cluster.
|
||||
[[function-implementation]]
|
||||
== Implementing a Function
|
||||
|
||||
Using GemFire APIs, the `FunctionContext` provides a runtime invocation context that includes the client's
|
||||
Using Pivotal GemFire 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
|
||||
@@ -101,7 +101,7 @@ or the `ResultSender`, if you need to control how the results are returned to th
|
||||
=== Annotations for Function Implementation
|
||||
|
||||
The following example illustrates how SDG's Function annotations are used to expose POJO methods
|
||||
as GemFire Functions:
|
||||
as Pivotal GemFire Functions:
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@@ -120,7 +120,7 @@ public class ApplicationFunctions {
|
||||
}
|
||||
----
|
||||
|
||||
Note, the class itself must be registered as a _Spring_ bean and each GemFire Function is annotated
|
||||
Note, the class itself must be registered as a _Spring_ bean and each Pivotal GemFire 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
|
||||
@@ -129,14 +129,14 @@ _Spring_ creates a wrapper instance for each method annotated with `@GemfireFunc
|
||||
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 GemFire components such as the Cache and Regions. These may be injected into the class
|
||||
the `ApplicationContext` with Pivotal GemFire components such as the Cache and Regions. These may be injected into the class
|
||||
if necessary.
|
||||
|
||||
_Spring_ creates the wrapper class and registers the Function(s) with GemFire's Function Service. The Function id used
|
||||
_Spring_ creates the wrapper class and registers the Function(s) with Pivotal GemFire'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 GemFire's
|
||||
which correspond to properties defined by Pivotal GemFire'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`.
|
||||
@@ -145,7 +145,7 @@ Even for `void` return types, the annotation's `hasResult` attribute can be set
|
||||
as shown in the `functionWithContext` method above. Presumably, the intention is to use the `ResultSender` directly
|
||||
to send results to the caller.
|
||||
|
||||
The `PojoFunctionWrapper` implements GemFire's `Function` interface, binds method parameters and invokes the target method
|
||||
The `PojoFunctionWrapper` implements Pivotal GemFire'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`.
|
||||
|
||||
=== Batching Results
|
||||
@@ -184,11 +184,11 @@ class ApplicationConfiguration { .. }
|
||||
== 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 GemFire_,
|
||||
(onRegion, onServers, onServer, onMember, onMembers) and optionally, a Filter set. Using _Spring Data for Pivotal GemFire_,
|
||||
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 GemFire's Repository extension_ works, thus some of the configuration and concepts should be familiar.
|
||||
_Spring Data for Pivotal GemFire'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.
|
||||
|
||||
@@ -196,7 +196,7 @@ defined in the interface.
|
||||
|
||||
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 GemFire's
|
||||
prodided by Pivotal GemFire'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
|
||||
@@ -288,12 +288,12 @@ The Filter argument is optional. The following arguments are a variable argumen
|
||||
[[function-execution-pdx]]
|
||||
== Function Execution with PDX
|
||||
|
||||
When using _Spring Data GemFire's_ Function annotation support combined with Pivotal GemFire's
|
||||
When using _Spring Data for Pivotal GemFire's_ Function annotation support combined with Pivotal GemFire's
|
||||
http://geode.apache.org/docs/guide/11/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 GemFire Functions using POJO classes
|
||||
annotated with Spring Data GemFire
|
||||
As explained above, and by way of example, typically developers will define Pivotal GemFire Functions using POJO classes
|
||||
annotated with Spring Data for Pivotal GemFire
|
||||
http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/function/annotation/package-summary.html[Function annotations]
|
||||
like so...
|
||||
|
||||
@@ -334,7 +334,7 @@ public enum OrderSource {
|
||||
}
|
||||
----
|
||||
|
||||
Of course, a developer may define a Function `Execution` interface to call the 'process' GemFire Server Function...
|
||||
Of course, a developer may define a Function `Execution` interface to call the 'process' Pivotal GemFire Server Function...
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@@ -349,16 +349,16 @@ Clearly, this `process(..)` `Order` Function is being called from a client-side
|
||||
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.
|
||||
|
||||
Now, if the developer has configured GemFire to use PDX for serialization (instead of Java serialization, for instance)
|
||||
Now, if the developer has configured Pivotal GemFire 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 GemFire server(s)...
|
||||
of the Pivotal GemFire server(s)...
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<gfe:cache ... pdx-read-serialized="true"/>
|
||||
----
|
||||
|
||||
Or from a GemFire cache client application...
|
||||
Or from a Pivotal GemFire cache client application...
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -368,24 +368,24 @@ Or from a GemFire cache client application...
|
||||
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.
|
||||
|
||||
GemFire will only serialize application domain object types that you have specifically configured (registered),
|
||||
with either GemFire's
|
||||
Pivotal GemFire will only serialize application domain object types that you have specifically configured (registered),
|
||||
with either Pivotal GemFire's
|
||||
http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/pdx/ReflectionBasedAutoSerializer.html[ReflectionBasedAutoSerializer],
|
||||
or specifically (and recommended) using a "custom" GemFire
|
||||
or specifically (and recommended) using a "custom" Pivotal GemFire
|
||||
http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/pdx/PdxSerializer.html[PdxSerializer]. If you are using
|
||||
_Spring Data GemFire's_ Repository extension to _Spring Data Common's_ Repository abstraction and infrastructure,
|
||||
you might even want to consider using _Spring Data GemFire's_
|
||||
_Spring Data for Pivotal GemFire's_ Repository extension to _Spring Data Common's_ Repository abstraction and infrastructure,
|
||||
you might even want to consider using _Spring Data for Pivotal GemFire'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
|
||||
to the PDX instance.
|
||||
|
||||
What is less than apparent, though, is that GemFire automatically handles Java Enum types regardless of whether they are
|
||||
What is less than apparent, though, is that Pivotal GemFire 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" GemFire `PdxSerializer`), despite the fact that Java Enums
|
||||
and the `classes` parameter, or are handled by a "custom" Pivotal GemFire `PdxSerializer`), despite the fact that Java Enums
|
||||
implement `java.io.Serializable`.
|
||||
|
||||
So, when a developer sets `pdx-read-serialized` to *true* on GemFire Servers where the GemFire Functions
|
||||
(including Spring Data GemFire Function annotated POJO classes) are registered, then the developer
|
||||
So, when a developer sets `pdx-read-serialized` to *true* on Pivotal GemFire Servers where the Pivotal GemFire Functions
|
||||
(including Spring Data for Pivotal GemFire Function annotated POJO classes) are registered, then the developer
|
||||
may encounter surprising behavior when invoking the Function `Execution`.
|
||||
|
||||
What the developer may pass as arguments when invoking the Function is...
|
||||
@@ -395,7 +395,7 @@ What the developer may pass as arguments when invoking the Function is...
|
||||
orderProcessingFunctions.process(new Order(123, customer, Calendar.getInstance(), items), OrderSource.ONLINE, 400);
|
||||
----
|
||||
|
||||
But, what the GemFire Function on the Server gets is...
|
||||
But, what the Pivotal GemFire Function on the Server gets is...
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@@ -405,17 +405,17 @@ 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 GemFire Servers are interacting with multiple different clients (e.g. Java, native clients, such as C++/C#, etc).
|
||||
the Pivotal GemFire Servers are interacting with multiple different clients (e.g. Java, native clients, such as C++/C#, etc).
|
||||
|
||||
This flies in the face of _Spring Data GemFire's_ "strongly-typed", Function annotated POJO class method signatures,
|
||||
This flies in the face of _Spring Data for Pivotal GemFire's_ "strongly-typed", Function annotated POJO class method signatures,
|
||||
as the developer is expecting application domain object types, not PDX serialized instances.
|
||||
|
||||
So, _Spring Data GemFire_ includes enhanced Function support to automatically convert method arguments passed to
|
||||
So, _Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
However, this also requires the developer to explicitly register a GemFire `PdxSerializer` on the GemFire Servers
|
||||
where _Spring Data GemFire_ Function annotated POJOs are registered and used, e.g. ...
|
||||
However, this also requires the developer to explicitly register a Pivotal GemFire `PdxSerializer` on the Pivotal GemFire Servers
|
||||
where _Spring Data for Pivotal GemFire_ Function annotated POJOs are registered and used, e.g. ...
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@@ -424,13 +424,13 @@ where _Spring Data GemFire_ Function annotated POJOs are registered and used, e.
|
||||
<gfe:cache ... pdx-serializer-ref="customPdxSerializeer" pdx-read-serialized="true"/>
|
||||
----
|
||||
|
||||
Alternatively, a developer my use GemFire's
|
||||
Alternatively, a developer my use Pivotal GemFire'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.
|
||||
|
||||
Finally, _Spring Data GemFire_ is careful not to convert your Function arguments if you treat your Function arguments
|
||||
generically, or as one of GemFire's PDX types...
|
||||
Finally, _Spring Data for Pivotal GemFire_ is careful not to convert your Function arguments if you treat your Function arguments
|
||||
generically, or as one of Pivotal GemFire's PDX types...
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@@ -440,9 +440,9 @@ public Object genericFunction(String value, Object domainObject, PdxInstanceEnum
|
||||
}
|
||||
----
|
||||
|
||||
_Spring Data GemFire_ only converts PDX type data to the corresponding application domain types if and only if
|
||||
_Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
For a good example of "custom", "composed" application-specific GemFire `PdxSerializers` as well as appropriate
|
||||
POJO Function parameter type handling based on the method signatures, see Spring Data GemFire's
|
||||
For a good example of "custom", "composed" application-specific Pivotal GemFire `PdxSerializers` as well as appropriate
|
||||
POJO Function parameter type handling based on the method signatures, see Spring Data for Pivotal GemFire's
|
||||
https://github.com/spring-projects/spring-data-gemfire/blob/2.0.0.M2/src/test/java/org/springframework/data/gemfire/function/ClientCacheFunctionExecutionWithPdxIntegrationTest.java[ClientCacheFunctionExecutionWithPdxIntegrationTest] class.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
[[bootstrap:function]]
|
||||
= Configuring the Function Service
|
||||
|
||||
_Spring Data GemFire_ provides <<function-annotations,annotation>> support for implementing and registering
|
||||
_Spring Data for Pivotal GemFire_ provides <<function-annotations,annotation>> support for implementing and registering
|
||||
Pivotal GemFire Functions.
|
||||
|
||||
_Spring Data GemFire_ also provides namespace support for registering Pivotal GemFire
|
||||
_Spring Data for Pivotal GemFire_ also provides namespace support for registering Pivotal GemFire
|
||||
http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/execute/Function.html[Functions]
|
||||
for remote Function execution.
|
||||
|
||||
Please refer to Pivotal GemFire' http://geode.apache.org/docs/guide/11/developing/function_exec/chapter_overview.html[documentation]
|
||||
for more information on the Function execution framework.
|
||||
|
||||
GemFire Functions are declared as _Spring_ beans and must implement the `org.apache.geode.cache.execute.Function`
|
||||
Pivotal GemFire 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:
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
= Configuring WAN Gateways
|
||||
|
||||
WAN Gateways provide a way to synchronize Pivotal GemFire Distributed Systems across geographic areas.
|
||||
_Spring Data GemFire_ provides namespace support for configuring WAN Gateways as illustrated in the following examples.
|
||||
_Spring Data for Pivotal GemFire_ provides namespace support for configuring WAN Gateways as illustrated in the following examples.
|
||||
|
||||
== WAN Configuration in GemFire 7.0
|
||||
== WAN Configuration in Pivotal GemFire 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`).
|
||||
|
||||
@@ -3,37 +3,37 @@
|
||||
|
||||
== Introduction
|
||||
|
||||
Normally, a _Spring_-based application will <<bootstrap,bootstrap Pivotal GemFire>> using _Spring Data GemFire's.
|
||||
Just by specifying a `<gfe:cache/>` element using the _Spring Data GemFire_ XML namespace, a single, embedded GemFire
|
||||
Normally, a _Spring_-based application will <<bootstrap,bootstrap Pivotal GemFire>> using _Spring Data for Pivotal GemFire's.
|
||||
Just by specifying a `<gfe:cache/>` element using the _Spring Data for Pivotal GemFire_ XML namespace, a single, embedded Pivotal GemFire
|
||||
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 GemFire be fully managed
|
||||
However, it is sometimes necessary, perhaps a requirement imposed by your IT organization, that Pivotal GemFire be fully managed
|
||||
and operated using the provided Pivotal GemFire tool suite, such as with
|
||||
http://geode.apache.org/docs/guide/11/tools_modules/gfsh/chapter_overview.html[Gfsh]. By using _Gfsh_,
|
||||
GemFire 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, GemFire does the bootstrapping and will
|
||||
Pivotal GemFire 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, Pivotal GemFire does the bootstrapping and will
|
||||
host your application.
|
||||
|
||||
Keep in mind, however, that GemFire is not an application server. In addition, there are limitations to using
|
||||
this approach where GemFire cache configuration is concerned.
|
||||
Keep in mind, however, that Pivotal GemFire is not an application server. In addition, there are limitations to using
|
||||
this approach where Pivotal GemFire cache configuration is concerned.
|
||||
|
||||
[[gemfire-bootstrap-gfsh]]
|
||||
== Using Pivotal GemFire to Bootstrap a Spring Context Started with Gfsh
|
||||
|
||||
In order to bootstrap a _Spring_ application context in GemFire when starting a GemFire Server process using _Gfsh_,
|
||||
a user must make use of GemFire's
|
||||
In order to bootstrap a _Spring_ application context in Pivotal GemFire when starting a Pivotal GemFire Server process using _Gfsh_,
|
||||
a user must make use of Pivotal GemFire'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 GemFire.
|
||||
An Initializer block can declare a callback application that is launched after the cache is initialized by Pivotal GemFire.
|
||||
|
||||
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 GemFire's native `cache.xml`. The `cache.xml` file is required in order to bootstrap
|
||||
using a minimal snippet of Pivotal GemFire'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. `<context:component-scan base-packages="..."/>`)
|
||||
|
||||
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 GemFires's `cache.xml` file will look like this:
|
||||
A typical, yet very minimal configuration for this class inside Pivotal GemFires's `cache.xml` file will look like this:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -81,7 +81,7 @@ 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 GemFire Server in _Gfsh_, the command-line would be:
|
||||
a command-line option when starting a Pivotal GemFire Server in _Gfsh_, the command-line would be:
|
||||
|
||||
[source]
|
||||
----
|
||||
@@ -91,35 +91,35 @@ gfsh>start server --name=Server1 --log-level=config ...
|
||||
----
|
||||
|
||||
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 GemFire_ namespace. In other words, none of the `<gfe:cache/>` element attributes,
|
||||
elements. The only limitation with this approach is that a Pivotal GemFire cache cannot be configured using
|
||||
the _Spring Data for Pivotal GemFire_ namespace. In other words, none of the `<gfe:cache/>` element attributes,
|
||||
such as `cache-xml-location`, `properties-ref`, `critical-heap-percentage`, `pdx-serializer-ref`, `lock-lease`, etc,
|
||||
can be specified. If used, these attributes will be ignored.
|
||||
|
||||
The reason for this is that GemFire itself has already created an initialized the cache before the Initializer
|
||||
The reason for this is that Pivotal GemFire itself has already created an initialized the cache before the Initializer
|
||||
gets invoked. As such, the cache will already exist and since it is a "Singleton", it cannot be re-initialized
|
||||
or have any of it's configuration augmented.
|
||||
|
||||
[[gemfire-bootstrap-lazywiring]]
|
||||
== Lazy-Wiring GemFire Components
|
||||
== Lazy-Wiring Pivotal GemFire Components
|
||||
|
||||
_Spring Data GemFire_ already provides existing support for wiring GemFire components, such as `CacheListeners`,
|
||||
`CacheLoaders`, `CacheWriters` and so on, that are declared and created by GemFire in `cache.xml` using
|
||||
_Spring Data for Pivotal GemFire_ already provides existing support for wiring Pivotal GemFire components, such as `CacheListeners`,
|
||||
`CacheLoaders`, `CacheWriters` and so on, that are declared and created by Pivotal GemFire in `cache.xml` using
|
||||
SDG's `WiringDeclarableSupport` class as described in <<apis:declarable:autowiring>>. However, this only works
|
||||
when _Spring_ is the one doing the bootstrapping (i.e. bootstrapping GemFire).
|
||||
when _Spring_ is the one doing the bootstrapping (i.e. bootstrapping Pivotal GemFire).
|
||||
|
||||
When your _Spring_ application context is bootstrapped by GemFire, then these GemFire application components go unnoticed
|
||||
When your _Spring_ application context is bootstrapped by Pivotal GemFire, then these Pivotal GemFire application components go unnoticed
|
||||
since the _Spring_ application context does not even exist yet! The _Spring_ application context will not get created
|
||||
until GemFire calls the Initializer block, which only occurs after all the other GemFire components and configuration
|
||||
until Pivotal GemFire calls the Initializer block, which only occurs after all the other Pivotal GemFire components and configuration
|
||||
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 GemFire
|
||||
once the Initializer is called. In essence, this give your GemFire defined application components a chance
|
||||
will register itself to be configured by the _Spring_ container that will eventually be created by Pivotal GemFire
|
||||
once the Initializer is called. In essence, this give your Pivotal GemFire defined application components a chance
|
||||
to be configured and auto-wired with _Spring_ beans defined in the _Spring_ application context.
|
||||
|
||||
In order for your GemFire application components to be auto-wired by the _Spring_ container, create an application class
|
||||
In order for your Pivotal GemFire 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:
|
||||
|
||||
@@ -136,12 +136,12 @@ 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 GemFire `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 GemFire `REPLICATE` Region
|
||||
a Region and `CacheListener` component in Pivotal GemFire `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 Pivotal GemFire `REPLICATE` Region
|
||||
on start.
|
||||
|
||||
CAUTION: Be careful when mixing the different life-cycles of Pivotal GemFire and the _Spring_ Container together
|
||||
in this manner as not all use cases and scenarios are supported. The GemFire `cache.xml` configuration would be
|
||||
in this manner as not all use cases and scenarios are supported. The Pivotal GemFire `cache.xml` configuration would be
|
||||
similar to the following (which comes from SDG's test suite):
|
||||
|
||||
[source,xml]
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
|
||||
Pivotal GemFire allows Indexes (or Indices) to be created on Region data to improve the performance of OQL queries.
|
||||
|
||||
In _Spring Data GemFire_ (SDG), Indexes are declared with the `index` element:
|
||||
In _Spring Data for Pivotal GemFire_ (SDG), Indexes are declared with the `index` element:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<gfe:index id="myIndex" expression="someField" from="/SomeRegion" type="HASH"/>
|
||||
----
|
||||
|
||||
In _Spring Data GemFire's_ XML schema (a.k.a. SDG namespace), `Index` bean declarations are not bound to a _Region_,
|
||||
unlike GemFire's native `cache.xml`. Rather, they are top-level elements just like `<gfe:cache>`. This allows
|
||||
In _Spring Data for Pivotal GemFire's_ XML schema (a.k.a. SDG namespace), `Index` bean declarations are not bound to a _Region_,
|
||||
unlike Pivotal GemFire'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 GemFire's native `cache.xml` format.
|
||||
a significant improvement over Pivotal GemFire'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
|
||||
@@ -69,9 +69,9 @@ Therefore, I might want to create an `Index` like so...
|
||||
----
|
||||
|
||||
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 GemFire_ specific; this is a feature of Pivotal GemFire.
|
||||
This is *not* _Sprig Data Pivotal GemFire_ specific; this is a feature of Pivotal GemFire.
|
||||
|
||||
The `Index` `type` maybe 1 of 3 enumerated values defined by _Spring Data GemFire's_
|
||||
The `Index` `type` maybe 1 of 3 enumerated values defined by _Spring Data for Pivotal GemFire's_
|
||||
http://docs.spring.io/spring-data-gemfire/docs/current/api/org/springframework/data/gemfire/IndexType.html[IndexType]
|
||||
enumeration: `FUNCTIONAL`, `HASH` and `PRIMARY_KEY`.
|
||||
|
||||
@@ -84,14 +84,14 @@ is invoked to create a `KEY` `Index`.
|
||||
The default is `FUNCTIONAL` and results in one of the `QueryService.createIndex(..)` methods
|
||||
being invoked.
|
||||
|
||||
See the _Spring Data GemFire_ XML schema for a full set of options.
|
||||
See the _Spring Data for Pivotal GemFire_ XML schema for a full set of options.
|
||||
|
||||
For more information on Indexing in Pivotal GemFire, see http://gemfire90.docs.pivotal.io/geode/developing/query_index/query_index.html[Working with Indexes]
|
||||
in Pivotal GemFire's User Guide.
|
||||
|
||||
== Defining Indexes
|
||||
|
||||
In addition to creating Indexes upfront as `Index` bean definitions are processed by _Spring Data GemFire_
|
||||
In addition to creating Indexes upfront as `Index` bean definitions are processed by _Spring Data for Pivotal GemFire_
|
||||
on _Spring_ container initialization, you may also *define* all of your application Indexes prior to creating
|
||||
them by using the `define` attribute, like so...
|
||||
|
||||
@@ -102,8 +102,8 @@ them by using the `define` attribute, like so...
|
||||
|
||||
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 GemFire_ registers itself as
|
||||
an `ApplicationListener` listening for the `ContextRefreshedEvent`. When fired, _Spring Data GemFire_ will call
|
||||
when a `ContextRefreshedEvent` is published by the _Spring_ container. _Spring Data for Pivotal GemFire_ registers itself as
|
||||
an `ApplicationListener` listening for the `ContextRefreshedEvent`. When fired, _Spring Data for Pivotal GemFire_ will call
|
||||
http://gemfire-90-javadocs.docs.pivotal.io/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.
|
||||
@@ -113,21 +113,21 @@ for more details.
|
||||
|
||||
== `IgnoreIfExists` and `Override`
|
||||
|
||||
Two _Spring Data GemFire_ `Index` configuration options warrant special mention here: `ignoreIfExists` and `override`.
|
||||
Two _Spring Data for Pivotal GemFire_ `Index` configuration options warrant special mention here: `ignoreIfExists` and `override`.
|
||||
|
||||
These options correspond to the `ignore-if-exists` and `override` attributes on the `<gfe:index>` element
|
||||
in _Spring Data GemFire's_ XML schema, respectively.
|
||||
in _Spring Data for Pivotal GemFire's_ XML schema, 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.
|
||||
|
||||
NOTE: These options are only available in _Spring Data GemFire_ and exist to workaround known limitations
|
||||
with Pivotal GemFire; there are no equivalent options or functionality available in GemFire itself.
|
||||
NOTE: These options are only available in _Spring Data for Pivotal GemFire_ and exist to workaround known limitations
|
||||
with Pivotal GemFire; there are no equivalent options or functionality available in Pivotal GemFire itself.
|
||||
|
||||
Each option significantly differs in behavior and entirely depends on the type of GemFire `Index` _Exception_ thrown.
|
||||
This also means that neither option has any effect if a GemFire Index-type _Exception_ is *not* thrown. These options
|
||||
are meant to specifically handle GemFire `IndexExistsExceptions` and `IndexNameConflictExceptions`, which can occur
|
||||
Each option significantly differs in behavior and entirely depends on the type of Pivotal GemFire `Index` _Exception_ thrown.
|
||||
This also means that neither option has any effect if a Pivotal GemFire Index-type _Exception_ is *not* thrown. These options
|
||||
are meant to specifically handle Pivotal GemFire `IndexExistsExceptions` and `IndexNameConflictExceptions`, which can occur
|
||||
for various, sometimes obscure reasons. But, in general...
|
||||
|
||||
* An http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/cache/query/IndexExistsException.html[IndexExistsException]
|
||||
@@ -138,9 +138,9 @@ create an `Index`.
|
||||
is thrown when there exists another `Index` with the same name but possibly different definition when attempting to
|
||||
create an `Index`.
|
||||
|
||||
_Spring Data GemFire's_ default behavior is to *_fail-fast_*, always! So, neither `Index` _Exception_ will be "handled"
|
||||
_Spring Data for Pivotal GemFire'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 GemFire_ to handle them for you, then you can set either of these `Index` bean definition options.
|
||||
for _Spring Data for Pivotal GemFire_ to handle them for you, then you can set either of these `Index` bean definition options.
|
||||
|
||||
`IgnoreIfExists` always takes *precedence* over `Override`, primarily because it uses less resources given it returns
|
||||
the "existing" `Index` in both exceptional cases.
|
||||
@@ -152,10 +152,10 @@ then the `Index` that would have been created by this `Index` bean definition /
|
||||
and the "existing" `Index` will be returned.
|
||||
|
||||
There is very little consequence in returning the "existing" `Index` since the `Index` "definition" is the same,
|
||||
as deemed by GemFire itself, *not* SDG.
|
||||
as deemed by Pivotal GemFire itself, *not* SDG.
|
||||
|
||||
However, this also means that *no* `Index` with the "`name`" specified in your `Index` bean definition / declaration
|
||||
will "actually" exist from GemFire's perspective either (i.e. with
|
||||
will "actually" exist from Pivotal GemFire's perspective either (i.e. with
|
||||
http://gemfire-90-javadocs.docs.pivotal.io/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.
|
||||
@@ -173,7 +173,7 @@ this might not be the case. So, make sure you verify.
|
||||
|
||||
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 GemFire API (the only means available).
|
||||
the existing `Index`, which is looked up using the Pivotal GemFire API (the only means available).
|
||||
|
||||
|
||||
=== `Override` Behavior
|
||||
@@ -182,7 +182,7 @@ When an `IndexExistsException` is thrown and `override` is set to `true` (or `&l
|
||||
the `Index` is effectively "_renamed_". Remember, `IndexExistsExceptions` are thrown when multiple Indexes exist,
|
||||
all having the same "definition" but different "names".
|
||||
|
||||
_Spring Data GemFire_ can only accomplish this using GemFire's API, by first "_removing_" the "existing" `Index`
|
||||
_Spring Data for Pivotal GemFire_ can only accomplish this using Pivotal GemFire'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.
|
||||
@@ -197,7 +197,7 @@ 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 GemFire's APIs. If it cannot find it,
|
||||
SDG is able to "find" the "existing" `Index`, which is dependent on Pivotal GemFire's APIs. If it cannot find it,
|
||||
nothing happens and a SDG `GemfireIndexException` is thrown wrapping the `IndexNameConflictException`.
|
||||
|
||||
However, when the "definition" of the "existing" `Index` is different, then SDG will attempt to "_recreate_" the `Index`
|
||||
@@ -207,31 +207,31 @@ and make sure the `Index` definition matches your expectations and application r
|
||||
=== 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 GemFire (e.g. _Spring Data GemFire_, GemFire _Cluster Config_,
|
||||
maybe GemFire native `cache.xml`, the API, etc, etc). You should definitely prefer 1 configuration method here
|
||||
multiple configuration sources are used to configure Pivotal GemFire (e.g. _Spring Data for Pivotal GemFire_, Pivotal GemFire _Cluster Config_,
|
||||
maybe Pivotal GemFire native `cache.xml`, the API, etc, etc). You should definitely prefer 1 configuration method here
|
||||
and stick with it.
|
||||
|
||||
_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"), GemFire distributes the `Index` definition (and name) to other peer members
|
||||
a `PARTITION` _Region_ (e.g. "X"), Pivotal GemFire 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.
|
||||
|
||||
During this window of time, it is possible that these "pending" PR `Indexes` will not be identifiable by GemFire,
|
||||
During this window of time, it is possible that these "pending" PR `Indexes` will not be identifiable by Pivotal GemFire,
|
||||
such as with a call to http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/cache/query/QueryService.html#getIndexes--[QueryService.getIndexes()]
|
||||
or with http://gemfire-90-javadocs.docs.pivotal.io/org/apache/geode/cache/query/QueryService.html#getIndexes-org.apache.geode.cache.Region-[QueryService.getIndexes(:Region)],
|
||||
or even with http://gemfire-90-javadocs.docs.pivotal.io/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 GemFire cache client applications (not involving _Spring_) to know for sure,
|
||||
As such, the only way for SDG or other Pivotal GemFire 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 GemFire API calls do not.
|
||||
"pending" `Index` definitions, where as the other Pivotal GemFire 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 GemFire `QueryService.createIndex(..)` methods are synchronous, "blocking" operations,
|
||||
then the state of GemFire should be consistent and accessible after either of these Index-type _Exceptions_ are thrown,
|
||||
the corrective action. Given all Pivotal GemFire `QueryService.createIndex(..)` methods are synchronous, "blocking" operations,
|
||||
then the state of Pivotal GemFire 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.
|
||||
|
||||
|
||||
@@ -1,24 +1,29 @@
|
||||
[[ref-introduction]]
|
||||
= Document Structure
|
||||
|
||||
The following chapters explain the core functionality offered by _Spring Data GemFire_ for Pivotal GemFire.
|
||||
The following chapters explain the core functionality offered by _Spring Data for Pivotal GemFire_.
|
||||
|
||||
<<bootstrap>> describes the configuration support provided for bootstrapping, configuring, initializing
|
||||
and accessing Pivotal GemFire Caches, Regions, and related Distributed System components.
|
||||
<<bootstrap>> describes the configuration support provided for configuring, initializing and accessing
|
||||
Pivotal GemFire Caches, Regions, and other related Distributed System components.
|
||||
|
||||
<<apis>> explains the integration between the Pivotal GemFire APIs and the various data access features
|
||||
available in _Spring_, such as transaction management and exception translation.
|
||||
available in _Spring_, such as data access, exception translation, transaction management and caching.
|
||||
|
||||
<<serialization>> describes the enhancements for Pivotal GemFire (de)serialization and management of associated objects.
|
||||
<<serialization>> describes enhancements to Pivotal GemFire's (de)serialization of managed objects.
|
||||
|
||||
<<mapping>> describes persistence mapping for POJOs stored in Pivotal GemFire using _Spring Data_.
|
||||
|
||||
<<gemfire-repositories>> describes how to create and use _Spring Data Repositories_ to access data in Pivotal GemFire.
|
||||
<<gemfire-repositories>> describes how to create and use _Spring Data Repositories_ to access data
|
||||
stored in Pivotal GemFire using basic CRUD and simple query operations.
|
||||
|
||||
<<function-annotations>> describes how to create and use Pivotal GemFire Functions using Annotations.
|
||||
<<function-annotations>> describes how to create and use Pivotal GemFire Functions using Annotations
|
||||
to perform distributed computations where the data lives.
|
||||
|
||||
<<apis:continuous-query>> describes how to use Pivotal GemFire's Continuous Query (CQ) functionality
|
||||
to process a stream of events based on interest defined and registered using a Pivotal GemFire OQL query.
|
||||
|
||||
<<gemfire-bootstrap>> describes how to bootstrap a _Spring_ `ApplicationContext` running in an Pivotal GemFire server
|
||||
using _Gfsh_.
|
||||
|
||||
<<samples>> describes the examples provided with the distribution to illustrate the various features
|
||||
available in _Spring Data GemFire_.
|
||||
available in _Spring Data for Pivotal GemFire_.
|
||||
|
||||
@@ -74,7 +74,7 @@ inside a `@Configuration` class with...
|
||||
----
|
||||
@Bean(name = "Books")
|
||||
@DependsOn("bookTitleIndex")
|
||||
PartitionedRegionFactoryBean<Long, Book> booksRegion(GemFireCache gemfireCache) {
|
||||
PartitionedRegionFactoryBean<Long, Book> booksRegion(Pivotal GemFireCache gemfireCache) {
|
||||
|
||||
PartitionedRegionFactoryBean<Long, Book> peopleRegion =
|
||||
new PartitionedRegionFactoryBean<>();
|
||||
@@ -87,7 +87,7 @@ PartitionedRegionFactoryBean<Long, Book> booksRegion(GemFireCache gemfireCache)
|
||||
}
|
||||
|
||||
@Bean
|
||||
LuceneIndexFactoryBean bookTitleIndex(GemFireCache gemFireCache,
|
||||
LuceneIndexFactoryBean bookTitleIndex(Pivotal GemFireCache gemFireCache,
|
||||
LuceneSerializer luceneSerializer) {
|
||||
|
||||
LuceneIndexFactoryBean luceneIndex = new LuceneIndexFactoryBean();
|
||||
@@ -243,7 +243,7 @@ If I define the following `LuceneIndex`...
|
||||
[source,java]
|
||||
----
|
||||
@Bean
|
||||
LuceneIndexFactoryBean personLastNameIndex(GemFireCache gemfireCache) {
|
||||
LuceneIndexFactoryBean personLastNameIndex(Pivotal GemFireCache gemfireCache) {
|
||||
|
||||
LuceneIndexFactoryBean personLastNameIndex =
|
||||
new LuceneIndexFactoryBean();
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
[[mapping.entities]]
|
||||
== Entity Mapping
|
||||
|
||||
_Spring Data GemFire_ provides support to map entities that will be stored in a Region in the GemFire In-Memory Data Grid.
|
||||
_Spring Data for Pivotal GemFire_ provides support to map entities that will be stored in a Region in the Pivotal GemFire In-Memory Data Grid.
|
||||
The mapping metadata is defined using annotations on application domain classes just like this:
|
||||
|
||||
.Mapping a domain class to a GemFire Region
|
||||
.Mapping a domain class to a Pivotal GemFire Region
|
||||
====
|
||||
[source,java]
|
||||
----
|
||||
@@ -53,17 +53,17 @@ public class Guest extends User {
|
||||
}
|
||||
----
|
||||
|
||||
Be sure to use the full-path of the GemFire Region, as defined with the _Spring Data GemFire_ XML namespace
|
||||
Be sure to use the full-path of the Pivotal GemFire Region, as defined with the _Spring Data for Pivotal GemFire_ XML namespace
|
||||
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 GemFire_ also recognizes the Region type-specific
|
||||
In addition to the `@Region` annotation, _Spring Data for Pivotal GemFire_ also recognizes the Region type-specific
|
||||
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 GemFire's`
|
||||
mapping infrastructure. However, these additional mapping annotations are useful in _Spring Data for Pivotal GemFire'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
|
||||
the application is a client or peer.
|
||||
@@ -84,7 +84,7 @@ As an alternative to specifying the Region in which the entity will be stored us
|
||||
on the entity class, you can also specify the `@Region` annotation on the entity's `Repository`.
|
||||
See <<gemfire-repositories>> for more details.
|
||||
|
||||
However, let's say you want to store a `Person` in multiple GemFire Regions (e.g. `People` and `Customers`),
|
||||
However, let's say you want to store a `Person` in multiple Pivotal GemFire Regions (e.g. `People` and `Customers`),
|
||||
then you can define your corresponding `Repository` interface extensions like so:
|
||||
|
||||
[source,java]
|
||||
@@ -100,7 +100,7 @@ public interface CustomerRepository extends GemfireRepository<Person, String> {
|
||||
}
|
||||
----
|
||||
|
||||
Then, using each Repository individually, you can store the entity in multiple GemFire Regions.
|
||||
Then, using each Repository individually, you can store the entity in multiple Pivotal GemFire Regions.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@@ -124,7 +124,7 @@ either as a local cache transaction or a global transaction.
|
||||
[[mapping.pdx-serializer]]
|
||||
== Mapping PDX Serializer
|
||||
|
||||
_Spring Data GemFire_ provides a custom
|
||||
_Spring Data for Pivotal GemFire_ 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. Beyond that, it allows customizing
|
||||
the entity instantiation by using the Spring Data `EntityInstantiator` abstraction. By default the serializer
|
||||
|
||||
@@ -6,7 +6,7 @@ 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.
|
||||
|
||||
GemFire implements the following types of Regions:
|
||||
Pivotal GemFire 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.
|
||||
@@ -25,7 +25,7 @@ http://geode.apache.org/docs/guide/11/developing/region_options/region_types.htm
|
||||
[[bootstrap:region:lookup]]
|
||||
== Using an externally configured Region
|
||||
|
||||
To reference Regions already configured in a GemFire native `cache.xml` file, use the `lookup-region` element.
|
||||
To reference Regions already configured in a Pivotal GemFire 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:
|
||||
|
||||
@@ -61,7 +61,7 @@ the Region semantics or setup infrastructure.
|
||||
[[bootstrap:region:lookup:auto]]
|
||||
== Auto Region Lookup
|
||||
|
||||
"auto-lookup" allows all Regions defined in a GemFire native `cache.xml` file to be imported into a _Spring_
|
||||
"auto-lookup" allows all Regions defined in a Pivotal GemFire native `cache.xml` file to be imported into a _Spring_
|
||||
application context when using the`cache-xml-location` attribute on the `<gfe:cache>` element.
|
||||
|
||||
For instance, given a `cache.xml` file of...
|
||||
@@ -97,12 +97,12 @@ with:
|
||||
<gfe:auto-region-lookup/>
|
||||
----
|
||||
|
||||
_Spring Data GemFire_ will automatically create beans for all GemFire Regions defined in `cache.xml` that have not been
|
||||
_Spring Data for Pivotal GemFire_ will automatically create beans for all Pivotal GemFire Regions defined in `cache.xml` that have not been
|
||||
explicitly added to the _Spring_ context with explicit `<gfe:lookup-region>` bean declarations.
|
||||
|
||||
It is important to realize that _Spring Data GemFire_ uses a _Spring_
|
||||
It is important to realize that _Spring Data for Pivotal GemFire_ 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 GemFire to add
|
||||
to post process the cache after it is both created and initialized to determine the Regions defined in Pivotal GemFire to add
|
||||
as beans in the _Spring_ application context.
|
||||
|
||||
You may inject these "auto-looked-up" Regions like any other bean defined in the _Spring_ application context with
|
||||
@@ -137,13 +137,13 @@ If you are declaring your components using _Spring_ XML config, then you would d
|
||||
<bean class="example.ApplicationDao" depends-on="gemfireCache"/>
|
||||
----
|
||||
|
||||
This ensures the GemFire cache and all the Regions defined in `cache.xml` get created before any components
|
||||
This ensures the Pivotal GemFire cache and all the Regions defined in `cache.xml` get created before any components
|
||||
with auto-wire references when using the new `<gfe:auto-region-lookup>` element.
|
||||
|
||||
[[bootstrap:region:overview]]
|
||||
== Configuring Regions
|
||||
|
||||
_Spring Data GemFire_ provides comprehensive support for configuring any type of Region via the following elements:
|
||||
_Spring Data for Pivotal GemFire_ provides comprehensive support for configuring any type of Region via the following elements:
|
||||
|
||||
* LOCAL Region: `<local-region>`
|
||||
* PARTITION Region: `<partitioned-region>`
|
||||
@@ -166,8 +166,8 @@ The following table lists attributes available for all Region types:
|
||||
| Description
|
||||
|
||||
| cache-ref
|
||||
| GemFire Cache bean reference
|
||||
| The name of the bean defining the GemFire Cache (by default 'gemfireCache').
|
||||
| Pivotal GemFire Cache bean reference
|
||||
| The name of the bean defining the Pivotal GemFire Cache (by default 'gemfireCache').
|
||||
|
||||
| cloning-enabled
|
||||
| boolean, default:false
|
||||
@@ -182,7 +182,7 @@ The following table lists attributes available for all Region types:
|
||||
| Determines whether members perform checks to provide consistent handling for concurrent or out-of-order updates to distributed Regions.
|
||||
|
||||
| data-policy
|
||||
| See GemFire's http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/DataPolicy.html[Data Policy]
|
||||
| See Pivotal GemFire'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.
|
||||
|
||||
| destroy
|
||||
@@ -297,7 +297,7 @@ mutually exclusive and using both in the same element will result in an exceptio
|
||||
.Bean Reference Conventions
|
||||
[NOTE]
|
||||
====
|
||||
The `cache-listener` element is an example of a common pattern used in the namespace anywhere GemFire provides
|
||||
The `cache-listener` element is an example of a common pattern used in the namespace anywhere Pivotal GemFire 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
|
||||
@@ -311,11 +311,11 @@ configuration example.
|
||||
=== CacheLoaders and CacheWriters
|
||||
|
||||
Similar to `cache-listener`, the namespace provides `cache-loader` and `cache-writer` elements to register
|
||||
these GemFire components respectively for a Region.
|
||||
these Pivotal GemFire components respectively 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 GemFire only supports at most a single instance `CacheLoader` and `CacheWriter`
|
||||
an external data source. The difference is Pivotal GemFire only supports at most a single instance `CacheLoader` and `CacheWriter`
|
||||
per Region. However, either declaration style may be used.
|
||||
|
||||
Example:
|
||||
@@ -345,7 +345,7 @@ in the Pivotal GemFire documentation for more details.
|
||||
[[bootstrap:region:compression]]
|
||||
== Compression
|
||||
|
||||
GemFire Regions may also be compressed in order to reduce JVM memory consumption and pressure to possibly avoid
|
||||
Pivotal GemFire 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
|
||||
@@ -370,11 +370,11 @@ http://gemfire.docs.pivotal.io/geode/managing/region_compression/region_compress
|
||||
[[bootstrap:region:subregions]]
|
||||
== Subregions
|
||||
|
||||
_Spring Data GemFire_ also supports Subregions, allowing Regions to be arranged in a hierarchical relationship.
|
||||
_Spring Data for Pivotal GemFire_ also supports Subregions, allowing Regions to be arranged in a hierarchical relationship.
|
||||
|
||||
For example, GemFire allows for a */Customer/Address* Region and a different */Employee/Address* Region. Additionally,
|
||||
For example, Pivotal GemFire 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 GemFire constraints. A Subregion is naturally
|
||||
the parent Region. Regions types may be mixed and matched subject to Pivotal GemFire 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:
|
||||
|
||||
@@ -399,11 +399,11 @@ OQL query strings.
|
||||
[[bootstrap:region:templates]]
|
||||
== Region Templates
|
||||
|
||||
_Spring Data GemFire_ also supports Region Templates. This feature allows developers to define common Region
|
||||
_Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
_Spring Data GemFire_ includes 5 Region template tags in namespace:
|
||||
_Spring Data for Pivotal GemFire_ includes 5 Region template tags in namespace:
|
||||
|
||||
[cols="1,2", options="header"]
|
||||
.Region Template Tags
|
||||
@@ -481,7 +481,7 @@ Attributes and sub-elements defined in subsequent, inherited Region bean definit
|
||||
|
||||
=== How Templating Works
|
||||
|
||||
_Spring Data GemFire_ applies Region Templates when the _Spring_ application context configuration meta-data is *parsed*,
|
||||
_Spring Data for Pivotal GemFire_ 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".
|
||||
@@ -495,14 +495,14 @@ NOTE: Region Templates are single-inheritance.
|
||||
=== Caution concerning Regions, Subregions and Lookups
|
||||
|
||||
Previously, one of the underlying properties of the `replicated-region`, `partitioned-region`, `local-region`
|
||||
and `client-region` elements in the _Spring Data GemFire_ XML namespace was to perform a lookup first before
|
||||
and `client-region` elements in the _Spring Data for Pivotal GemFire_ 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 GemFire native `cache.xml` configuration file. Therefore, the lookup
|
||||
if the Region was defined in an imported Pivotal GemFire 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 GemFire_ `<*-region>` namespace elements now includes
|
||||
`CREATE TABLE IF NOT EXISTS ...` DDL syntax, the _Spring Data for Pivotal GemFire_ `<*-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.
|
||||
@@ -518,7 +518,7 @@ by the application. Even worse, the application developer may want to define th
|
||||
IMPORTANT: Recommended Practice - Only use `replicated-region`, `partitioned-region`, `local-region` and `client-region`
|
||||
namespace elements to define new Regions.
|
||||
|
||||
Consider the following native GemFire `cache.xml` configuration file...
|
||||
Consider the following native Pivotal GemFire `cache.xml` configuration file...
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -608,9 +608,9 @@ Then the Region beans defined in the _Spring_ application context will consist o
|
||||
above (i.e. `@Resource(name = "Customers/Accounts"))` is now broken since no bean with name "Customers/Accounts"
|
||||
is actually defined.
|
||||
|
||||
GemFire is flexible in referencing both parent Regions and Subregions with or without the leading forward slash.
|
||||
Pivotal GemFire 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 _GemFire is very specific when it comes to naming beans after Regions,
|
||||
or just "Customers/Accounts". However, _Spring Data _Pivotal GemFire is very specific when it comes to naming beans after Regions,
|
||||
typically always using the forward slash (/) to represent Subregions (e.g. "/Customers/Accounts").
|
||||
|
||||
Therefore, it is recommended that users either use the nested `lookup-region` syntax as shown above,
|
||||
@@ -624,18 +624,18 @@ 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 GemFire `cache.xml` configuration file as `REPLICATES` and will exist
|
||||
Not, since the Regions were defined in the native Pivotal GemFire `cache.xml` configuration file as `REPLICATES` and will exist
|
||||
by the time the cache is initialized, or once the `<gfe:cache>` bean 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 GemFire, eviction applies to the _Least Recently Used_ entry (also known as
|
||||
Currently, in Pivotal GemFire, 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).
|
||||
|
||||
_Spring Data GemFire_ supports all eviction policies (entry count, memory and heap usage) for PARTITION Regions,
|
||||
_Spring Data for Pivotal GemFire_ supports all eviction policies (entry count, memory and heap usage) for PARTITION Regions,
|
||||
REPLICATE Regions and client, local Regions 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,
|
||||
@@ -649,12 +649,12 @@ a developer would specify the following configuration:
|
||||
----
|
||||
|
||||
IMPORTANT: Replicas cannot use `local destroy` eviction since that would invalidate them.
|
||||
See the GemFire docs for more information.
|
||||
See the Pivotal GemFire docs for more information.
|
||||
|
||||
When configuring Regions for overflow, it is recommended to configure the storage through the `disk-store` element
|
||||
for maximum efficiency.
|
||||
|
||||
For a detailed description of eviction policies, please refer to the GemFire documentation on
|
||||
For a detailed description of eviction policies, please refer to the Pivotal GemFire documentation on
|
||||
http://geode.apache.org/docs/guide/11/developing/eviction/chapter_overview.html[Eviction].
|
||||
|
||||
[[bootstrap:region:expiration]]
|
||||
@@ -664,7 +664,7 @@ Pivotal GemFire allows you to control how long entries exist in the cache. Expir
|
||||
as opposed to Eviction, which is driven by the entry count or heap/memory usage. Once an entry expires
|
||||
it may no longer be accessed from the cache.
|
||||
|
||||
GemFire supports the following Expiration types:
|
||||
Pivotal GemFire 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
|
||||
or update. For entries, the counter is set to zero for create and put operations. Region counters are reset when
|
||||
@@ -674,7 +674,7 @@ The Idle Timeout counter for an object is reset any time its TTL counter is rese
|
||||
_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 GemFire_ provides `<region-ttl>`,
|
||||
Each of these may be applied to the Region itself or entries in the Region. _Spring Data for Pivotal GemFire_ provides `<region-ttl>`,
|
||||
`<region-tti>`, `<entry-ttl>` and `<entry-tti>` Region child elements to specify timeout values and expiration actions.
|
||||
|
||||
For example:
|
||||
@@ -687,13 +687,13 @@ For example:
|
||||
</gfe:replicated-region>
|
||||
----
|
||||
|
||||
For a detailed description of expiration policies, please refer to the GemFire documentation on
|
||||
For a detailed description of expiration policies, please refer to the Pivotal GemFire documentation on
|
||||
http://geode.apache.org/docs/guide/11/developing/expiration/chapter_overview.html[Expiration].
|
||||
|
||||
[[bootstrap:region:expiration:annotation]]
|
||||
=== Annotation-based Data Expiration
|
||||
|
||||
With _Spring Data GemFire_, a developer has the ability to define Expiration policies and settings on individual
|
||||
With _Spring Data for Pivotal GemFire_, 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...
|
||||
|
||||
@@ -727,7 +727,7 @@ Expiration types, 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 GemFire's_ Expiration annotation support. However, Pivotal GemFire and _Spring Data GemFire_ do allow you
|
||||
by _Spring Data for Pivotal GemFire's_ Expiration annotation support. However, Pivotal GemFire and _Spring Data for Pivotal GemFire_ do allow you
|
||||
to set Region Expiration using the SDG XML namespace, like so...
|
||||
|
||||
[source,xml]
|
||||
@@ -739,16 +739,16 @@ to set Region Expiration using the SDG XML namespace, like so...
|
||||
----
|
||||
====
|
||||
|
||||
_Spring Data GemFire's_ `@Expiration` annotation support is implemented with GemFire's
|
||||
_Spring Data for Pivotal GemFire's_ `@Expiration` annotation support is implemented with Pivotal GemFire's
|
||||
http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CustomExpiry.html[`CustomExpiry`] interface.
|
||||
Refer to GemFire's documentation on http://geode.apache.org/docs/guide/11/developing/expiration/configuring_data_expiration.html[Configuring Data Expiration]
|
||||
Refer to Pivotal GemFire's documentation on http://geode.apache.org/docs/guide/11/developing/expiration/configuring_data_expiration.html[Configuring Data Expiration]
|
||||
for more details
|
||||
|
||||
The _Spring Data GemFire_ `AnnotationBasedExpiration` class (and `CustomExpiry` implementation) is responsible
|
||||
The _Spring Data for Pivotal GemFire_ `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.
|
||||
|
||||
To use _Spring Data GemFire_ to configure specific GemFire Regions to appropriately apply the Expiration policy
|
||||
To use _Spring Data for Pivotal GemFire_ to configure specific Pivotal GemFire Regions to appropriately apply the Expiration policy
|
||||
and settings applied 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
|
||||
@@ -773,11 +773,11 @@ along with the `<gfe:custom-entry-tti ref="ttiExpiration"/>` 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 GemFire's_ `@Expiration` annotations: `@Expiration`,
|
||||
and custom settings using one of _Spring Data for Pivotal GemFire's_ `@Expiration` annotations: `@Expiration`,
|
||||
`@IdleTimeoutExpiration` and/or `@TimeToLiveExpiration`
|
||||
|
||||
3. (optional) In cases where particular application domain objects have not been annotated with _Spring Data GemFire's_
|
||||
`@Expiration` annotations at all, but the GemFire Region is configured to use SDG's custom `AnnotationBasedExpiration`
|
||||
3. (optional) In cases where particular application domain objects have not been annotated with _Spring Data for Pivotal GemFire's_
|
||||
`@Expiration` annotations at all, but the Pivotal GemFire 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...
|
||||
|
||||
@@ -798,11 +798,11 @@ class to determine the Expiration policy and settings for objects stored in the
|
||||
</gfe:partitioned-region>
|
||||
----
|
||||
|
||||
You may have noticed that _Spring Data GemFire's_ `@Expiration` annotations use a String as the attributes type rather
|
||||
You may have noticed that _Spring Data for Pivotal GemFire'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?
|
||||
|
||||
Well, enter one of _Spring Data GemFire's_ other features, leveraging _Spring's_ core infrastructure
|
||||
Well, enter one of _Spring Data for Pivotal GemFire's_ other features, leveraging _Spring's_ core infrastructure
|
||||
for configuration convenience: _Property Placeholders_ and _Spring Expression Language_ (SpEL).
|
||||
|
||||
For instance, a developer can specify both the Expiration 'timeout' and 'action' using _Property Placeholders_
|
||||
@@ -866,18 +866,18 @@ instance of `java.util.Properties`. In this example, even the Properties (`expir
|
||||
the action value on the actual Expiration action enumerated type leading to more quickly identified failures
|
||||
if the types ever change.
|
||||
|
||||
All of this has been demonstrated and tested in the _Spring Data GemFire_ test suite, by way of example. See the
|
||||
All of this has been demonstrated and tested in the _Spring Data for Pivotal GemFire_ test suite, by way of example. See the
|
||||
https://github.com/spring-projects/spring-data-geode[source] for further details.
|
||||
|
||||
[[bootstrap:region:persistence]]
|
||||
== Data Persistence
|
||||
|
||||
Regions can be persistent. GemFire ensures that all the data you put into a Region that is configured for persistence
|
||||
Regions can be persistent. Pivotal GemFire 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 GemFire data node.
|
||||
the Pivotal GemFire data node.
|
||||
|
||||
To enable persistence with _Spring Data GemFire_, simply set the `persistent` attribute to `true` on
|
||||
To enable persistence with _Spring Data for Pivotal GemFire_, simply set the `persistent` attribute to `true` on
|
||||
any of the `<*-region>` elements. For example...
|
||||
|
||||
[source,xml]
|
||||
@@ -886,7 +886,7 @@ any of the `<*-region>` elements. For example...
|
||||
----
|
||||
|
||||
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[GemFire's DataPolicy settings].
|
||||
http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/DataPolicy.html[Pivotal GemFire's DataPolicy settings].
|
||||
For example...
|
||||
|
||||
[source,xml]
|
||||
@@ -913,8 +913,8 @@ This is discussed further in <<bootstrap:diskstore>>
|
||||
[[bootstrap:region:subscription]]
|
||||
== Subscription Policy
|
||||
|
||||
GemFire 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 GemFire_ provides the `<gfe:subscription/>`
|
||||
Pivotal GemFire 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 for Pivotal GemFire_ provides the `<gfe:subscription/>`
|
||||
sub-element to set the subscription policy on REPLICATE and PARTITION Regions to either `ALL` or `CACHE_CONTENT`.
|
||||
|
||||
[source,xml]
|
||||
@@ -927,11 +927,11 @@ sub-element to set the subscription policy on REPLICATE and PARTITION Regions to
|
||||
[[bootstrap:region:local]]
|
||||
== Local Region
|
||||
|
||||
_Spring Data GemFire_ offers a dedicated `local-region` element for creating local Regions. Local Regions, as the name
|
||||
_Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
A minimal declaration looks as follows (again, the example relies on the _Spring Data GemFire_ namespace
|
||||
A minimal declaration looks as follows (again, the example relies on the _Spring Data for Pivotal GemFire_ namespace
|
||||
naming conventions to wire the cache):
|
||||
|
||||
[source,xml]
|
||||
@@ -940,7 +940,7 @@ naming conventions to wire the cache):
|
||||
----
|
||||
|
||||
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 GemFire cache named `gemfireCache`.
|
||||
(`exampleLocalRegion`) and the bean assumes the existence of a Pivotal GemFire cache named `gemfireCache`.
|
||||
|
||||
[[bootstrap:region:replicate]]
|
||||
== Replicated Region
|
||||
@@ -951,7 +951,7 @@ a REPLICATE Region is distributed to all copies of the Region. When a _replica_
|
||||
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_.
|
||||
|
||||
_Spring Data GemFire_ offers a `replicated-region` element. A minimal declaration looks as follows.
|
||||
_Spring Data for Pivotal GemFire_ offers a `replicated-region` element. A minimal declaration looks as follows.
|
||||
All common configuration options are available for REPLICATE Regions.
|
||||
|
||||
[source,xml]
|
||||
@@ -959,22 +959,22 @@ All common configuration options are available for REPLICATE Regions.
|
||||
<gfe:replicated-region id="exampleReplica"/>
|
||||
----
|
||||
|
||||
Refer to GemFire's documentation on
|
||||
Refer to Pivotal GemFire's documentation on
|
||||
http://geode.apache.org/docs/guide/11/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 GemFire_ namespace is the PARTITION Region.
|
||||
Another Region type supported out-of-the-box by the _Spring Data for Pivotal GemFire_ namespace is the PARTITION Region.
|
||||
|
||||
To quote the GemFire docs:
|
||||
To quote the Pivotal GemFire 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. GemFire divides the domain of hashcodes into buckets. Each bucket is assigned to a specific peer,
|
||||
the operation. Pivotal GemFire 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
|
||||
@@ -992,7 +992,7 @@ Below is a quick example on setting up a PARTITION Region with 2 redundant copie
|
||||
</gfe:partitioned-region>
|
||||
----
|
||||
|
||||
Refer to GemFire's documentation on
|
||||
Refer to Pivotal GemFire's documentation on
|
||||
http://geode.apache.org/docs/guide/11/developing/partitioned_regions/chapter_overview.html[Partitioned Regions]
|
||||
for more details.
|
||||
|
||||
@@ -1049,12 +1049,12 @@ immediately when a new member is added.
|
||||
[[bootstrap:region:client]]
|
||||
== Client Region
|
||||
|
||||
Pivotal GemFire supports various deployment topologies for managing and distributing data. GemFire topologies is outside
|
||||
the scope of this documentation. However, to quickly recap, GemFire's supported topologies can be classified in short as:
|
||||
Pivotal GemFire supports various deployment topologies for managing and distributing data. Pivotal GemFire topologies is outside
|
||||
the scope of this documentation. However, to quickly recap, Pivotal GemFire's supported topologies can be classified in short as:
|
||||
_peer-to-peer_ (p2p), _client-server_, and _wide area network_ (WAN). In the last two configurations, it is common
|
||||
to declare *client* Regions which connect to a cache server.
|
||||
|
||||
_Spring Data GemFire_ offers dedicated support for such configuration through <<bootstrap:cache:client, client-cache>>,
|
||||
_Spring Data for Pivotal GemFire_ offers dedicated support for such configuration through <<bootstrap:cache:client, client-cache>>,
|
||||
`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.
|
||||
|
||||
@@ -1089,14 +1089,14 @@ cache servers and peer data members in the distributed system and are recommende
|
||||
possible to configure the Pool to connect directly to one or more cache servers 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 GemFire_ schema (<<appendix-schema>>) and GemFire's documentation on
|
||||
the _Spring Data for Pivotal GemFire_ schema (<<appendix-schema>>) and Pivotal GemFire's documentation on
|
||||
http://geode.apache.org/docs/guide/11/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 GemFire
|
||||
the data it actually requires. In _Spring Data GemFire_, 'interests' can be defined for each client Region separately.
|
||||
To minimize network traffic, each client can separately define its own 'interests' policies, indicating to Pivotal GemFire
|
||||
the data it actually requires. In _Spring Data for Pivotal GemFire_, 'interests' can be defined for each client Region separately.
|
||||
Both Key-based and Regular Expression-based interest types are supported.
|
||||
|
||||
For example:
|
||||
@@ -1193,12 +1193,12 @@ for more details.
|
||||
== JSON Support
|
||||
|
||||
Pivotal GemFire has support for caching JSON documents in Regions along with the ability to query stored JSON documents
|
||||
using the GemFire OQL. JSON documents are stored internally as
|
||||
using the Pivotal GemFire 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
|
||||
to perform conversion to and from JSON documents (as a `String`).
|
||||
|
||||
_Spring Data GemFire_ provides the `<gfe-data:json-region-autoproxy/>` element to enable a
|
||||
_Spring Data for Pivotal GemFire_ provides the `<gfe-data:json-region-autoproxy/>` 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.
|
||||
@@ -1215,7 +1215,7 @@ configured Regions. This is done by creating a parallel data structure in local
|
||||
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 GemFire's proprietary `Region.Entry` such as:
|
||||
NOTE: Certain Region operations, specifically those that use Pivotal GemFire'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<java.util.Map.Entry<?, ?>>` is also not affected.
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
[[gemfire-repositories]]
|
||||
= Spring Data GemFire Repositories
|
||||
= Spring Data for Pivotal GemFire Repositories
|
||||
|
||||
== Introduction
|
||||
|
||||
_Spring Data GemFire_ provides support to use the _Spring Data Repository_ abstraction to easily persist entities
|
||||
into GemFire along with execute queries. A general introduction to the _Repository programming model_ is provided
|
||||
_Spring Data for Pivotal GemFire_ provides support to use the _Spring Data Repository_ abstraction to easily persist entities
|
||||
into Pivotal GemFire 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].
|
||||
|
||||
[[gemfire-repositories.spring-configuration-xml]]
|
||||
== Spring XML Configuration
|
||||
|
||||
To bootstrap _Spring Data Repositories_, you use the `<repositories/>` element from the _Spring Data GemFire_
|
||||
To bootstrap _Spring Data Repositories_, you use the `<repositories/>` element from the _Spring Data for Pivotal GemFire_
|
||||
Data namespace:
|
||||
|
||||
.Bootstrap Spring Data GemFire Repositories in XML
|
||||
.Bootstrap Spring Data for Pivotal GemFire Repositories in XML
|
||||
====
|
||||
[source,xml]
|
||||
----
|
||||
@@ -31,7 +31,7 @@ Data namespace:
|
||||
====
|
||||
|
||||
This configuration snippet looks for interfaces below the configured base package and creates _Repository_ instances
|
||||
for those interfaces backed by a `SimpleGemFireRepository`.
|
||||
for those interfaces backed by a `SimplePivotal GemFireRepository`.
|
||||
|
||||
IMPORTANT: You must have your application domain classes correctly mapped to configured Regions
|
||||
or the bootstrap process will fail otherwise.
|
||||
@@ -45,7 +45,7 @@ https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#
|
||||
Using this approach, it is a simple matter to bootstrap _Spring Data Repositories_ using the SDG `@EnableGemfireRepositories`
|
||||
annotation:
|
||||
|
||||
.Bootstrap _Spring Data GemFire Repositories_ with `@EnableGemfireRepositories`
|
||||
.Bootstrap _Spring Data for Pivotal GemFire Repositories_ with `@EnableGemfireRepositories`
|
||||
====
|
||||
[source, java]
|
||||
----
|
||||
@@ -85,7 +85,7 @@ not provided out-of-the-box (OOTB) by the data store (e.g. SDG).
|
||||
One example of where custom _Repository_ implementations are needed with Pivotal GemFire is when performing _Joins_.
|
||||
_Joins_ are not supported by SDG _Repositories_ OOTB. With a Pivotal GemFire `PARTITION` Region, the _Join_ must be
|
||||
performed on collocated `PARTITION` Regions even, since Pivotal GemFire does not support "distributed" _Joins_.
|
||||
In addition, the _Equi-Join_ OQL Query must be performed inside a GemFire Function.
|
||||
In addition, the _Equi-Join_ OQL Query must be performed inside a Pivotal GemFire Function.
|
||||
See http://gemfire91.docs.pivotal.io/geode/developing/partitioned_regions/join_query_partitioned_regions.html[here]
|
||||
for more details on Pivotal GemFire _Equi-Join Queries_.
|
||||
|
||||
@@ -96,7 +96,7 @@ for more details on all configuration settings.
|
||||
[[gemfire-repositories.queries.executing]]
|
||||
== Executing OQL Queries
|
||||
|
||||
_Spring Data GemFire Repositories_ enable the definition of query methods to easily execute GemFire OQL Queries
|
||||
_Spring Data for Pivotal GemFire Repositories_ enable the definition of query methods to easily execute Pivotal GemFire OQL Queries
|
||||
against the Region the managed entity is mapped to.
|
||||
|
||||
.Sample Repository
|
||||
@@ -207,20 +207,20 @@ for application development today. Technically, this means developers can acces
|
||||
supported by _Spring Data Commons_ within their applications by reusing their existing application-specific
|
||||
Repository interfaces, a very convenient and powerful abstraction.
|
||||
|
||||
To support GemFire's OQL Query language extensions and preserve portability across different data stores,
|
||||
_Spring Data GemFire_ adds support for OQL Query extensions using Java Annotations. These Annotations will be ignored
|
||||
To support Pivotal GemFire's OQL Query language extensions and preserve portability across different data stores,
|
||||
_Spring Data for Pivotal GemFire_ 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.
|
||||
|
||||
For instance, many data stores will most likely not implement GemFire's OQL `IMPORT` keyword. By implementing `IMPORT`
|
||||
For instance, many data stores will most likely not implement Pivotal GemFire'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.
|
||||
|
||||
Currently, the set of GemFire OQL Query language extensions that are supported by _Spring Data GemFire_ include:
|
||||
Currently, the set of Pivotal GemFire OQL Query language extensions that are supported by _Spring Data for Pivotal GemFire_ include:
|
||||
|
||||
[cols="1,2,2,2", options="header"]
|
||||
.Supported GemFire OQL extensions for Repository query methods
|
||||
.Supported Pivotal GemFire OQL extensions for Repository query methods
|
||||
|===
|
||||
| Keyword
|
||||
| Annotation
|
||||
@@ -248,7 +248,7 @@ Currently, the set of GemFire OQL Query language extensions that are supported b
|
||||
| NA
|
||||
|===
|
||||
|
||||
As an example, suppose you have a `Customers` application domain class and corresponding GemFire Region along with a
|
||||
As an example, suppose you have a `Customers` application domain class and corresponding Pivotal GemFire Region along with a
|
||||
`CustomerRepository` and a query method to lookup `Customers` by last name, like so...
|
||||
|
||||
.Sample Customers Repository
|
||||
@@ -295,7 +295,7 @@ This will result in the following OQL Query:
|
||||
|
||||
`<TRACE> <HINT 'LastNameIdx'> IMPORT org.example.app.domain.Customer; SELECT * FROM /Customers x WHERE x.lastName = $1 LIMIT 10`
|
||||
|
||||
_Spring Data GemFire's Repository_ extension and support is careful not to create conflicting declarations when
|
||||
_Spring Data for Pivotal GemFire'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.
|
||||
|
||||
As another example, suppose you have a raw `@Query` annotated query method defined in your `CustomerRepository`
|
||||
@@ -342,7 +342,7 @@ Using the Spring Data _Repository_ abstraction, query method convention for defi
|
||||
(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 GemFire_ introduces the `o.s.d.gemfire.repository.query.QueryPostProcessor`
|
||||
Since 2.0.x, _Spring Data for Pivotal GemFire_ introduces the `o.s.d.gemfire.repository.query.QueryPostProcessor`
|
||||
functional interface. The interface is loosely defined as follows...
|
||||
|
||||
.QueryPostProcessor
|
||||
@@ -378,7 +378,7 @@ and used to create a pipeline of processing for a group of generated query metho
|
||||
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 GemFire's_ case
|
||||
We will discuss this further below. All `QUERY` type parameter arguments in _Spring Data for Pivotal GemFire's_ case
|
||||
will be of type `java.lang.String`.
|
||||
|
||||
NOTE: It is useful to define the query as type `QUERY` since this `QueryPostProcessor` interface maybe ported to
|
||||
@@ -478,7 +478,7 @@ class OrderedLimitedCustomerByLastNameQueryPostProcessor implements QueryPostPro
|
||||
====
|
||||
|
||||
While this works, it possible to achieve the same affect just using the Spring Data _Repository_ convention and extensions
|
||||
provided by _Spring Data GemFire_. For instance, the same query could be defined as...
|
||||
provided by _Spring Data for Pivotal GemFire_. For instance, the same query could be defined as...
|
||||
|
||||
.CustomerRepository using the convention
|
||||
====
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
= Sample Applications
|
||||
|
||||
NOTE: Sample applications are now maintained in the
|
||||
https://github.com/spring-projects/spring-gemfire-examples[Spring GemFire Examples] repository.
|
||||
https://github.com/spring-projects/spring-gemfire-examples[Spring Pivotal GemFire Examples] repository.
|
||||
|
||||
The _Spring Data GemFire_ project also includes one sample application. Named "Hello World", the sample application
|
||||
The _Spring Data for Pivotal GemFire_ project also includes one sample application. Named "Hello World", the sample application
|
||||
demonstrates how to configure and use Pivotal GemFire inside a _Spring_ application. At runtime, the sample offers
|
||||
a *shell* to the user allowing her to run various commands against the data grid. It provides an excellent
|
||||
starting point for users unfamiliar with the essential components or with _Spring_ and GemFire concepts.
|
||||
starting point for users unfamiliar with the essential components or with _Spring_ and Pivotal GemFire concepts.
|
||||
|
||||
The sample is bundled with the distribution and is Maven-based. A developer can easily import them into any
|
||||
Maven-aware IDE (such as https://spring.io/tools/sts[Spring Tool Suite]) or run them from the command-line.
|
||||
@@ -15,13 +15,13 @@ Maven-aware IDE (such as https://spring.io/tools/sts[Spring Tool Suite]) or run
|
||||
[[samples:hello-world]]
|
||||
== Hello World
|
||||
|
||||
The Hello World sample application demonstrates the core functionality of the _Spring Data GemFire_ project.
|
||||
It bootstraps GemFire, configures it, executes arbitrary commands against the cache and shuts it down
|
||||
The Hello World sample application demonstrates the core functionality of the _Spring Data for Pivotal GemFire_ project.
|
||||
It bootstraps Pivotal GemFire, configures it, executes arbitrary commands against the cache and shuts it down
|
||||
when the application exits. Multiple instances of the application can be started at the same time
|
||||
and they will work together, sharing data without any user intervention.
|
||||
|
||||
.Running under Linux
|
||||
NOTE: If you experience networking problems when starting GemFire or the samples, try adding the following
|
||||
NOTE: If you experience networking problems when starting Pivotal GemFire or the samples, try adding the following
|
||||
system property `java.net.preferIPv4Stack=true` to the command line (e.g. `-Djava.net.preferIPv4Stack=true`).
|
||||
For an alternative (global) fix especially on Ubuntu see https://jira.spring.io/browse/SGF-28[SGF-28].
|
||||
|
||||
@@ -44,7 +44,7 @@ The output will likely look as follows:
|
||||
|
||||
[source]
|
||||
----
|
||||
INFO: Created GemFire Cache [Spring GemFire World] v. X.Y.Z
|
||||
INFO: Created Pivotal GemFire Cache [Spring Pivotal GemFire World] v. X.Y.Z
|
||||
INFO: Created new cache region [myWorld]
|
||||
INFO: Member xxxxxx:50694/51611 connecting to region [myWorld]
|
||||
Hello World!
|
||||
@@ -81,7 +81,7 @@ and its information:
|
||||
|
||||
[source]
|
||||
----
|
||||
INFO: Connected to Distributed System ['Spring GemFire World'=xxxx:56218/49320@yyyyy]
|
||||
INFO: Connected to Distributed System ['Spring Pivotal GemFire World'=xxxx:56218/49320@yyyyy]
|
||||
Hello World!
|
||||
...
|
||||
|
||||
@@ -107,7 +107,7 @@ http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/
|
||||
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 Pivotal GemFire cache, Region and for illustrative purposes, a simple `CacheListener`
|
||||
that acts as a logger.
|
||||
|
||||
The main *beans* are `HelloWorld` and `CommandProcessor` which rely on the `GemfireTemplate` to interact with
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[[serialization]]
|
||||
= Working with Pivotal GemFire Serialization
|
||||
|
||||
To improve overall performance of the Pivotal GemFire In-memory Data Grid, GemFire supports a dedicated
|
||||
To improve overall performance of the Pivotal GemFire In-memory Data Grid, Pivotal GemFire 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
|
||||
@@ -10,7 +10,7 @@ and
|
||||
https://cwiki.apache.org/confluence/display/GEODE/PDX+Serialization+Internals[PDX Serialization Internals]
|
||||
for more details.
|
||||
|
||||
This chapter discusses the various ways in which _Spring Data GemFire_ simplifies and improves GemFire's
|
||||
This chapter discusses the various ways in which _Spring Data for Pivotal GemFire_ simplifies and improves Pivotal GemFire's
|
||||
custom serialization in Java.
|
||||
|
||||
[[serialization:wiring]]
|
||||
@@ -19,9 +19,9 @@ custom serialization in Java.
|
||||
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 GemFire_ offers a special
|
||||
For such cases, _Spring Data for Pivotal GemFire_ 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 GemFire during deserialization.
|
||||
that performs wiring for each new instance created by Pivotal GemFire 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.
|
||||
@@ -46,16 +46,16 @@ 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 GemFire serialization system and perform wiring on all instances of `SomeDataSerializableClass`
|
||||
created by GemFire during deserialization.
|
||||
itself with the Pivotal GemFire serialization system and perform wiring on all instances of `SomeDataSerializableClass`
|
||||
created by Pivotal GemFire during deserialization.
|
||||
|
||||
[[serialization:instance-generator]]
|
||||
== 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, GemFire uses reflection to create new types, but for some scenarios, this might prove to be expensive.
|
||||
Out-of-the-box, Pivotal GemFire 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 GemFire_ allows the automatic generation of `Instatiator` classes which instantiate a new type
|
||||
_Spring Data for Pivotal GemFire_ allows the automatic generation of `Instatiator` classes which instantiate a new type
|
||||
(using the default constructor) without the use of reflection:
|
||||
|
||||
[source,xml]
|
||||
@@ -71,5 +71,5 @@ _Spring Data GemFire_ allows the automatic generation of `Instatiator` classes w
|
||||
----
|
||||
|
||||
The definition above, automatically generates two `Instantiators` for two classes, namely `CustomTypeA`
|
||||
and `CustomTypeB` and registers them with GemFire, under user id `1025` and `1026`. The two `Instantiators` avoid
|
||||
and `CustomTypeB` and registers them with Pivotal GemFire, under user id `1025` and `1026`. The two `Instantiators` avoid
|
||||
the use of reflection and create the instances directly through Java code.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[[bootstrap:snapshot]]
|
||||
= Configuring the Snapshot Service
|
||||
|
||||
_Spring Data GemFire_ supports `Cache` and `Region` snapshots using
|
||||
_Spring Data for Pivotal GemFire_ supports `Cache` and `Region` snapshots using
|
||||
http://geode.apache.org/docs/guide/11/managing/cache_snapshots/chapter_overview.html[Pivotal GemFire's Snapshot Service].
|
||||
The out-of-the-box Snapshot Service support offers several convenient features to simplify the use of GemFire's
|
||||
The out-of-the-box Snapshot Service support offers several convenient features to simplify the use of Pivotal GemFire'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]
|
||||
Snapshot Service APIs.
|
||||
@@ -11,11 +11,11 @@ Snapshot Service APIs.
|
||||
As the http://geode.apache.org/docs/guide/11/managing/cache_snapshots/chapter_overview.html[Pivotal GemFire 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 GemFire's_ Snapshot Service support
|
||||
data-related issues in a controlled context. You can imagine combining _Spring Data for Pivotal GemFire'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 GemFire's_ support for Pivotal GemFire's Snapshot Service begins with the `<gfe-data:snapshot-service>` element
|
||||
_Spring Data for Pivotal GemFire's_ support for Pivotal GemFire's Snapshot Service begins with the `<gfe-data:snapshot-service>` element
|
||||
from the `<gfe-data>` namespace.
|
||||
|
||||
For example, I might want to define Cache-wide snapshots to be loaded as well as saved using a couple snapshot imports
|
||||
@@ -32,10 +32,10 @@ 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 GemFire_ application,
|
||||
The file locations and directory paths can be absolute, or relative to the _Spring Data for Pivotal GemFire_ application,
|
||||
JVM process's working directory.
|
||||
|
||||
This is a pretty simple example and the Snapshot Service defined in this case refers to the GemFire `Cache` with
|
||||
This is a pretty simple example and the Snapshot Service defined in this case refers to the Pivotal GemFire `Cache` with
|
||||
the default name of `gemfireCache` (as described in <<bootstrap:cache>>). 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:
|
||||
|
||||
@@ -48,7 +48,7 @@ something other than the default, than you can use the `cache-ref` attribute to
|
||||
</gfe-data:snapshot-service>
|
||||
----
|
||||
|
||||
It is also straightforward to define a Snapshot Service for a particular GemFire Region by specifying
|
||||
It is also straightforward to define a Snapshot Service for a particular Pivotal GemFire Region by specifying
|
||||
the `region-ref` attribute:
|
||||
|
||||
[source,xml]
|
||||
@@ -61,17 +61,17 @@ the `region-ref` attribute:
|
||||
</gfe-data:snapshot-service>
|
||||
----
|
||||
|
||||
When the `region-ref` attribute is specified, _Spring Data GemFire's_ `SnapshotServiceFactoryBean` resolves
|
||||
When the `region-ref` attribute is specified, _Spring Data for Pivotal GemFire'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.
|
||||
|
||||
NOTE: GemFire is strict about imported snapshot files actually existing before they are referenced. For exports,
|
||||
GemFire will create the snapshot file if it does not already exist. If the snapshot file for export already exists,
|
||||
NOTE: Pivotal GemFire is strict about imported snapshot files actually existing before they are referenced. For exports,
|
||||
Pivotal GemFire will create the snapshot file if it does not already exist. If the snapshot file for export already exists,
|
||||
the data will be overwritten.
|
||||
|
||||
TIP: _Spring Data GemFire_ includes a `suppress-import-on-init` attribute on the `<gfe-data:snapshot-service>` element
|
||||
TIP: _Spring Data for Pivotal GemFire_ includes a `suppress-import-on-init` attribute on the `<gfe-data:snapshot-service>` 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.
|
||||
|
||||
@@ -86,13 +86,13 @@ http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/
|
||||
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 GemFire `Cache`.
|
||||
variant to get specific about which snapshot files are to be loaded into the Pivotal GemFire `Cache`.
|
||||
|
||||
However, _Spring Data GemFire_ recognizes that a typical developer workflow might be to extract and export data
|
||||
However, _Spring Data for Pivotal GemFire_ 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 GemFire_ enables the developer to specify a JAR or ZIP file on import for a `Cache`-based
|
||||
Therefore, _Spring Data for Pivotal GemFire_ enables the developer to specify a JAR or ZIP file on import for a `Cache`-based
|
||||
Snapshot Service as follows:
|
||||
|
||||
[source,xml]
|
||||
@@ -102,7 +102,7 @@ Snapshot Service as follows:
|
||||
</gfe-data:snapshot-service>
|
||||
----
|
||||
|
||||
_Spring Data GemFire_ will conveniently extract the provided ZIP file and treat it like a directory import (load).
|
||||
_Spring Data for Pivotal GemFire_ will conveniently extract the provided ZIP file and treat it like a directory import (load).
|
||||
|
||||
[[bootstrap:snapshot:filters]]
|
||||
== Snapshot Filters
|
||||
@@ -113,7 +113,7 @@ http://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/snapshot/
|
||||
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 GemFire_ makes it brain dead simple to utilize snapshot filters on import and export using the `filter-ref`
|
||||
_Spring Data for Pivotal GemFire_ makes it brain dead simple to utilize snapshot filters on import and export using the `filter-ref`
|
||||
attribute or an anonymous, nested bean definition:
|
||||
|
||||
[source,xml]
|
||||
@@ -140,8 +140,8 @@ attribute or an anonymous, nested bean definition:
|
||||
</gfe-data:snapshot-service>
|
||||
----
|
||||
|
||||
In addition, more complex snapshot filters can be expressed with the `ComposableSnapshotFilter` _Spring Data GemFire_
|
||||
provided class. This class implements GemFire's
|
||||
In addition, more complex snapshot filters can be expressed with the `ComposableSnapshotFilter` _Spring Data for Pivotal GemFire_
|
||||
provided class. This class implements Pivotal GemFire'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.
|
||||
|
||||
@@ -189,15 +189,15 @@ The developer could then go onto combine the `activesUsersSinceFilter` with anot
|
||||
[[bootstrap::snapshot::events]]
|
||||
== Snapshot Events
|
||||
|
||||
By default, _Spring Data GemFire_ uses Pivotal GemFire's Snapshot Services on startup to import data and shutdown
|
||||
By default, _Spring Data for Pivotal GemFire_ uses Pivotal GemFire'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.
|
||||
|
||||
For this purpose, _Spring Data GemFire_ defines two additional _Spring_ application events, extending _Spring's_
|
||||
For this purpose, _Spring Data for Pivotal GemFire_ 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 GemFire Cache, or individual GemFire Regions. The constructors
|
||||
The two application events can be targeted at the entire Pivotal GemFire Cache, or individual Pivotal GemFire Regions. The constructors
|
||||
in these classes accept an optional Region pathname (e.g. "/Example") as well as 0 or more `SnapshotMetadata` instances.
|
||||
|
||||
The array of `SnapshotMetadata` is used to override the snapshot meta-data defined by `<gfe-data:snapshot-import>`
|
||||
|
||||
@@ -907,7 +907,7 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an instance of the DynamicRegionSupport to support Dynamic Regions in this GemFire Cache.
|
||||
* Sets an instance of the DynamicRegionSupport to support Dynamic Regions in this Pivotal GemFire Cache.
|
||||
*
|
||||
* @param dynamicRegionSupport the DynamicRegionSupport class to setup Dynamic Regions in this Cache.
|
||||
*/
|
||||
@@ -923,10 +923,10 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls whether auto-reconnect functionality introduced in GemFire 8 is enabled or not.
|
||||
* Controls whether auto-reconnect functionality introduced in Pivotal GemFire 8 is enabled or not.
|
||||
*
|
||||
* @param enableAutoReconnect a boolean value to enable/disable auto-reconnect functionality.
|
||||
* @since GemFire 8.0
|
||||
* @since Pivotal GemFire 8.0
|
||||
*/
|
||||
public void setEnableAutoReconnect(Boolean enableAutoReconnect) {
|
||||
this.enableAutoReconnect = enableAutoReconnect;
|
||||
@@ -975,7 +975,7 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires GemFire 7.0 or higher
|
||||
* Requires Pivotal GemFire 7.0 or higher
|
||||
* @param gatewayConflictResolver defined as Object in the signature for backward
|
||||
* compatibility with Gemfire 6 compatibility. This must be an instance of
|
||||
* {@link org.apache.geode.cache.util.GatewayConflictResolver}
|
||||
@@ -1075,7 +1075,7 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
|
||||
/**
|
||||
* Controls whether pdx ignores fields that were unread during
|
||||
* deserialization. Applicable on GemFire 6.6 or higher.
|
||||
* deserialization. Applicable on Pivotal GemFire 6.6 or higher.
|
||||
*
|
||||
* @param pdxIgnoreUnreadFields the pdxIgnoreUnreadFields to set
|
||||
*/
|
||||
@@ -1091,7 +1091,7 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls whether type metadata for PDX objects is persisted to disk. Applicable on GemFire 6.6 or higher.
|
||||
* Controls whether type metadata for PDX objects is persisted to disk. Applicable on Pivotal GemFire 6.6 or higher.
|
||||
*
|
||||
* @param pdxPersistent a boolean value indicating that PDX type meta-data should be persisted to disk.
|
||||
*/
|
||||
@@ -1107,7 +1107,7 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the object preference to PdxInstance. Applicable on GemFire 6.6 or higher.
|
||||
* Sets the object preference to PdxInstance. Applicable on Pivotal GemFire 6.6 or higher.
|
||||
*
|
||||
* @param pdxReadSerialized a boolean value indicating the PDX instance should be returned from Region.get(key)
|
||||
* when available.
|
||||
@@ -1126,7 +1126,7 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
/**
|
||||
* Sets the {@link PdxSerializable} for this cache. Applicable on GemFire
|
||||
* 6.6 or higher. The argument is of type object for compatibility with
|
||||
* GemFire 6.5.
|
||||
* Pivotal GemFire 6.5.
|
||||
*
|
||||
* @param serializer pdx serializer configured for this cache.
|
||||
*/
|
||||
@@ -1186,7 +1186,7 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
* Sets the list of TransactionListeners used to configure the Cache to receive transaction events after
|
||||
* the transaction is processed (committed, rolled back).
|
||||
*
|
||||
* @param transactionListeners the list of GemFire TransactionListeners listening for transaction events.
|
||||
* @param transactionListeners the list of Pivotal GemFire TransactionListeners listening for transaction events.
|
||||
* @see org.apache.geode.cache.TransactionListener
|
||||
*/
|
||||
public void setTransactionListeners(List<TransactionListener> transactionListeners) {
|
||||
@@ -1204,7 +1204,7 @@ public class CacheFactoryBean extends AbstractFactoryBeanSupport<GemFireCache>
|
||||
* Sets the TransactionWriter used to configure the Cache for handling transaction events, such as to veto
|
||||
* the transaction or update an external DB before the commit.
|
||||
*
|
||||
* @param transactionWriter the GemFire TransactionWriter callback receiving transaction events.
|
||||
* @param transactionWriter the Pivotal GemFire TransactionWriter callback receiving transaction events.
|
||||
* @see org.apache.geode.cache.TransactionWriter
|
||||
*/
|
||||
public void setTransactionWriter(TransactionWriter transactionWriter) {
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.apache.geode.cache.DataPolicy;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
/**
|
||||
* The DataPolicyConverter class converts String values into GemFire DataPolicy enumerated values.
|
||||
* The DataPolicyConverter class converts String values into Pivotal GemFire DataPolicy enumerated values.
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
|
||||
@@ -43,11 +43,11 @@ public class GemfireAccessor implements InitializingBean {
|
||||
private Region region;
|
||||
|
||||
/**
|
||||
* Returns the template GemFire Cache Region.
|
||||
* Returns the template Pivotal GemFire Cache Region.
|
||||
*
|
||||
* @param <K> the Region key class type.
|
||||
* @param <V> the Region value class type.
|
||||
* @return the GemFire Cache Region.
|
||||
* @return the Pivotal GemFire Cache Region.
|
||||
* @see org.apache.geode.cache.Region
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -56,9 +56,9 @@ public class GemfireAccessor implements InitializingBean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the template GemFire Cache Region.
|
||||
* Sets the template Pivotal GemFire Cache Region.
|
||||
*
|
||||
* @param region the GemFire Cache Region used by this template.
|
||||
* @param region the Pivotal GemFire Cache Region used by this template.
|
||||
* @see org.apache.geode.cache.Region
|
||||
*/
|
||||
public void setRegion(Region<?, ?> region) {
|
||||
@@ -92,9 +92,9 @@ public class GemfireAccessor implements InitializingBean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the given GemFire exception to an appropriate exception from the
|
||||
* Converts the given Pivotal GemFire exception to an appropriate exception from the
|
||||
* <code>org.springframework.dao</code> hierarchy. Note that this particular implementation
|
||||
* is called only for GemFire querying exception that do <b>NOT</b> extend from GemFire exception.
|
||||
* is called only for Pivotal GemFire querying exception that do <b>NOT</b> extend from Pivotal GemFire exception.
|
||||
* May be overridden in subclasses.
|
||||
*
|
||||
* @param ex GemFireException that occurred
|
||||
|
||||
@@ -76,7 +76,7 @@ import org.springframework.dao.TypeMismatchDataAccessException;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* Helper class featuring methods for GemFire Cache or Region handling.
|
||||
* Helper class featuring methods for Pivotal GemFire Cache or Region handling.
|
||||
*
|
||||
* @author Costin Leau
|
||||
*/
|
||||
@@ -297,7 +297,7 @@ public abstract class GemfireCacheUtils {
|
||||
/**
|
||||
* Converts the given (unchecked) Gemfire exception to an appropriate one from the
|
||||
* <code>org.springframework.dao</code> hierarchy. This method exists to handle backwards compatibility
|
||||
* for exceptions that had their parents changed in GemFire 6.5.
|
||||
* for exceptions that had their parents changed in Pivotal GemFire 6.5.
|
||||
*
|
||||
* @param ex Gemfire unchecked exception
|
||||
* @return new the corresponding DataAccessException instance
|
||||
@@ -309,7 +309,7 @@ public abstract class GemfireCacheUtils {
|
||||
/**
|
||||
* Converts the given (unchecked) Gemfire exception to an appropriate one from the
|
||||
* <code>org.springframework.dao</code> hierarchy. This method exists to handle backwards compatibility
|
||||
* for exceptions that had their parents changed in GemFire 6.5.
|
||||
* for exceptions that had their parents changed in Pivotal GemFire 6.5.
|
||||
*
|
||||
* @param ex Gemfire unchecked exception
|
||||
* @return new the corresponding DataAccessException instance
|
||||
@@ -319,7 +319,7 @@ public abstract class GemfireCacheUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Package protected method for detecting CqInvalidException which has been removed in GemFire 6.5 GA.
|
||||
* Package protected method for detecting CqInvalidException which has been removed in Pivotal GemFire 6.5 GA.
|
||||
*/
|
||||
static boolean isCqInvalidException(RuntimeException ex) {
|
||||
return (CQ_EXCEPTION_CLASS != null && CQ_EXCEPTION_CLASS.isAssignableFrom(ex.getClass()));
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.apache.geode.GemFireException;
|
||||
import org.apache.geode.cache.Region;
|
||||
|
||||
/**
|
||||
* Callback interface for GemFire code. To be used with {@link GemfireTemplate}'s execution methods, often as anonymous
|
||||
* Callback interface for Pivotal GemFire code. To be used with {@link GemfireTemplate}'s execution methods, often as anonymous
|
||||
* classes within a method implementation. A typical implementation will call Region.get/put/query to perform some
|
||||
* operations on stored objects.
|
||||
*
|
||||
@@ -41,7 +41,7 @@ public interface GemfireCallback<T> {
|
||||
* A thrown custom RuntimeException is treated as an application exception: it gets propagated to
|
||||
* the caller of the template.
|
||||
*
|
||||
* @param region the GemFire Cache Region upon which the operation of this callback will be performed.
|
||||
* @param region the Pivotal GemFire Cache Region upon which the operation of this callback will be performed.
|
||||
* @return a result object, or <tt>null</tt> if no result.
|
||||
* @throws GemFireCheckedException for checked Exceptions occurring in GemFire.
|
||||
* @throws GemFireException for runtime Exceptions occurring in GemFire.
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface GemfireOperations {
|
||||
<K, V> boolean replace(K key, V oldValue, V newValue);
|
||||
|
||||
/**
|
||||
* Executes a GemFire query with the given (optional) parameters and returns the result. Note this method expects the query to return multiple results; for queries that return only one
|
||||
* Executes a Pivotal GemFire query with the given (optional) parameters and returns the result. Note this method expects the query to return multiple results; for queries that return only one
|
||||
* element use {@link #findUnique(String, Object...)}.
|
||||
*
|
||||
* As oppose, to the {@link #query(String)} method, this method allows for more generic queries (against multiple regions even) to be executed.
|
||||
@@ -75,7 +75,7 @@ public interface GemfireOperations {
|
||||
<E> SelectResults<E> find(String query, Object... params) throws InvalidDataAccessApiUsageException;
|
||||
|
||||
/**
|
||||
* Executes a GemFire query with the given (optional) parameters and returns the result. Note this method expects the query to return a single result; for queries that return multiple
|
||||
* Executes a Pivotal GemFire query with the given (optional) parameters and returns the result. Note this method expects the query to return a single result; for queries that return multiple
|
||||
* elements use {@link #find(String, Object...)}.
|
||||
*
|
||||
* As oppose, to the {@link #query(String)} method, this method allows for more generic queries (against multiple regions even) to be executed.
|
||||
@@ -113,7 +113,7 @@ public interface GemfireOperations {
|
||||
* @param <T> type parameter specifying the returned result type.
|
||||
* @param action callback object that specifies the Gemfire action to execute.
|
||||
* @return a result object returned by the action, or <code>null</code>.
|
||||
* @throws org.springframework.dao.DataAccessException in case of GemFire errors.
|
||||
* @throws org.springframework.dao.DataAccessException in case of Pivotal GemFire errors.
|
||||
*/
|
||||
<T> T execute(GemfireCallback<T> action) throws DataAccessException;
|
||||
|
||||
@@ -122,9 +122,9 @@ public interface GemfireOperations {
|
||||
*
|
||||
* @param <T> type parameter specifying the returned result type.
|
||||
* @param action callback object that specifies the Gemfire action to execute.
|
||||
* @param exposeNativeRegion whether to expose the native GemFire region to callback code.
|
||||
* @param exposeNativeRegion whether to expose the native Pivotal GemFire region to callback code.
|
||||
* @return a result object returned by the action, or <code>null</code>.
|
||||
* @throws org.springframework.dao.DataAccessException in case of GemFire errors.
|
||||
* @throws org.springframework.dao.DataAccessException in case of Pivotal GemFire errors.
|
||||
*/
|
||||
<T> T execute(GemfireCallback<T> action, boolean exposeNativeRegion) throws DataAccessException;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.apache.geode.GemFireException;
|
||||
import org.springframework.dao.UncategorizedDataAccessException;
|
||||
|
||||
/**
|
||||
* GemFire-specific subclass of UncategorizedDataAccessException, for GemFire system errors that do not match any concrete <code>org.springframework.dao</code> exceptions.
|
||||
* GemFire-specific subclass of UncategorizedDataAccessException, for Pivotal GemFire system errors that do not match any concrete <code>org.springframework.dao</code> exceptions.
|
||||
*
|
||||
* @author Costin Leau
|
||||
*/
|
||||
|
||||
@@ -42,14 +42,14 @@ import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Helper class that simplifies GemFire data access code and converts {@link GemFireCheckedException} and
|
||||
* Helper class that simplifies Pivotal GemFire data access code and converts {@link GemFireCheckedException} and
|
||||
* {@link GemFireException} into Spring {@link DataAccessException}, following the <tt>org.springframework.dao</tt>
|
||||
* exception hierarchy.
|
||||
*
|
||||
* The central method is <tt>execute</tt>, supporting GemFire access code implementing the GemfireCallback interface.
|
||||
* The central method is <tt>execute</tt>, supporting Pivotal GemFire access code implementing the GemfireCallback interface.
|
||||
* It provides dedicated handling such that neither the GemfireCallback implementation nor the calling code needs to
|
||||
* explicitly care about handling {@link Region} life-cycle exceptions.
|
||||
* Typically used to implement data access or business logic services that use GemFire within their implementation but
|
||||
* Typically used to implement data access or business logic services that use Pivotal GemFire within their implementation but
|
||||
* are GemFire-agnostic in their interface. The latter or code calling the latter only have to deal with business
|
||||
* objects, query objects, and <tt>org.springframework.dao</tt> exceptions.
|
||||
*
|
||||
@@ -89,7 +89,7 @@ public class GemfireTemplate extends GemfireAccessor implements GemfireOperation
|
||||
* <p>As there is often a need to cast to a interface, the exposed proxy implements all interfaces
|
||||
* implemented by the original {@link Region}. If this is not sufficient, turn this flag to "true".
|
||||
*
|
||||
* @param exposeNativeRegion a boolean value to indicate whether the native GemFire Cache Region should be exposed
|
||||
* @param exposeNativeRegion a boolean value to indicate whether the native Pivotal GemFire Cache Region should be exposed
|
||||
* to the GemfireCallback.
|
||||
* @see org.springframework.data.gemfire.GemfireCallback
|
||||
*/
|
||||
@@ -98,9 +98,9 @@ public class GemfireTemplate extends GemfireAccessor implements GemfireOperation
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether to expose the native GemFire Cache Region or a Region proxy to the GemfireCallback code.
|
||||
* Returns whether to expose the native Pivotal GemFire Cache Region or a Region proxy to the GemfireCallback code.
|
||||
*
|
||||
* @return a boolean value indicating whether the native GemFire Cache Region or Region proxy is exposed
|
||||
* @return a boolean value indicating whether the native Pivotal GemFire Cache Region or Region proxy is exposed
|
||||
* to the GemfireCallback code.
|
||||
*/
|
||||
public boolean isExposeNativeRegion() {
|
||||
@@ -473,12 +473,12 @@ public class GemfireTemplate extends GemfireAccessor implements GemfireOperation
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a close-suppressing proxy for the given GemFire Cache {@link Region}.
|
||||
* Create a close-suppressing proxy for the given Pivotal GemFire Cache {@link Region}.
|
||||
* Called by the <code>execute</code> method.
|
||||
*
|
||||
* @param <K> the Region key class type.
|
||||
* @param <V> the Region value class type.
|
||||
* @param region the GemFire Cache Region to create a proxy for.
|
||||
* @param region the Pivotal GemFire Cache Region to create a proxy for.
|
||||
* @return the Region proxy implementing all interfaces implemented by the passed-in Region object.
|
||||
* @see org.apache.geode.cache.Region#close()
|
||||
* @see #execute(GemfireCallback, boolean)
|
||||
@@ -493,7 +493,7 @@ public class GemfireTemplate extends GemfireAccessor implements GemfireOperation
|
||||
}
|
||||
|
||||
/**
|
||||
* InvocationHandler that suppresses close calls on GemFire Cache Regions.
|
||||
* InvocationHandler that suppresses close calls on Pivotal GemFire Cache Regions.
|
||||
*
|
||||
* @see org.apache.geode.cache.Region#close()
|
||||
* @see java.lang.reflect.InvocationHandler
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* {@link GemfireUtils} is an abstract utility class encapsulating common functionality to access features
|
||||
* and capabilities of GemFire based on version and other configuration meta-data.
|
||||
* and capabilities of Pivotal GemFire based on version and other configuration meta-data.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.CacheFactory
|
||||
@@ -42,7 +42,6 @@ public abstract class GemfireUtils extends RegionUtils {
|
||||
public final static String GEMFIRE_VERSION = apacheGeodeVersion();
|
||||
public final static String UNKNOWN = "unknown";
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public static String apacheGeodeProductName() {
|
||||
|
||||
try {
|
||||
@@ -53,7 +52,6 @@ public abstract class GemfireUtils extends RegionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public static String apacheGeodeVersion() {
|
||||
|
||||
try {
|
||||
@@ -64,13 +62,11 @@ public abstract class GemfireUtils extends RegionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public static boolean isGemfireVersionGreaterThanEqualTo(double expectedVersion) {
|
||||
double actualVersion = Double.parseDouble(GEMFIRE_VERSION.substring(0, 3));
|
||||
return actualVersion >= expectedVersion;
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public static boolean isGemfireVersion65OrAbove() {
|
||||
// expected 'major.minor'
|
||||
try {
|
||||
@@ -83,7 +79,6 @@ public abstract class GemfireUtils extends RegionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public static boolean isGemfireVersion7OrAbove() {
|
||||
try {
|
||||
return isGemfireVersionGreaterThanEqualTo(7.0);
|
||||
@@ -95,7 +90,6 @@ public abstract class GemfireUtils extends RegionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public static boolean isGemfireVersion8OrAbove() {
|
||||
|
||||
try {
|
||||
|
||||
@@ -18,14 +18,14 @@ package org.springframework.data.gemfire;
|
||||
|
||||
/**
|
||||
* The GenericRegionFactoryBean class is an extension of the abstract, base RegionFactoryBean class enabling developers
|
||||
* to define a GemFire Cache Region with defaults.
|
||||
* to define a Pivotal GemFire Cache Region with defaults.
|
||||
*
|
||||
* The defaults for DataPolicy is NORMAL and Scope is DISTRIBUTED_NO_ACK, effectively creating a "non-replicate",
|
||||
* Distributed Region.
|
||||
*
|
||||
* This class enables developers to create various non-strongly-typed Regions (e.g. PARTITION, REPLICATE) based on
|
||||
* various combinations of the DataPolicy, Scope and Subscription settings as defined in the Region Types section
|
||||
* of the GemFire User Guide (see link below). How GemFire Regions receive and distribute entry updates
|
||||
* of the Pivotal GemFire User Guide (see link below). How Pivotal GemFire Regions receive and distribute entry updates
|
||||
* is defined in the Storage and Distribution Options section.
|
||||
*
|
||||
* Note, it is generally better to define strong-typed Regions (e.g. PARTITION with PartitionedRegionFactoryBean)
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.apache.geode.cache.AttributesFactory;
|
||||
import org.apache.geode.cache.RegionFactory;
|
||||
|
||||
/**
|
||||
* The IndexMaintenanceType enum is a enumerated type of GemFire Index maintenance update options.
|
||||
* The IndexMaintenanceType enum is a enumerated type of Pivotal GemFire Index maintenance update options.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.AttributesFactory#setIndexMaintenanceSynchronous(boolean)
|
||||
@@ -56,7 +56,7 @@ public enum IndexMaintenancePolicyType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the GemFire AttributesFactory's 'indexMaintenanceSynchronous' property appropriately based on
|
||||
* Sets the Pivotal GemFire AttributesFactory's 'indexMaintenanceSynchronous' property appropriately based on
|
||||
* this IndexMaintenancePolicyType.
|
||||
*
|
||||
* @param attributesFactory the AttributesFactory instance on which to set the indexMaintenanceProperty.
|
||||
@@ -69,7 +69,7 @@ public enum IndexMaintenancePolicyType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the GemFire RegionFactory's 'indexMaintenanceSynchronous' property appropriately based on
|
||||
* Sets the Pivotal GemFire RegionFactory's 'indexMaintenanceSynchronous' property appropriately based on
|
||||
* this IndexMaintenancePolicyType.
|
||||
*
|
||||
* @param regionFactory the RegionFactory instance on which to set the indexMaintenanceProperty.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.data.gemfire;
|
||||
|
||||
/**
|
||||
* The IndexType class is an enumerated type of GemFire Index Types.
|
||||
* The IndexType class is an enumerated type of Pivotal GemFire Index Types.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.query.IndexType
|
||||
@@ -34,9 +34,9 @@ public enum IndexType {
|
||||
private final org.apache.geode.cache.query.IndexType gemfireIndexType;
|
||||
|
||||
/**
|
||||
* Constructs an instance of the IndexType enum initialized with the given GemFire IndexType.
|
||||
* Constructs an instance of the IndexType enum initialized with the given Pivotal GemFire IndexType.
|
||||
*
|
||||
* @param gemfireIndexType the corresponding GemFire IndexType
|
||||
* @param gemfireIndexType the corresponding Pivotal GemFire IndexType
|
||||
* @see org.apache.geode.cache.query.IndexType
|
||||
*/
|
||||
IndexType(final org.apache.geode.cache.query.IndexType gemfireIndexType) {
|
||||
@@ -77,11 +77,11 @@ public enum IndexType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an IndexType given the corresponding GemFire IndexType or null if no SDG IndexType
|
||||
* corresponds to the GemFire IndexType.
|
||||
* Returns an IndexType given the corresponding Pivotal GemFire IndexType or null if no SDG IndexType
|
||||
* corresponds to the Pivotal GemFire IndexType.
|
||||
*
|
||||
* @param gemfireIndexType the GemFire IndexType.
|
||||
* @return a IndexType matching the GemFire IndexType or null if the GemFire IndexType does not match
|
||||
* @param gemfireIndexType the Pivotal GemFire IndexType.
|
||||
* @return a IndexType matching the Pivotal GemFire IndexType or null if the Pivotal GemFire IndexType does not match
|
||||
* any IndexType in this enumeration.
|
||||
* @see org.apache.geode.cache.query.IndexType
|
||||
*/
|
||||
@@ -115,9 +115,9 @@ public enum IndexType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the matching GemFire IndexType for this IndexType enumerated value.
|
||||
* Gets the matching Pivotal GemFire IndexType for this IndexType enumerated value.
|
||||
*
|
||||
* @return the matching GemFire IndexType.
|
||||
* @return the matching Pivotal GemFire IndexType.
|
||||
* @see org.apache.geode.cache.query.IndexType
|
||||
*/
|
||||
public org.apache.geode.cache.query.IndexType getGemfireIndexType() {
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterS
|
||||
|
||||
/**
|
||||
* The InterestPolicyConverter class is a Spring Converter implementation and Java PropertyEditor handling
|
||||
* the conversion between Strings and GemFire InterestPolicy values.
|
||||
* the conversion between Strings and Pivotal GemFire InterestPolicy values.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.support.AbstractPropertyEditorConverterSupport
|
||||
@@ -32,11 +32,11 @@ import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterS
|
||||
public class InterestPolicyConverter extends AbstractPropertyEditorConverterSupport<InterestPolicy> {
|
||||
|
||||
/**
|
||||
* Converts the given String into a GemFire InterestPolicy value.
|
||||
* Converts the given String into a Pivotal GemFire InterestPolicy value.
|
||||
*
|
||||
* @param source the String value to convert into a GemFire InterestPolicy value.
|
||||
* @return a GemFire InterestPolicy value for the given String description of the GemFire InterestPolicy
|
||||
* @throws java.lang.IllegalArgumentException if the String is not a valid GemFire InterestPolicy.
|
||||
* @param source the String value to convert into a Pivotal GemFire InterestPolicy value.
|
||||
* @return a Pivotal GemFire InterestPolicy value for the given String description of the Pivotal GemFire InterestPolicy
|
||||
* @throws java.lang.IllegalArgumentException if the String is not a valid Pivotal GemFire InterestPolicy.
|
||||
* @see org.springframework.data.gemfire.InterestPolicyType#getInterestPolicy(InterestPolicyType)
|
||||
* @see org.springframework.data.gemfire.InterestPolicyType#valueOfIgnoreCase(String)
|
||||
* @see #assertConverted(String, Object, Class)
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.data.gemfire;
|
||||
import org.apache.geode.cache.InterestPolicy;
|
||||
|
||||
/**
|
||||
* The InterestPolicyType enum is an enumeration of all the GemFire Subscription, InterestPolicy values.
|
||||
* The InterestPolicyType enum is an enumeration of all the Pivotal GemFire Subscription, InterestPolicy values.
|
||||
*
|
||||
* @author Lyndon Adams
|
||||
* @author John Blum
|
||||
@@ -27,6 +27,7 @@ import org.apache.geode.cache.InterestPolicy;
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public enum InterestPolicyType {
|
||||
|
||||
ALL(InterestPolicy.ALL),
|
||||
CACHE_CONTENT(InterestPolicy.CACHE_CONTENT);
|
||||
|
||||
@@ -35,9 +36,9 @@ public enum InterestPolicyType {
|
||||
private final InterestPolicy interestPolicy;
|
||||
|
||||
/**
|
||||
* Constructs an instance of the SubscriptionType enum initialized with the matching GemFire InterestPolicy.
|
||||
* Constructs an instance of the SubscriptionType enum initialized with the matching Pivotal GemFire InterestPolicy.
|
||||
*
|
||||
* @param interestPolicy a GemFire InterestPolicy corresponding to this SubscriptionType.
|
||||
* @param interestPolicy a Pivotal GemFire InterestPolicy corresponding to this SubscriptionType.
|
||||
* @see org.apache.geode.cache.InterestPolicy
|
||||
*/
|
||||
InterestPolicyType(final InterestPolicy interestPolicy) {
|
||||
@@ -45,11 +46,13 @@ public enum InterestPolicyType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Null-safe operation to extract the GemFire InterestPolicy from the InterPolicyType enumerated value.
|
||||
* Null-safe operation to extract the Pivotal GemFire {@link InterestPolicy}
|
||||
* from the {@link InterestPolicyType} enumerated value.
|
||||
*
|
||||
* @param interestPolicyType the InterestPolicyType enum from which to extract GemFire's InterestPolicy
|
||||
* @return a GemFire InterestPolicy for the given InterestPolicyType enumerated value
|
||||
* or null if InterestPolicyType is null.
|
||||
* @param interestPolicyType the {@link InterestPolicyType} enum from which to extract
|
||||
* Pivotal GemFire's {@link InterestPolicy}.
|
||||
* @return a Pivotal GemFire {@link InterestPolicy} for the given {@link InterestPolicyType} enumerated value
|
||||
* or {@literal null} if {@link InterestPolicyType} is {@literal null}.
|
||||
* @see org.apache.geode.cache.InterestPolicy
|
||||
*/
|
||||
public static InterestPolicy getInterestPolicy(final InterestPolicyType interestPolicyType) {
|
||||
@@ -57,10 +60,10 @@ public enum InterestPolicyType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a SubscriptionType enumerated value for the given GemFire InterestPolicy.
|
||||
* Returns a SubscriptionType enumerated value for the given Pivotal GemFire InterestPolicy.
|
||||
*
|
||||
* @param interestPolicy the GemFire InterestPolicy used to lookup and match a SubscriptionType.
|
||||
* @return a SubscriptionType enumerated value matching the given GemFire InterestPolicy
|
||||
* @param interestPolicy the Pivotal GemFire InterestPolicy used to lookup and match a SubscriptionType.
|
||||
* @return a SubscriptionType enumerated value matching the given Pivotal GemFire InterestPolicy
|
||||
* or null if no matching value was found.
|
||||
* @see org.apache.geode.cache.InterestPolicy
|
||||
* @see #getInterestPolicy()
|
||||
@@ -95,13 +98,12 @@ public enum InterestPolicyType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the GemFire InterestPolicy corresponding to this SubscriptionType enumerated value.
|
||||
* Returns the Pivotal GemFire InterestPolicy corresponding to this SubscriptionType enumerated value.
|
||||
*
|
||||
* @return the GemFire InterestPolicy corresponding to this SubscriptionType.
|
||||
* @return the Pivotal GemFire InterestPolicy corresponding to this SubscriptionType.
|
||||
* @see org.apache.geode.cache.InterestPolicy
|
||||
*/
|
||||
public InterestPolicy getInterestPolicy() {
|
||||
return interestPolicy;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,10 +36,10 @@ public enum JndiDataSourceType {
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* Constructs an instance of the JndiDataSourceType enum initialized with the specified name used by GemFire to
|
||||
* Constructs an instance of the JndiDataSourceType enum initialized with the specified name used by Pivotal GemFire to
|
||||
* specify supported JNDI DataSource implementations.
|
||||
*
|
||||
* @param name the GemFire named JNDI DataSource implementation.
|
||||
* @param name the Pivotal GemFire named JNDI DataSource implementation.
|
||||
*/
|
||||
JndiDataSourceType(final String name) {
|
||||
Assert.hasText(name, "The JNDI DataSource Type 'name' must be specified!");
|
||||
@@ -47,11 +47,11 @@ public enum JndiDataSourceType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a JndiDataSourceType enumerated value based on the GemFire preferred name for the supported JNDI,
|
||||
* Returns a JndiDataSourceType enumerated value based on the Pivotal GemFire preferred name for the supported JNDI,
|
||||
* DataSource implementation, ignoring case and all extra leading/trailing whitespace.
|
||||
*
|
||||
* @param name the GemFire named JNDI DataSource implementation.
|
||||
* @return the JndiDataSourceType enumerated value matching the given GemFire name used for the supported JNDI,
|
||||
* @param name the Pivotal GemFire named JNDI DataSource implementation.
|
||||
* @return the JndiDataSourceType enumerated value matching the given Pivotal GemFire name used for the supported JNDI,
|
||||
* DataSource implementation, or null if not match was found.
|
||||
* @see #values()
|
||||
* @see #isMatch(JndiDataSourceType, String)
|
||||
@@ -67,11 +67,11 @@ public enum JndiDataSourceType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the specified JndiDataSourceType enum and the given, supported GemFire 'named',
|
||||
* Determines whether the specified JndiDataSourceType enum and the given, supported Pivotal GemFire 'named',
|
||||
* JNDI DataSource implementation are a match.
|
||||
*
|
||||
* @param jndiDataSourceType the given JndiDataSourceType enum used in the match.
|
||||
* @param name the specified GemFire "named" JNDI DataSource implementation.
|
||||
* @param name the specified Pivotal GemFire "named" JNDI DataSource implementation.
|
||||
* @return a boolean value indicating whether the given JndiDataSourceType enumerated value matched the given name.
|
||||
* @see java.lang.String#equalsIgnoreCase(String)
|
||||
* @see org.springframework.util.StringUtils#trimWhitespace(String)
|
||||
@@ -83,16 +83,16 @@ public enum JndiDataSourceType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the GemFire name of the support JNDI DataSource implementation type.
|
||||
* Gets the Pivotal GemFire name of the support JNDI DataSource implementation type.
|
||||
*
|
||||
* @return the GemFire named JNDI DataSource implementation.
|
||||
* @return the Pivotal GemFire named JNDI DataSource implementation.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a String describing this JNDI DataSource implementation based on the GemFire supported names.
|
||||
* Returns a String describing this JNDI DataSource implementation based on the Pivotal GemFire supported names.
|
||||
*
|
||||
* @return a String description for this JNDI DataSource (implementation) type.
|
||||
*/
|
||||
|
||||
@@ -67,13 +67,13 @@ public class LocalRegionFactoryBean<K, V> extends RegionFactoryBean<K, V> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the Data Policy used by this "local" GemFire Region (i.e. locally Scoped; Scope.LOCAL) based on the
|
||||
* Resolves the Data Policy used by this "local" Pivotal GemFire Region (i.e. locally Scoped; Scope.LOCAL) based on the
|
||||
* enumerated value from org.apache.geode.cache.RegionShortcuts (LOCAL, LOCAL_PERSISTENT, LOCAL_HEAP_LRU,
|
||||
* LOCAL_OVERFLOW, and LOCAL_PERSISTENT_OVERFLOW), but without consideration of the Eviction settings.
|
||||
*
|
||||
* @param regionFactory the GemFire RegionFactory used to created the Local Region.
|
||||
* @param regionFactory the Pivotal GemFire RegionFactory used to created the Local Region.
|
||||
* @param persistent a boolean value indicating whether the Local Region should persist it's data.
|
||||
* @param dataPolicy requested Data Policy as set by the user in the Spring GemFire configuration meta-data.
|
||||
* @param dataPolicy requested Data Policy as set by the user in the Spring Pivotal GemFire configuration meta-data.
|
||||
* @see org.apache.geode.cache.DataPolicy
|
||||
* @see org.apache.geode.cache.RegionFactory
|
||||
* @see org.apache.geode.cache.RegionShortcut
|
||||
|
||||
@@ -31,17 +31,17 @@ public class PartitionedRegionFactoryBean<K, V> extends RegionFactoryBean<K, V>
|
||||
|
||||
// First, verify the GemFire version is 6.5 or Higher when Persistence is specified...
|
||||
Assert.isTrue(!DataPolicy.PERSISTENT_PARTITION.equals(dataPolicy) || GemfireUtils.isGemfireVersion65OrAbove(),
|
||||
String.format("Persistent PARTITION Regions can only be used from GemFire 6.5 onwards; current version is [%s].",
|
||||
String.format("Persistent PARTITION Regions can only be used from Pivotal GemFire 6.5 onwards; current version is [%s]",
|
||||
CacheFactory.getVersion()));
|
||||
|
||||
if (dataPolicy == null) {
|
||||
dataPolicy = (isPersistent() ? DataPolicy.PERSISTENT_PARTITION : DataPolicy.PARTITION);
|
||||
}
|
||||
else {
|
||||
// Validate that the user-defined Data Policy matches the appropriate Spring GemFire XML namespace
|
||||
// Validate that the user-defined Data Policy matches the appropriate Spring Pivotal GemFire XML namespace
|
||||
// configuration meta-data element for Region (i.e. <gfe:partitioned-region .../>)!
|
||||
Assert.isTrue(dataPolicy.withPartitioning(), String.format(
|
||||
"Data Policy '%1$s' is not supported in Partitioned Regions.", dataPolicy));
|
||||
"Data Policy [%s] is not supported in Partitioned Regions", dataPolicy));
|
||||
}
|
||||
|
||||
// Validate the data-policy and persistent attributes are compatible when specified!
|
||||
|
||||
@@ -401,7 +401,7 @@ public abstract class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K,
|
||||
*
|
||||
* @param <K> the Class type fo the Region key.
|
||||
* @param <V> the Class type of the Region value.
|
||||
* @param regionFactory the GemFire RegionFactory used to configure and create the Region that is the product
|
||||
* @param regionFactory the Pivotal GemFire RegionFactory used to configure and create the Region that is the product
|
||||
* of this RegionFactoryBean.
|
||||
* @param regionAttributes the RegionAttributes containing the Region configuration settings to merge to the
|
||||
* RegionFactory.
|
||||
@@ -512,7 +512,7 @@ public abstract class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K,
|
||||
*
|
||||
* This method is not part of the RegionFactoryBean API and is strictly used for testing purposes!
|
||||
*
|
||||
* NOTE unfortunately, must resort to using a GemFire internal class, ugh!
|
||||
* NOTE unfortunately, must resort to using a Pivotal GemFire internal class, ugh!
|
||||
*
|
||||
* @see org.apache.geode.internal.cache.UserSpecifiedRegionAttributes#hasEvictionAttributes
|
||||
*/
|
||||
@@ -573,6 +573,7 @@ public abstract class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K,
|
||||
}
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
* Validates that the settings for Data Policy and the 'persistent' attribute in <gfe:*-region> elements
|
||||
* are compatible.
|
||||
*
|
||||
@@ -600,6 +601,10 @@ public abstract class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K,
|
||||
>>>>>>> c22ebe6... DATAGEODE-12 - Introduce Spring Configurers to flexibly alter Spring Data GemFire configuration when using Annotation config.
|
||||
* Validates and sets the Data Policy on the RegionFactory used to create and configure the Region from this
|
||||
* FactoryBean.
|
||||
=======
|
||||
* Validates and sets the {@link DataPolicy} on the {@link RegionFactory} used to create and configure
|
||||
* the {@link Region} from this {@link FactoryBean}.
|
||||
>>>>>>> 12126a1... SGF-732 - Change branding from Spring Data GemFire to Spring Data for Pivotal GemFire.
|
||||
*
|
||||
* @param regionFactory the RegionFactory used by this FactoryBean to create and configure the Region.
|
||||
* @param persistent a boolean value indicating whether the Region should be persistent and persist it's
|
||||
@@ -625,9 +630,9 @@ public abstract class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K,
|
||||
* Validates the configured Data Policy and may override it, taking into account the 'persistent' attribute
|
||||
* and constraints for the Region type.
|
||||
*
|
||||
* @param regionFactory the GemFire RegionFactory used to create the desired Region.
|
||||
* @param regionFactory the Pivotal GemFire RegionFactory used to create the desired Region.
|
||||
* @param persistent a boolean value indicating whether the Region should persist it's data to disk.
|
||||
* @param dataPolicy requested Data Policy as set by the user in the Spring GemFire configuration meta-data.
|
||||
* @param dataPolicy requested Data Policy as set by the user in the Spring Pivotal GemFire configuration meta-data.
|
||||
* @see org.apache.geode.cache.DataPolicy
|
||||
* @see org.apache.geode.cache.RegionFactory
|
||||
*/
|
||||
@@ -785,7 +790,7 @@ public abstract class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K,
|
||||
/**
|
||||
* Sets the DataPolicy of the Region.
|
||||
*
|
||||
* @param dataPolicy the GemFire DataPolicy to use when configuring the Region.
|
||||
* @param dataPolicy the Pivotal GemFire DataPolicy to use when configuring the Region.
|
||||
* @since 1.4.0
|
||||
*/
|
||||
public void setDataPolicy(DataPolicy dataPolicy) {
|
||||
|
||||
@@ -208,17 +208,14 @@ public abstract class RegionLookupFactoryBean<K, V> extends AbstractFactoryBeanS
|
||||
this.cache = cache;
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
boolean isLookupEnabled() {
|
||||
return Boolean.TRUE.equals(getLookupEnabled());
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public void setLookupEnabled(Boolean lookupEnabled) {
|
||||
this.lookupEnabled = lookupEnabled;
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public Boolean getLookupEnabled() {
|
||||
return this.lookupEnabled;
|
||||
}
|
||||
@@ -236,7 +233,7 @@ public abstract class RegionLookupFactoryBean<K, V> extends AbstractFactoryBeanS
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a reference to the parent {@link Region} to indicated this {@link FactoryBean} represents a GemFire cache
|
||||
* Sets a reference to the parent {@link Region} to indicated this {@link FactoryBean} represents a Pivotal GemFire cache
|
||||
* {@link Region Sub-Region}.
|
||||
*
|
||||
* @param parent reference to the parent {@link Region}.
|
||||
@@ -247,7 +244,7 @@ public abstract class RegionLookupFactoryBean<K, V> extends AbstractFactoryBeanS
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to the parent {@link Region} indicating this {@link FactoryBean} represents a GemFire cache
|
||||
* Returns a reference to the parent {@link Region} indicating this {@link FactoryBean} represents a Pivotal GemFire cache
|
||||
* {@link Region Sub-Region}.
|
||||
*
|
||||
* @return a reference to the parent {@link Region} or {@literal null} if this {@link Region}
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
/**
|
||||
* The RegionShortcutConverter class is a Spring Converter implementation converting String value Region Shortcut
|
||||
* representations into actual GemFire RegionShortcut enumerated values.
|
||||
* representations into actual Pivotal GemFire RegionShortcut enumerated values.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.core.convert.converter.Converter
|
||||
|
||||
@@ -21,10 +21,11 @@ import org.apache.geode.cache.RegionShortcut;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* The {@link RegionShortcutWrapper} enum is a Java enumerated type that wraps GemFire's {@link RegionShortcut RegionShortcuts}
|
||||
* with Spring Data GemFire {@link RegionShortcutWrapper} enumerated values.
|
||||
* The {@link RegionShortcutWrapper} enum is a Java enumerated type that wraps Pivotal GemFire's
|
||||
* {@link RegionShortcut RegionShortcuts} with SDG {@link RegionShortcutWrapper} enumerated values.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.DataPolicy
|
||||
* @see org.apache.geode.cache.RegionShortcut
|
||||
* @since 1.4.0
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ReplicatedRegionFactoryBean<K, V> extends RegionFactoryBean<K, V> {
|
||||
dataPolicy = DataPolicy.EMPTY;
|
||||
}
|
||||
else {
|
||||
// Validate that the user-defined Data Policy matches the appropriate Spring GemFire XML namespace
|
||||
// Validate that the user-defined Data Policy matches the appropriate Spring Pivotal GemFire XML namespace
|
||||
// configuration meta-data element for the Region (i.e. <gfe:replicated-region .../>)!
|
||||
Assert.isTrue(dataPolicy.withReplication(), String.format(
|
||||
"Data Policy '%1$s' is not supported in Replicated Regions.", dataPolicy));
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterS
|
||||
|
||||
/**
|
||||
* The ScopeConverter class is a Spring Converter and JavaBeans PropertyEditor that converts Strings
|
||||
* into GemFire Scope constant values.
|
||||
* into Pivotal GemFire Scope constant values.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.support.AbstractPropertyEditorConverterSupport
|
||||
@@ -32,11 +32,11 @@ import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterS
|
||||
public class ScopeConverter extends AbstractPropertyEditorConverterSupport<Scope> {
|
||||
|
||||
/**
|
||||
* Converts the given String source into an instance of GemFire Scope.
|
||||
* Converts the given String source into an instance of Pivotal GemFire Scope.
|
||||
*
|
||||
* @param source the String to convert into a GemFire Scope.
|
||||
* @return a GemFire Scope for the given String.
|
||||
* @throws java.lang.IllegalArgumentException if the String is not a valid GemFire Scope.
|
||||
* @param source the String to convert into a Pivotal GemFire Scope.
|
||||
* @return a Pivotal GemFire Scope for the given String.
|
||||
* @throws java.lang.IllegalArgumentException if the String is not a valid Pivotal GemFire Scope.
|
||||
* @see org.springframework.data.gemfire.ScopeType#getScope(ScopeType)
|
||||
* @see org.springframework.data.gemfire.ScopeType#valueOfIgnoreCase(String)
|
||||
* @see org.apache.geode.cache.Scope#fromString(String)
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.apache.geode.cache.Scope;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* The ScopeType enum is an enumeration of GemFire Scopes.
|
||||
* The ScopeType enum is an enumeration of Pivotal GemFire Scopes.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.Scope
|
||||
@@ -36,9 +36,9 @@ public enum ScopeType {
|
||||
private final Scope gemfireScope;
|
||||
|
||||
/**
|
||||
* Constructs an instance of the ScopeType initialized with a matching GemFire Scope.
|
||||
* Constructs an instance of the ScopeType initialized with a matching Pivotal GemFire Scope.
|
||||
*
|
||||
* @param gemfireScope the GemFire Scope paired with this enumerated value.
|
||||
* @param gemfireScope the Pivotal GemFire Scope paired with this enumerated value.
|
||||
* @see org.apache.geode.cache.Scope
|
||||
*/
|
||||
ScopeType(final Scope gemfireScope) {
|
||||
@@ -46,11 +46,11 @@ public enum ScopeType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Null-safe operation to extract the GemFire Scope from the given ScopeType enum value, or null if the provided
|
||||
* Null-safe operation to extract the Pivotal GemFire Scope from the given ScopeType enum value, or null if the provided
|
||||
* scopeType is null.
|
||||
*
|
||||
* @param scopeType the ScopeType enumerated value from which to extract the GemFire Scope.
|
||||
* @return the paired GemFire Scope from the given ScopeType or null if scopeType is null.
|
||||
* @param scopeType the ScopeType enumerated value from which to extract the Pivotal GemFire Scope.
|
||||
* @return the paired Pivotal GemFire Scope from the given ScopeType or null if scopeType is null.
|
||||
* @see org.apache.geode.cache.Scope
|
||||
* @see #getScope()
|
||||
*/
|
||||
@@ -59,10 +59,10 @@ public enum ScopeType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a ScopeType enumerated value for the given a GemFire Scope.
|
||||
* Returns a ScopeType enumerated value for the given a Pivotal GemFire Scope.
|
||||
*
|
||||
* @param scope the GemFire Scope used to lookup and match the appropriate ScopeType.
|
||||
* @return a ScopeType for the given GemFire Scope or null if no match was found.
|
||||
* @param scope the Pivotal GemFire Scope used to lookup and match the appropriate ScopeType.
|
||||
* @return a ScopeType for the given Pivotal GemFire Scope or null if no match was found.
|
||||
* @see org.apache.geode.cache.Scope
|
||||
* @see #getScope()
|
||||
* @see #values()
|
||||
@@ -78,10 +78,10 @@ public enum ScopeType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a ScopeType enumerated value given the case-insensitive name of the GemFire Scope.
|
||||
* Returns a ScopeType enumerated value given the case-insensitive name of the Pivotal GemFire Scope.
|
||||
*
|
||||
* @param name a String name describing the ScopeType enum value.
|
||||
* @return a ScopeType for the given case-insensitive, named GemFire Scope.
|
||||
* @return a ScopeType for the given case-insensitive, named Pivotal GemFire Scope.
|
||||
* @see java.lang.String#equalsIgnoreCase(String)
|
||||
* @see #values()
|
||||
* @see #name()
|
||||
@@ -112,9 +112,9 @@ public enum ScopeType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the matching GemFire Scope for this enumerated value.
|
||||
* Gets the matching Pivotal GemFire Scope for this enumerated value.
|
||||
*
|
||||
* @return a GemFire Scope for this enumerated value.
|
||||
* @return a Pivotal GemFire Scope for this enumerated value.
|
||||
* @see org.apache.geode.cache.Scope
|
||||
*/
|
||||
public Scope getScope() {
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
/**
|
||||
* The SubscriptionAttributesFactoryBean class is a Spring FactoryBean used for defining and constructing
|
||||
* a GemFire SubscriptionAttributes object, which determines the Subscription policy used by Regions to
|
||||
* a Pivotal GemFire SubscriptionAttributes object, which determines the Subscription policy used by Regions to
|
||||
* declared their data interests.
|
||||
*
|
||||
* @author Lyndon Adams
|
||||
@@ -76,10 +76,10 @@ public class SubscriptionAttributesFactoryBean implements FactoryBean<Subscripti
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets GemFire's InterestPolicy specified on the SubscriptionAttributes in order to define/declare
|
||||
* the data interests and distribution of changes.
|
||||
* Sets Pivotal GemFire's {@link InterestPolicy} specified on the {@link SubscriptionAttributes} in order to
|
||||
* define/declare the data interests and distribution of changes.
|
||||
*
|
||||
* @param interestPolicy the GemFire InterestsPolicy to set for Subscription.
|
||||
* @param interestPolicy the Pivotal GemFire {@link InterestPolicy} to set for Subscription.
|
||||
* @see org.apache.geode.cache.InterestPolicy
|
||||
* @see org.apache.geode.cache.SubscriptionAttributes#SubscriptionAttributes(org.apache.geode.cache.InterestPolicy)
|
||||
*/
|
||||
@@ -88,10 +88,10 @@ public class SubscriptionAttributesFactoryBean implements FactoryBean<Subscripti
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets GemFire's InterestPolicy specified on the SubscriptionAttributes which defines data interests
|
||||
* and distribution of changes.
|
||||
* Gets Pivotal GemFire's {@link InterestPolicy} specified on the {@link SubscriptionAttributes}, which defines
|
||||
* data interests and distribution of changes.
|
||||
*
|
||||
* @return the GemFire InterestsPolicy set for Subscription.
|
||||
* @return the Pivotal GemFire {@link InterestPolicy} set for Subscription.
|
||||
* @see org.apache.geode.cache.InterestPolicy
|
||||
* @see org.apache.geode.cache.SubscriptionAttributes#getInterestPolicy()
|
||||
*/
|
||||
@@ -99,16 +99,13 @@ public class SubscriptionAttributesFactoryBean implements FactoryBean<Subscripti
|
||||
return (interestPolicy != null ? interestPolicy : InterestPolicy.DEFAULT);
|
||||
}
|
||||
|
||||
/* non-Javadoc */
|
||||
@Deprecated
|
||||
public void setPolicy(InterestPolicy policy) {
|
||||
setInterestPolicy(policy);
|
||||
}
|
||||
|
||||
/* non-Javadoc */
|
||||
@Deprecated
|
||||
public InterestPolicy getPolicy() {
|
||||
return getInterestPolicy();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ import org.apache.geode.cache.TimeoutException;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* The {@link CallableCacheLoaderAdapter} class is a {@link Callable} and GemFire {@link CacheLoader} implementation
|
||||
* The {@link CallableCacheLoaderAdapter} class is a {@link Callable} and Pivotal GemFire {@link CacheLoader} implementation
|
||||
* that adapts the {@link Callable} interface into an instance of the {@link CacheLoader} interface. This class is
|
||||
* useful in situations where GemFire developers have several {@link CacheLoader} implementations that they wish to
|
||||
* useful in situations where Pivotal GemFire developers have several {@link CacheLoader} implementations that they wish to
|
||||
* use with Spring's Cache Abstraction.
|
||||
*
|
||||
* @author John Blum
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.cache.support.SimpleValueWrapper;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Spring Framework {@link Cache} implementation backed by a GemFire {@link Region}.
|
||||
* Spring Framework {@link Cache} implementation backed by a Pivotal GemFire {@link Region}.
|
||||
*
|
||||
* @author Costin Leau
|
||||
* @author John Blum
|
||||
@@ -38,11 +38,11 @@ public class GemfireCache implements Cache {
|
||||
private final Region region;
|
||||
|
||||
/**
|
||||
* Wraps a GemFire {@link Region} in an instance of {@link GemfireCache} to adapt the GemFire {@link Region}
|
||||
* Wraps a Pivotal GemFire {@link Region} in an instance of {@link GemfireCache} to adapt the Pivotal GemFire {@link Region}
|
||||
* to function as a Spring {@link Cache} in Spring's caching infrastructure.
|
||||
*
|
||||
* @param region GemFire {@link Region} to wrap.
|
||||
* @return an instance of {@link GemfireCache} backed by the provided GemFire {@link Region}.
|
||||
* @param region Pivotal GemFire {@link Region} to wrap.
|
||||
* @return an instance of {@link GemfireCache} backed by the provided Pivotal GemFire {@link Region}.
|
||||
* @see org.apache.geode.cache.Region
|
||||
* @see org.springframework.cache.Cache
|
||||
* @see #GemfireCache(Region)
|
||||
@@ -52,22 +52,22 @@ public class GemfireCache implements Cache {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an instance of {@link GemFireCache} initialized with the given GemFire {@link Region}.
|
||||
* Constructs an instance of {@link GemFireCache} initialized with the given Pivotal GemFire {@link Region}.
|
||||
* The {@link Region} will function as the backing store and implementation for
|
||||
* the Spring {@link Cache} interface.
|
||||
*
|
||||
* @param region GemFire {@link Region} backing the Spring {@link Cache}.
|
||||
* @param region Pivotal GemFire {@link Region} backing the Spring {@link Cache}.
|
||||
* @throws IllegalArgumentException if {@link Region} is null.
|
||||
*/
|
||||
public GemfireCache(Region<?, ?> region) {
|
||||
Assert.notNull(region, "GemFire Region must not be null");
|
||||
Assert.notNull(region, "Region must not be null");
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the GemFire {@link Region} used as the implementation for this Spring {@link Cache}.
|
||||
* Returns the Pivotal GemFire {@link Region} used as the implementation for this Spring {@link Cache}.
|
||||
*
|
||||
* @return the GemFire {@link Region} used as the implementation for this Spring {@link Cache}.
|
||||
* @return the Pivotal GemFire {@link Region} used as the implementation for this Spring {@link Cache}.
|
||||
* @see org.apache.geode.cache.Region
|
||||
*/
|
||||
public Region getNativeCache() {
|
||||
|
||||
@@ -29,10 +29,10 @@ import org.springframework.cache.support.AbstractCacheManager;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Core Spring Framework {@link CacheManager} implementation backed by a GemFire cache instance
|
||||
* Core Spring Framework {@link CacheManager} implementation backed by a Pivotal GemFire cache instance
|
||||
* (either a client or peer cache).
|
||||
*
|
||||
* Automatically discovers available caches (or GemFire {@link Region Regions}) when a cache for a given name
|
||||
* Automatically discovers available caches (or Pivotal GemFire {@link Region Regions}) when a cache for a given name
|
||||
* is missing and dynamic cache lookup/creation is enabled.
|
||||
*
|
||||
* @author Costin Leau
|
||||
@@ -55,17 +55,16 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
|
||||
private Set<String> cacheNames;
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@SuppressWarnings("all")
|
||||
<T extends GemFireCache> T assertGemFireCacheAvailable(T gemfireCache) {
|
||||
Assert.state(gemfireCache != null, "A GemFire cache instance is required");
|
||||
Assert.state(!gemfireCache.isClosed(), String.format("GemFire cache [%s] has been closed",
|
||||
|
||||
Assert.state(gemfireCache != null, "A cache instance is required");
|
||||
Assert.state(!gemfireCache.isClosed(), String.format("The cache [%s] has been closed",
|
||||
gemfireCache.getName()));
|
||||
|
||||
return gemfireCache;
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@SuppressWarnings("all")
|
||||
Region<?, ?> assertGemFireRegionAvailable(Region<?, ?> region, String cacheName) {
|
||||
Assert.state(region != null, String.format("No Region for cache name [%s] was found", cacheName));
|
||||
@@ -75,23 +74,23 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads all configured GemFire {@link Region Regions} that will be used by this {@link CacheManager}.
|
||||
* Loads all configured Pivotal GemFire {@link Region Regions} that will be used by this {@link CacheManager}.
|
||||
*
|
||||
* Any GemFire {@link Region Regions} configured with the {@link #regions} property will take precedence over
|
||||
* any configured {@link #cacheNames}. If no GemFire {@link Region Regions} were configured, then any
|
||||
* {@link #cacheNames} that were specified will be used to lookup existing GemFire {@link Region Regions}
|
||||
* Any Pivotal GemFire {@link Region Regions} configured with the {@link #regions} property will take precedence over
|
||||
* any configured {@link #cacheNames}. If no Pivotal GemFire {@link Region Regions} were configured, then any
|
||||
* {@link #cacheNames} that were specified will be used to lookup existing Pivotal GemFire {@link Region Regions}
|
||||
* to function as Spring {@link Cache Caches}in Spring's caching infrastructure.
|
||||
*
|
||||
* However, if neither {@link #regions} nor {@link #cacheNames} were specified, then all defined GemFire
|
||||
* {@link Region Regions} declared in the Spring application context, as determined by
|
||||
* {@link GemFireCache#rootRegions()}, will be used as Spring {@link Cache Caches}, and this {@link CacheManager}
|
||||
* will allow any dynamically created GemFire {@link Region Regions} at runtime to be found and used as a
|
||||
* will allow any dynamically created Pivotal GemFire {@link Region Regions} at runtime to be found and used as a
|
||||
* Spring {@link Cache} as well.
|
||||
*
|
||||
* @return a {@link Collection} of GemFire {@link Region Regions} used by this {@link CacheManager}
|
||||
* @return a {@link Collection} of Pivotal GemFire {@link Region Regions} used by this {@link CacheManager}
|
||||
* to function as {@link Cache Caches} in Spring's caching infrastructure.
|
||||
* @throws IllegalStateException if a GemFire cache instance was not provided, the provided GemFire cache instance
|
||||
* has been closed, no GemFire {@link Region} could be found for a given cache name, or the GemFire {@link Region}
|
||||
* @throws IllegalStateException if a Pivotal GemFire cache instance was not provided, the provided Pivotal GemFire cache instance
|
||||
* has been closed, no Pivotal GemFire {@link Region} could be found for a given cache name, or the Pivotal GemFire {@link Region}
|
||||
* for the given cache name has been destroyed.
|
||||
* @see org.springframework.cache.Cache
|
||||
*/
|
||||
@@ -108,8 +107,8 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
return caches;
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
Set<Region<?, ?>> resolveRegions(GemFireCache gemfireCache, Set<Region<?, ?>> regions, Set<String> cacheNames) {
|
||||
|
||||
if (isSet(regions)) {
|
||||
dynamic.set(false);
|
||||
return regions;
|
||||
@@ -130,16 +129,15 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
boolean isSet(Iterable<?> collection) {
|
||||
return (collection != null && collection.iterator().hasNext());
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance of {@link GemfireCache} initialized with the given GemFire {@link Region}.
|
||||
* Constructs a new instance of {@link GemfireCache} initialized with the given Pivotal GemFire {@link Region}.
|
||||
*
|
||||
* @param region GemFire {@link Region} to wrap (adapt).
|
||||
* @return an instance of {@link GemfireCache} initialized with the given GemFire {@link Region}.
|
||||
* @param region Pivotal GemFire {@link Region} to wrap (adapt).
|
||||
* @return an instance of {@link GemfireCache} initialized with the given Pivotal GemFire {@link Region}.
|
||||
* @see GemfireCache
|
||||
* @see org.apache.geode.cache.Region
|
||||
*/
|
||||
@@ -147,7 +145,6 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
return GemfireCache.wrap(region);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
Region<?, ?> regionFor(GemFireCache gemfireCache, String cacheName) {
|
||||
return assertGemFireRegionAvailable(assertGemFireCacheAvailable(gemfireCache).getRegion(cacheName), cacheName);
|
||||
}
|
||||
@@ -168,9 +165,10 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
*/
|
||||
@Override
|
||||
protected Cache getMissingCache(String name) {
|
||||
|
||||
Cache cache = super.getMissingCache(name);
|
||||
|
||||
return (cache != null ? cache : (isDynamic() ? newGemfireCache(regionFor(this.gemfireCache, name)) : null));
|
||||
return cache != null ? cache : (isDynamic() ? newGemfireCache(regionFor(this.gemfireCache, name)) : null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -183,14 +181,14 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the GemFire cache instance backing this {@link CacheManager}.
|
||||
* Sets the Pivotal GemFire cache instance backing this {@link CacheManager}.
|
||||
*
|
||||
* When set, if neither {@link Region Regions} nor {@code cacheNames} were specified, then this {@link CacheManager}
|
||||
* is capable of creating Spring {@link Cache Caches} backed by existing GemFire {@link Region Regions} used by
|
||||
* is capable of creating Spring {@link Cache Caches} backed by existing Pivotal GemFire {@link Region Regions} used by
|
||||
* the application at runtime. However, in order to dynamically create Spring {@link Cache Caches} a reference to
|
||||
* an open GemFire cache instance must be set.
|
||||
* an open Pivotal GemFire cache instance must be set.
|
||||
*
|
||||
* @param gemfireCache the GemFire cache instance used by this {@link CacheManager}
|
||||
* @param gemfireCache the Pivotal GemFire cache instance used by this {@link CacheManager}
|
||||
* to manage Spring {@link Cache Caches}.
|
||||
* @see org.apache.geode.cache.GemFireCache
|
||||
*/
|
||||
@@ -212,7 +210,7 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
* Sets the names of all Spring {@link Cache Caches} that will be used in the application.
|
||||
*
|
||||
* When set, this disables the dynamic capability of this {@link CacheManager} to create Spring {@link Cache Caches}
|
||||
* at runtime by dynamically looking up existing {@link Region Regions} from the GemFire cache instance.
|
||||
* at runtime by dynamically looking up existing {@link Region Regions} from the Pivotal GemFire cache instance.
|
||||
*
|
||||
* @param cacheNames {@link Set} of cache names that will be used in the application.
|
||||
* @see java.util.Set
|
||||
@@ -222,13 +220,13 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Explicitly sets the GemFire {@link Region Regions} to be used as Spring {@link Cache Caches}
|
||||
* Explicitly sets the Pivotal GemFire {@link Region Regions} to be used as Spring {@link Cache Caches}
|
||||
* in the application.
|
||||
*
|
||||
* When set, this disables the dynamic capability of this {@link CacheManager} to create Spring {@link Cache Caches}
|
||||
* at runtime by dynamically looking up existing {@link Region Regions} from the GemFire cache instance.
|
||||
* at runtime by dynamically looking up existing {@link Region Regions} from the Pivotal GemFire cache instance.
|
||||
*
|
||||
* @param regions {@link Set} of GemFire {@link Region Regions} used by this {@link CacheManager}
|
||||
* @param regions {@link Set} of Pivotal GemFire {@link Region Regions} used by this {@link CacheManager}
|
||||
* as Spring {@link Cache Caches}.
|
||||
* @see org.apache.geode.cache.Region
|
||||
*/
|
||||
@@ -237,10 +235,10 @@ public class GemfireCacheManager extends AbstractCacheManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the set of GemFire {@link Region Regions} used explicitly as Spring {@link Cache Caches}
|
||||
* Returns the set of Pivotal GemFire {@link Region Regions} used explicitly as Spring {@link Cache Caches}
|
||||
* in Spring's caching infrastructure.
|
||||
*
|
||||
* @return the set of GemFire {@link Region Regions} functioning as Spring {@link Cache Caches}
|
||||
* @return the set of Pivotal GemFire {@link Region Regions} functioning as Spring {@link Cache Caches}
|
||||
* in Spring's caching infrastructure
|
||||
* @see org.apache.geode.cache.Region
|
||||
*/
|
||||
|
||||
@@ -27,8 +27,8 @@ import org.springframework.data.gemfire.cache.GemfireCacheManager;
|
||||
* used to configure Pivotal GemFire or Apache Geode as the caching provider in Spring's Cache Abstraction.
|
||||
*
|
||||
* This {@link Configuration @Configuration} class is specifically responsible for declaring and registering
|
||||
* Spring Data GemFire/Geode's {@link GemfireCacheManager} implementation to properly enable either Pivotal GemFire
|
||||
* or Apache Geode as the caching provider used with Springs Cache Abstraction.
|
||||
* SDG {@link GemfireCacheManager} implementation to properly enable either Pivotal GemFire or Apache Geode
|
||||
* as the caching provider used with Springs Cache Abstraction.
|
||||
*
|
||||
* Additionally, this Spring {@link Configuration @Configuration} class also enables the Spring Cache Abstraction
|
||||
* by declaring Spring's {@link EnableCaching} annotation for the user extending or importing this class using
|
||||
|
||||
@@ -504,7 +504,7 @@ public class ClientCacheFactoryBean extends CacheFactoryBean implements Applicat
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the GemFire System property 'durable-client-id' to indicate to the server that this client is durable.
|
||||
* Set the Pivotal GemFire System property 'durable-client-id' to indicate to the server that this client is durable.
|
||||
*
|
||||
* @param durableClientId a String value indicating the durable client id.
|
||||
*/
|
||||
@@ -513,7 +513,7 @@ public class ClientCacheFactoryBean extends CacheFactoryBean implements Applicat
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the GemFire System property 'durable-client-id' indicating to the server whether
|
||||
* Gets the value of the Pivotal GemFire System property 'durable-client-id' indicating to the server whether
|
||||
* this client is durable.
|
||||
*
|
||||
* @return a String value indicating the durable client id.
|
||||
@@ -523,7 +523,7 @@ public class ClientCacheFactoryBean extends CacheFactoryBean implements Applicat
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the GemFire System property 'durable-client-timeout' indicating to the server how long to track events
|
||||
* Set the Pivotal GemFire System property 'durable-client-timeout' indicating to the server how long to track events
|
||||
* for the durable client when disconnected.
|
||||
*
|
||||
* @param durableClientTimeout an Integer value indicating the timeout in seconds for the server to keep
|
||||
@@ -534,7 +534,7 @@ public class ClientCacheFactoryBean extends CacheFactoryBean implements Applicat
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of the GemFire System property 'durable-client-timeout' indicating to the server how long
|
||||
* Get the value of the Pivotal GemFire System property 'durable-client-timeout' indicating to the server how long
|
||||
* to track events for the durable client when disconnected.
|
||||
*
|
||||
* @return an Integer value indicating the timeout in seconds for the server to keep
|
||||
@@ -667,10 +667,10 @@ public class ClientCacheFactoryBean extends CacheFactoryBean implements Applicat
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link Pool} used by this cache client to obtain connections to the GemFire cluster.
|
||||
* Sets the {@link Pool} used by this cache client to obtain connections to the Pivotal GemFire cluster.
|
||||
*
|
||||
* @param pool the GemFire {@link Pool} used by this {@link ClientCache} to obtain connections
|
||||
* to the GemFire cluster.
|
||||
* @param pool the Pivotal GemFire {@link Pool} used by this {@link ClientCache} to obtain connections
|
||||
* to the Pivotal GemFire cluster.
|
||||
* @throws IllegalArgumentException if the {@link Pool} is null.
|
||||
*/
|
||||
public void setPool(Pool pool) {
|
||||
@@ -678,19 +678,19 @@ public class ClientCacheFactoryBean extends CacheFactoryBean implements Applicat
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link Pool} used by this cache client to obtain connections to the GemFire cluster.
|
||||
* Gets the {@link Pool} used by this cache client to obtain connections to the Pivotal GemFire cluster.
|
||||
*
|
||||
* @return the GemFire {@link Pool} used by this {@link ClientCache} to obtain connections
|
||||
* to the GemFire cluster.
|
||||
* @return the Pivotal GemFire {@link Pool} used by this {@link ClientCache} to obtain connections
|
||||
* to the Pivotal GemFire cluster.
|
||||
*/
|
||||
public Pool getPool() {
|
||||
return this.pool;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the name of the {@link Pool} used by this cache client to obtain connections to the GemFire cluster.
|
||||
* Sets the name of the {@link Pool} used by this cache client to obtain connections to the Pivotal GemFire cluster.
|
||||
*
|
||||
* @param poolName set the name of the GemFire {@link Pool} used by this GemFire {@link ClientCache}.
|
||||
* @param poolName set the name of the Pivotal GemFire {@link Pool} used by this Pivotal GemFire {@link ClientCache}.
|
||||
* @throws IllegalArgumentException if the {@link Pool} name is unspecified.
|
||||
*/
|
||||
public void setPoolName(String poolName) {
|
||||
@@ -698,9 +698,9 @@ public class ClientCacheFactoryBean extends CacheFactoryBean implements Applicat
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of the GemFire {@link Pool} used by this GemFire cache client.
|
||||
* Gets the name of the Pivotal GemFire {@link Pool} used by this Pivotal GemFire cache client.
|
||||
*
|
||||
* @return the name of the GemFire {@link Pool} used by this GemFire cache client.
|
||||
* @return the name of the Pivotal GemFire {@link Pool} used by this Pivotal GemFire cache client.
|
||||
*/
|
||||
public String getPoolName() {
|
||||
return poolName;
|
||||
@@ -758,10 +758,10 @@ public class ClientCacheFactoryBean extends CacheFactoryBean implements Applicat
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this GemFire cache client is ready for events. If 'readyForEvents' was explicitly set,
|
||||
* Determines whether this Pivotal GemFire cache client is ready for events. If 'readyForEvents' was explicitly set,
|
||||
* then it takes precedence over all other considerations (e.g. durability).
|
||||
*
|
||||
* @return a boolean value indicating whether this GemFire cache client is ready for events.
|
||||
* @return a boolean value indicating whether this Pivotal GemFire cache client is ready for events.
|
||||
* @see org.springframework.data.gemfire.GemfireUtils#isDurable(ClientCache)
|
||||
* @see #getReadyForEvents()
|
||||
*/
|
||||
|
||||
@@ -530,7 +530,7 @@ public class ClientRegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V>
|
||||
/**
|
||||
* Sets the CacheLoader used to load data local to the client's Region on cache misses.
|
||||
*
|
||||
* @param cacheLoader a GemFire CacheLoader used to load data into the client Region.
|
||||
* @param cacheLoader a Pivotal GemFire CacheLoader used to load data into the client Region.
|
||||
* @see org.apache.geode.cache.CacheLoader
|
||||
*/
|
||||
public void setCacheLoader(CacheLoader<K, V> cacheLoader) {
|
||||
@@ -540,7 +540,7 @@ public class ClientRegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V>
|
||||
/**
|
||||
* Sets the CacheWriter used to perform a synchronous write-behind when data is put into the client's Region.
|
||||
*
|
||||
* @param cacheWriter the GemFire CacheWriter used to perform synchronous write-behinds on put ops.
|
||||
* @param cacheWriter the Pivotal GemFire CacheWriter used to perform synchronous write-behinds on put ops.
|
||||
* @see org.apache.geode.cache.CacheWriter
|
||||
*/
|
||||
public void setCacheWriter(CacheWriter<K, V> cacheWriter) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
/**
|
||||
* The ClientRegionShortcutConverter class is a Spring Converter implementation converting String value Client Region
|
||||
* Shortcut representations into actual GemFire ClientRegionShortcut enumerated values.
|
||||
* Shortcut representations into actual Pivotal GemFire ClientRegionShortcut enumerated values.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.core.convert.converter.Converter
|
||||
|
||||
@@ -21,10 +21,12 @@ import org.apache.geode.cache.client.ClientRegionShortcut;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* The {@link ClientRegionShortcutWrapper} enum is a Java enumerated type that wraps GemFire's {@link ClientRegionShortcut ClientRegionShortcuts}
|
||||
* with Spring Data GemFire {@link ClientRegionShortcutWrapper} enumerated values.
|
||||
* The {@link ClientRegionShortcutWrapper} enum is a Java enumerated type that wraps Pivotal GemFire's
|
||||
* {@link ClientRegionShortcut ClientRegionShortcuts} with SDG {@link ClientRegionShortcutWrapper}
|
||||
* enumerated values.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.DataPolicy
|
||||
* @see org.apache.geode.cache.client.ClientRegionShortcut
|
||||
* @since 1.4.0
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* A Spring {@link BeanFactoryPostProcessor} used to register a Client Region Proxy bean for each Region
|
||||
* accessible to a GemFire DataSource. If the Region is already defined, the bean definition will not be overridden.
|
||||
* accessible to a Pivotal GemFire DataSource. If the Region is already defined, the bean definition will not be overridden.
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
@@ -58,10 +58,10 @@ public class GemfireDataSourcePostProcessor implements BeanFactoryPostProcessor
|
||||
|
||||
/**
|
||||
* Constructs an instance of the GemfireDataSourcePostProcessor BeanFactoryPostProcessor class initialized
|
||||
* with the specified GemFire ClientCache instance for creating client PROXY Regions for all data Regions
|
||||
* configured in the GemFire cluster.
|
||||
* with the specified Pivotal GemFire ClientCache instance for creating client PROXY Regions for all data Regions
|
||||
* configured in the Pivotal GemFire cluster.
|
||||
*
|
||||
* @param clientCache the GemFire ClientCache instance.
|
||||
* @param clientCache the Pivotal GemFire ClientCache instance.
|
||||
* @see org.apache.geode.cache.client.ClientCache
|
||||
*/
|
||||
public GemfireDataSourcePostProcessor(final ClientCache clientCache) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterS
|
||||
|
||||
/**
|
||||
* The InterestResultPolicyConverter class is a Spring Converter and JavaBeans PropertyEditor capable of converting
|
||||
* a String into a GemFire InterestResultPolicyConverter.
|
||||
* a String into a Pivotal GemFire InterestResultPolicyConverter.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.support.AbstractPropertyEditorConverterSupport
|
||||
@@ -31,11 +31,11 @@ import org.springframework.data.gemfire.support.AbstractPropertyEditorConverterS
|
||||
public class InterestResultPolicyConverter extends AbstractPropertyEditorConverterSupport<InterestResultPolicy> {
|
||||
|
||||
/**
|
||||
* Converts the given String into an instance of GemFire InterestResultPolicy.
|
||||
* Converts the given String into an instance of Pivotal GemFire InterestResultPolicy.
|
||||
*
|
||||
* @param source the String to convert into an InterestResultPolicy value.
|
||||
* @return a GemFire InterestResultPolicy value for the given String.
|
||||
* @throws java.lang.IllegalArgumentException if the String is not a valid GemFire InterestResultPolicy.
|
||||
* @return a Pivotal GemFire InterestResultPolicy value for the given String.
|
||||
* @throws java.lang.IllegalArgumentException if the String is not a valid Pivotal GemFire InterestResultPolicy.
|
||||
* @see org.springframework.data.gemfire.client.InterestResultPolicyType#getInterestResultPolicy(InterestResultPolicyType)
|
||||
* @see org.springframework.data.gemfire.client.InterestResultPolicyType#valueOfIgnoreCase(String)
|
||||
* @see #assertConverted(String, Object, Class)
|
||||
|
||||
@@ -28,9 +28,9 @@ import org.apache.geode.cache.query.QueryService;
|
||||
* that conveniently enables implementing classes to extend this adapter to adapt their interfaces and serve
|
||||
* as a {@link Pool}.
|
||||
*
|
||||
* For instance, one possible implementation is Spring Data GemFire's {@link PoolFactoryBean}, which can act as
|
||||
* a {@link Pool} in a context where only the {@link Pool}'s "configuration" and meta-data are required,
|
||||
* but not actual connections or operating state information (e.g. pendingEventCount).
|
||||
* For instance, one possible implementation is SDG's {@link PoolFactoryBean}, which can act as a {@link Pool}
|
||||
* in a context where only the {@link Pool}'s "configuration" and meta-data are required, but no actual connections
|
||||
* or operating state information (e.g. pendingEventCount) is needed.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.client.PoolFactoryBean
|
||||
@@ -42,143 +42,114 @@ public abstract class PoolAdapter implements Pool {
|
||||
|
||||
public static final String NOT_IMPLEMENTED = "Not Implemented";
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public boolean isDestroyed() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getFreeConnectionTimeout() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public long getIdleTimeout() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getLoadConditioningInterval() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public List<InetSocketAddress> getLocators() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getMaxConnections() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getMinConnections() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public boolean getMultiuserAuthentication() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public String getName() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public List<InetSocketAddress> getOnlineLocators() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getPendingEventCount() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public long getPingInterval() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public boolean getPRSingleHopEnabled() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public QueryService getQueryService() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getReadTimeout() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getRetryAttempts() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public String getServerGroup() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public List<InetSocketAddress> getServers() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getSocketBufferSize() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getStatisticInterval() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getSubscriptionAckInterval() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public boolean getSubscriptionEnabled() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getSubscriptionMessageTrackingTimeout() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public int getSubscriptionRedundancy() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public boolean getThreadLocalConnections() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public void destroy() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public void destroy(final boolean keepAlive) {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public void releaseThreadLocalConnection() {
|
||||
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class PoolFactoryBean extends AbstractFactoryBeanSupport<Pool> implements
|
||||
// indicates whether the Pool has been created internally (by this FactoryBean) or not
|
||||
volatile boolean springBasedPool = true;
|
||||
|
||||
// GemFire Pool Configuration Settings
|
||||
// Pivotal GemFire Pool Configuration Settings
|
||||
private boolean keepAlive = false;
|
||||
private boolean multiUserAuthentication = PoolFactory.DEFAULT_MULTIUSER_AUTHENTICATION;
|
||||
private boolean prSingleHopEnabled = PoolFactory.DEFAULT_PR_SINGLE_HOP_ENABLED;
|
||||
|
||||
@@ -26,8 +26,8 @@ import org.apache.geode.cache.execute.Function;
|
||||
import org.apache.geode.cache.execute.FunctionContext;
|
||||
|
||||
/**
|
||||
* ListRegionsOnServerFunction is a GemFire Function class that returns a List of names for all Regions
|
||||
* defined in the GemFire cluster.
|
||||
* ListRegionsOnServerFunction is a Pivotal GemFire Function class that returns a List of names for all Regions
|
||||
* defined in the Pivotal GemFire cluster.
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* Classes providing support for GemFire client configuration.
|
||||
* Classes providing support for Pivotal GemFire client configuration.
|
||||
*
|
||||
*/
|
||||
package org.springframework.data.gemfire.client;
|
||||
package org.springframework.data.gemfire.client;
|
||||
|
||||
@@ -25,8 +25,8 @@ import org.apache.geode.cache.client.Pool;
|
||||
import org.apache.geode.cache.query.QueryService;
|
||||
|
||||
/**
|
||||
* DelegatingPoolAdapter is an abstract implementation of GemFire's {@link Pool} interface and extension of
|
||||
* {@link FactoryDefaultsPoolAdapter} that delegates operations to the provided {@link Pool} instance.
|
||||
* {@link DelegatingPoolAdapter} is an abstract implementation of Pivotal GemFire's {@link Pool} interface
|
||||
* and extension of {@link FactoryDefaultsPoolAdapter} that delegates operations to the provided {@link Pool} instance.
|
||||
*
|
||||
* However, this implementation guards against a potentially <code>null</code> {@link Pool} reference by returning
|
||||
* default factory settings for the {@link Pool}'s configuration properties along with default behavior for operations
|
||||
@@ -42,7 +42,6 @@ public abstract class DelegatingPoolAdapter extends FactoryDefaultsPoolAdapter {
|
||||
|
||||
private final Pool delegate;
|
||||
|
||||
/* (non-Javadoc) */
|
||||
public static DelegatingPoolAdapter from(Pool delegate) {
|
||||
return new DelegatingPoolAdapter(delegate) { };
|
||||
}
|
||||
@@ -57,184 +56,155 @@ public abstract class DelegatingPoolAdapter extends FactoryDefaultsPoolAdapter {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
protected Pool getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public boolean isDestroyed() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::isDestroyed).orElseGet(super::isDestroyed);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getFreeConnectionTimeout() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getFreeConnectionTimeout)
|
||||
.orElseGet(super::getFreeConnectionTimeout);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public long getIdleTimeout() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getIdleTimeout).orElseGet(super::getIdleTimeout);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getLoadConditioningInterval() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getLoadConditioningInterval)
|
||||
.orElseGet(super::getLoadConditioningInterval);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public List<InetSocketAddress> getLocators() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getLocators).orElseGet(super::getLocators);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getMaxConnections() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getMaxConnections).orElseGet(super::getMaxConnections);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getMinConnections() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getMinConnections).orElseGet(super::getMinConnections);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public boolean getMultiuserAuthentication() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getMultiuserAuthentication)
|
||||
.orElseGet(super::getMultiuserAuthentication);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public String getName() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getName).orElseGet(super::getName);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public List<InetSocketAddress> getOnlineLocators() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getOnlineLocators).orElseGet(super::getOnlineLocators);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getPendingEventCount() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getPendingEventCount).orElse(0);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public long getPingInterval() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getPingInterval).orElseGet(super::getPingInterval);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public boolean getPRSingleHopEnabled() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getPRSingleHopEnabled)
|
||||
.orElseGet(super::getPRSingleHopEnabled);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public QueryService getQueryService() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getQueryService).orElseGet(super::getQueryService);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getReadTimeout() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getReadTimeout).orElseGet(super::getReadTimeout);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getRetryAttempts() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getRetryAttempts).orElseGet(super::getRetryAttempts);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public String getServerGroup() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getServerGroup).orElseGet(super::getServerGroup);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public List<InetSocketAddress> getServers() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getServers).orElseGet(super::getServers);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getSocketBufferSize() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getSocketBufferSize).orElseGet(super::getSocketBufferSize);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getStatisticInterval() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getStatisticInterval)
|
||||
.orElseGet(super::getStatisticInterval);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getSubscriptionAckInterval() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getSubscriptionAckInterval)
|
||||
.orElseGet(super::getSubscriptionAckInterval);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public boolean getSubscriptionEnabled() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getSubscriptionEnabled)
|
||||
.orElseGet(super::getSubscriptionEnabled);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getSubscriptionMessageTrackingTimeout() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getSubscriptionMessageTrackingTimeout)
|
||||
.orElseGet(super::getSubscriptionMessageTrackingTimeout);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public int getSubscriptionRedundancy() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getSubscriptionRedundancy)
|
||||
.orElseGet(super::getSubscriptionRedundancy);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public boolean getThreadLocalConnections() {
|
||||
return Optional.ofNullable(getDelegate()).map(Pool::getThreadLocalConnections)
|
||||
.orElseGet(super::getThreadLocalConnections);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public void destroy() {
|
||||
Optional.ofNullable(getDelegate()).ifPresent(Pool::destroy);
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public void destroy(boolean keepAlive) {
|
||||
Optional.ofNullable(getDelegate()).ifPresent(delegate -> delegate.destroy(keepAlive));
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
public void releaseThreadLocalConnection() {
|
||||
Optional.ofNullable(getDelegate()).ifPresent(Pool::releaseThreadLocalConnection);
|
||||
|
||||
@@ -38,9 +38,9 @@ public class AbstractGemfireAdminOperations implements GemfireAdminOperations {
|
||||
protected static final String NOT_IMPLEMENTED = "Not Implemented";
|
||||
|
||||
/**
|
||||
* Returns a {@link Iterable collection} of {@link Region} names defined on the GemFire Servers in the cluster.
|
||||
* Returns a {@link Iterable collection} of {@link Region} names defined on the Pivotal GemFire Servers in the cluster.
|
||||
*
|
||||
* @return an {@link Iterable} of {@link Region} names defined on the GemFire Servers in the cluster.
|
||||
* @return an {@link Iterable} of {@link Region} names defined on the Pivotal GemFire Servers in the cluster.
|
||||
* @see org.apache.geode.cache.Region#getName()
|
||||
* @see java.lang.Iterable
|
||||
*/
|
||||
|
||||
@@ -46,9 +46,9 @@ import org.springframework.data.gemfire.config.schema.definitions.RegionDefiniti
|
||||
public interface GemfireAdminOperations {
|
||||
|
||||
/**
|
||||
* Returns a {@link Iterable collection} of {@link Region} names defined on the GemFire Servers in the cluster.
|
||||
* Returns a {@link Iterable collection} of {@link Region} names defined on the Pivotal GemFire Servers in the cluster.
|
||||
*
|
||||
* @return an {@link Iterable} of {@link Region} names defined on the GemFire Servers in the cluster.
|
||||
* @return an {@link Iterable} of {@link Region} names defined on the Pivotal GemFire Servers in the cluster.
|
||||
* @see org.apache.geode.cache.Region#getName()
|
||||
* @see java.lang.Iterable
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.springframework.util.Assert;
|
||||
* in the cluster.
|
||||
*
|
||||
* Note: any schema changing functionality (e.g. {@link #createRegion(RegionDefinition)}) does not get recorded by
|
||||
* the GemFire/Geode Cluster Configuration Service using this strategy.
|
||||
* the Pivotal GemFire/Apache Geode Cluster Configuration Service using this strategy.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.client.ClientCache
|
||||
@@ -91,7 +91,7 @@ public class FunctionGemfireAdminTemplate extends AbstractGemfireAdminOperations
|
||||
* / Apache Geode cluster.
|
||||
*
|
||||
* @return an {@link Iterable} of servers-side {@link Region} names for all {@link Region Regions} defined
|
||||
* across all servers in the remote GemFire/Geode cluster.
|
||||
* across all servers in the remote Pivotal GemFire/Apache Geode cluster.
|
||||
* @see java.lang.Iterable
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -67,7 +67,7 @@ public class RestHttpGemfireAdminTemplate extends FunctionGemfireAdminTemplate {
|
||||
/**
|
||||
* Constructs an instance of the {@link RestHttpGemfireAdminTemplate} initialized with
|
||||
* the given {@link ClientCache} and configured with the default host and port when accessing
|
||||
* the GemFire or Geode Management REST API interface.
|
||||
* the Pivotal GemFire or Geode Management REST API interface.
|
||||
*
|
||||
* @param clientCache reference to the {@link ClientCache}
|
||||
* @throws IllegalArgumentException if the {@link ClientCache} reference is {@literal null}.
|
||||
@@ -80,11 +80,11 @@ public class RestHttpGemfireAdminTemplate extends FunctionGemfireAdminTemplate {
|
||||
/**
|
||||
* Constructs an instance of the {@link RestHttpGemfireAdminTemplate} initialized with
|
||||
* the given {@link ClientCache} and configured with the specified host and port when accessing
|
||||
* the GemFire or Geode Management REST API interface.
|
||||
* the Pivotal GemFire or Geode Management REST API interface.
|
||||
*
|
||||
* @param clientCache reference to the {@link ClientCache}
|
||||
* @param host {@link String} containing the hostname of the GemFire/Geode Manager.
|
||||
* @param port integer value specifying the port on which the GemFire/Geode Manager HTTP Service is listening
|
||||
* @param host {@link String} containing the hostname of the Pivotal GemFire/Apache Geode Manager.
|
||||
* @param port integer value specifying the port on which the Pivotal GemFire/Apache Geode Manager HTTP Service is listening
|
||||
* for HTTP clients.
|
||||
* @throws IllegalArgumentException if the {@link ClientCache} reference is {@literal null}.
|
||||
* @see org.apache.geode.cache.client.ClientCache
|
||||
@@ -111,7 +111,7 @@ public class RestHttpGemfireAdminTemplate extends FunctionGemfireAdminTemplate {
|
||||
|
||||
/**
|
||||
* Resolves the Pivotal GemFire or Apache Geode Management REST API URL given the host and port
|
||||
* of the GemFire/Geode Manager's embedded HTTP service.
|
||||
* of the Pivotal GemFire/Apache Geode Manager's embedded HTTP service.
|
||||
*
|
||||
* @param host {@link String} containing the hostname of the Manager running the embedded HTTP service
|
||||
* and Management REST API.
|
||||
@@ -123,9 +123,9 @@ public class RestHttpGemfireAdminTemplate extends FunctionGemfireAdminTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to the resolved GemFire/Geode Management REST API URL.
|
||||
* Returns a reference to the resolved Pivotal GemFire/Apache Geode Management REST API URL.
|
||||
*
|
||||
* @return a {@link String} containing the resolved GemFire/Geode Management REST API URL.
|
||||
* @return a {@link String} containing the resolved Pivotal GemFire/Apache Geode Management REST API URL.
|
||||
*/
|
||||
protected String getManagementRestApiUrl() {
|
||||
return this.managementRestApiUrl;
|
||||
|
||||
@@ -167,7 +167,7 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
*
|
||||
* @return a {@link Properties} object containing Pivotal GemFire/Apache Geode properties used to configure
|
||||
* the Pivotal GemFire/Apache Geode cache instance.
|
||||
* @see <a href="http://gemfire.docs.pivotal.io/docs-gemfire/reference/topics/gemfire_properties.html">GemFire Properties</a>
|
||||
* @see <a href="http://gemfire.docs.pivotal.io/docs-gemfire/reference/topics/gemfire_properties.html">Pivotal GemFire Properties</a>
|
||||
* @see java.util.Properties
|
||||
* @see #locators()
|
||||
* @see #logLevel()
|
||||
@@ -202,11 +202,11 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures Spring container infrastructure components and beans used by Spring Data GemFire
|
||||
* to enable Pivotal GemFire or Apache Geode to function properly inside a Spring context.
|
||||
* Configures Spring container infrastructure components and beans used by SDG to enable Pivotal GemFire
|
||||
* or Apache Geode to function properly inside a Spring context.
|
||||
*
|
||||
* @param importMetadata {@link AnnotationMetadata} containing annotation meta-data
|
||||
* for the Spring Data GemFire cache application class.
|
||||
* for the SDG cache application class.
|
||||
* @see org.springframework.core.type.AnnotationMetadata
|
||||
*/
|
||||
protected void configureInfrastructure(AnnotationMetadata importMetadata) {
|
||||
@@ -308,7 +308,7 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
* @param importMetadata {@link AnnotationMetadata} containing PDX meta-data used to configure the cache
|
||||
* with PDX de/serialization capabilities.
|
||||
* @see org.springframework.core.type.AnnotationMetadata
|
||||
* @see <a href="http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/data_serialization/gemfire_pdx_serialization.html">GemFire PDX Serialization</a>
|
||||
* @see <a href="http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/data_serialization/gemfire_pdx_serialization.html">Pivotal GemFire PDX Serialization</a>
|
||||
*/
|
||||
protected void configurePdx(AnnotationMetadata importMetadata) {
|
||||
|
||||
@@ -491,13 +491,13 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
// REVIEW JAVADOC FROM HERE
|
||||
|
||||
/**
|
||||
* Determines whether this is a GemFire {@link org.apache.geode.cache.server.CacheServer} application,
|
||||
* Determines whether this is a Pivotal GemFire {@link org.apache.geode.cache.server.CacheServer} application,
|
||||
* which is indicated by the presence of the {@link CacheServerApplication} annotation on a Spring application
|
||||
* {@link org.springframework.context.annotation.Configuration @Configuration} class.
|
||||
*
|
||||
* @param importMetadata {@link AnnotationMetadata} containing application configuration meta-data
|
||||
* from the annotations used to configure the Spring application.
|
||||
* @return a boolean value indicating whether this is a GemFire cache server application.
|
||||
* @return a boolean value indicating whether this is a Pivotal GemFire cache server application.
|
||||
* @see org.springframework.data.gemfire.config.annotation.CacheServerApplication
|
||||
* @see #isTypedCacheApplication(Class, AnnotationMetadata)
|
||||
*/
|
||||
@@ -506,13 +506,13 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this is a GemFire {@link org.apache.geode.cache.client.ClientCache} application,
|
||||
* Determines whether this is a Pivotal GemFire {@link org.apache.geode.cache.client.ClientCache} application,
|
||||
* which is indicated by the presence of the {@link ClientCacheApplication} annotation on a Spring application
|
||||
* {@link org.springframework.context.annotation.Configuration @Configuration} class.
|
||||
*
|
||||
* @param importMetadata {@link AnnotationMetadata} containing application configuration meta-data
|
||||
* from the annotations used to configure the Spring application.
|
||||
* @return a boolean value indicating whether this is a GemFire cache client application.
|
||||
* @return a boolean value indicating whether this is a Pivotal GemFire cache client application.
|
||||
* @see org.springframework.data.gemfire.config.annotation.ClientCacheApplication
|
||||
* @see #isTypedCacheApplication(Class, AnnotationMetadata)
|
||||
*/
|
||||
@@ -521,13 +521,13 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this is a GemFire peer {@link org.apache.geode.cache.Cache} application,
|
||||
* Determines whether this is a Pivotal GemFire peer {@link org.apache.geode.cache.Cache} application,
|
||||
* which is indicated by the presence of the {@link PeerCacheApplication} annotation on a Spring application
|
||||
* {@link org.springframework.context.annotation.Configuration @Configuration} class.
|
||||
*
|
||||
* @param importMetadata {@link AnnotationMetadata} containing application configuration meta-data
|
||||
* from the annotations used to configure the Spring application.
|
||||
* @return a boolean value indicating whether this is a GemFire peer cache application.
|
||||
* @return a boolean value indicating whether this is a Pivotal GemFire peer cache application.
|
||||
* @see org.springframework.data.gemfire.config.annotation.PeerCacheApplication
|
||||
* @see #isTypedCacheApplication(Class, AnnotationMetadata)
|
||||
*/
|
||||
@@ -536,7 +536,7 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this Spring application is annotated with the given GemFire cache type annotation.
|
||||
* Determines whether this Spring application is annotated with the given Pivotal GemFire cache type annotation.
|
||||
*
|
||||
* @param annotationType {@link Annotation} cache type.
|
||||
* @param importMetadata {@link AnnotationMetadata} containing application configuration meta-data
|
||||
@@ -555,14 +555,14 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this is a GemFire {@link org.apache.geode.cache.server.CacheServer} or
|
||||
* Determines whether this is a Pivotal GemFire {@link org.apache.geode.cache.server.CacheServer} or
|
||||
* {@link org.apache.geode.cache.Cache peer cache} application, which is indicated by the presence
|
||||
* of either the {@link CacheServerApplication} annotation or the {@link PeerCacheApplication} annotation
|
||||
* on a Spring application {@link org.springframework.context.annotation.Configuration @Configuration} class.
|
||||
*
|
||||
* @param importMetadata {@link AnnotationMetadata} containing application configuration meta-data
|
||||
* from the annotations used to configure the Spring application.
|
||||
* @return a boolean value indicating whether this is a GemFire cache server or peer cache application.
|
||||
* @return a boolean value indicating whether this is a Pivotal GemFire cache server or peer cache application.
|
||||
* @see org.springframework.core.type.AnnotationMetadata
|
||||
* @see org.springframework.data.gemfire.config.annotation.CacheServerApplication
|
||||
* @see org.springframework.data.gemfire.config.annotation.PeerCacheApplication
|
||||
@@ -579,7 +579,7 @@ public abstract class AbstractCacheConfiguration extends AbstractAnnotationConfi
|
||||
*
|
||||
* @param importMetadata {@link AnnotationMetadata} containing application configuration meta-data
|
||||
* from the class type-level annotations used to configure the Spring application.
|
||||
* @return a boolean value indicating whether this is a GemFire cache server, client cache or peer cache
|
||||
* @return a boolean value indicating whether this is a Pivotal GemFire cache server, client cache or peer cache
|
||||
* Spring application.
|
||||
* @see #isCacheServerApplication(AnnotationMetadata)
|
||||
* @see #isClientCacheApplication(AnnotationMetadata)
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.core.type.AnnotationMetadata;
|
||||
/**
|
||||
* The {@link AddCacheServersConfiguration} class registers {@link org.springframework.data.gemfire.server.CacheServerFactoryBean}
|
||||
* bean definitions for all {@link EnableCacheServer} annotation configuration meta-data defined in
|
||||
* the {@link EnableCacheServers} annotation on a GemFire peer cache application class.
|
||||
* the {@link EnableCacheServers} annotation on a Pivotal GemFire peer cache application class.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.config.annotation.AddCacheServerConfiguration
|
||||
|
||||
@@ -225,9 +225,9 @@ public class AddPoolConfiguration extends AbstractAnnotationConfigSupport
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses the list of GemFire Locator and Server connection endpoint definitions and meta-data to configure
|
||||
* the GemFire client {@link org.apache.geode.cache.client.Pool} used to communicate with the servers
|
||||
* in the GemFire cluster.
|
||||
* Uses the list of Pivotal GemFire Locator and Server connection endpoint definitions and meta-data to configure
|
||||
* the Pivotal GemFire client {@link org.apache.geode.cache.client.Pool} used to communicate with the servers
|
||||
* in the Pivotal GemFire cluster.
|
||||
*
|
||||
* @param enablePoolAttributes {@link EnablePool} annotation containing
|
||||
* {@link org.apache.geode.cache.client.Pool} Locator/Server connection endpoint meta-data.
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.core.type.AnnotationMetadata;
|
||||
/**
|
||||
* The {@link AddPoolsConfiguration} class registers {@link org.springframework.data.gemfire.client.PoolFactoryBean}
|
||||
* bean definitions for all {@link EnablePool} annotation configuration meta-data defined in
|
||||
* the {@link EnablePools} annotation on a GemFire client cache application class.
|
||||
* the {@link EnablePools} annotation on a Pivotal GemFire client cache application class.
|
||||
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.client.Pool
|
||||
|
||||
@@ -143,9 +143,9 @@ public class ApacheShiroSecurityConfiguration extends AbstractAnnotationConfigSu
|
||||
* declared in the Spring {@link org.springframework.context.ApplicationContext}.
|
||||
*
|
||||
* This {@link Bean} definition declares a dependency on the Apache Geode {@link GemFireCache} instance
|
||||
* in order to ensure the Geode cache is created and initialized first. This ensures that any internal Geode
|
||||
* security configuration logic is evaluated and processed before SDG attempts to configure Apache Shiro
|
||||
* as Apache Geode's security provider.
|
||||
* in order to ensure the Apache Geode cache is created and initialized first. This ensures that any internal
|
||||
* Apache Geode security configuration logic is evaluated and processed before SDG attempts to configure
|
||||
* Apache Shiro as Apache Geode's security provider.
|
||||
*
|
||||
* Additionally, this {@link Bean} definition will register the Apache Shiro
|
||||
* {@link org.apache.geode.security.SecurityManager} with the Apache Shiro security framework
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* The {@link AutoConfiguredAuthenticationConfiguration} class is a Spring {@link Configuration @Configuration} class
|
||||
* that auto-configures Pivotal GemFire / Apache Geode Authentication by providing a implementation
|
||||
* of the {@link org.apache.geode.security.AuthInitialize} interface along with setting the necessary GemFire / Geode
|
||||
* of the {@link org.apache.geode.security.AuthInitialize} interface along with setting the necessary Pivotal GemFire / Geode
|
||||
* properties.
|
||||
*
|
||||
* @author John Blum
|
||||
|
||||
@@ -45,12 +45,12 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* The {@link AutoRegionLookupConfiguration} class is a Spring {@link ImportBeanDefinitionRegistrar} that enables
|
||||
* the automatic lookup of GemFire Regions, which may have been defined else where, such as in {@literal cache.xml}
|
||||
* or using GemFire's Cluster Configuration Service.
|
||||
* the automatic lookup of Pivotal GemFire Regions, which may have been defined else where, such as in {@literal cache.xml}
|
||||
* or using Pivotal GemFire's Cluster Configuration Service.
|
||||
*
|
||||
* This registrar works by registering the {@link AutoRegionLookupBeanPostProcessor} in the Spring application context,
|
||||
* which is enabled when a Spring {@link org.springframework.context.annotation.Configuration @Configuration} annotated
|
||||
* GemFire cache application class is annotated with {@link EnableAutoRegionLookup}.
|
||||
* Pivotal GemFire cache application class is annotated with {@link EnableAutoRegionLookup}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.beans.factory.BeanFactory
|
||||
@@ -79,7 +79,6 @@ public class AutoRegionLookupConfiguration extends AbstractAnnotationConfigSuppo
|
||||
|
||||
private StandardEvaluationContext evaluationContext = new StandardEvaluationContext();
|
||||
|
||||
/* (non-Javadoc) */
|
||||
@Override
|
||||
protected Class getAnnotationType() {
|
||||
return EnableAutoRegionLookup.class;
|
||||
@@ -153,7 +152,6 @@ public class AutoRegionLookupConfiguration extends AbstractAnnotationConfigSuppo
|
||||
return DEFAULT_ENABLED;
|
||||
}
|
||||
|
||||
/* (non-Javadoc) */
|
||||
private void registerAutoRegionLookupBeanPostProcessor(BeanDefinitionRegistry registry) {
|
||||
|
||||
if (AUTO_REGION_LOOKUP_BEAN_POST_PROCESSOR_REGISTERED.compareAndSet(false, true)) {
|
||||
|
||||
@@ -25,8 +25,8 @@ import org.springframework.data.gemfire.support.GemfireBeanFactoryLocator;
|
||||
|
||||
/**
|
||||
* The {@link BeanFactoryLocatorConfiguration} class extends the Spring application configuration by enabling
|
||||
* Spring Data GemFire/Geode's {@link GemfireBeanFactoryLocator} in order to auto-wire and configure any
|
||||
* GemFire/Geode Objects declared in GemFire/Geode config (e.g. XML or properties).
|
||||
* SDG's {@link GemfireBeanFactoryLocator} in order to auto-wire and configure any Pivotal GemFire/Apache Geode objects
|
||||
* declared in Pivotal GemFire/Apache Geode config (e.g. XML or properties).
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.beans.factory.config.BeanPostProcessor
|
||||
@@ -42,8 +42,8 @@ import org.springframework.data.gemfire.support.GemfireBeanFactoryLocator;
|
||||
public class BeanFactoryLocatorConfiguration {
|
||||
|
||||
/**
|
||||
* Declares and registers a Spring {@link BeanPostProcessor} and post processes a Spring Data GemFire/Geode
|
||||
* {@link CacheFactoryBean} by setting the {@literal useBeanFactoryLocator} property to {@literal true}.
|
||||
* Declares and registers a Spring {@link BeanPostProcessor} and post processes a SDG {@link CacheFactoryBean}
|
||||
* by setting the {@literal useBeanFactoryLocator} property to {@literal true}.
|
||||
*
|
||||
* @return a Spring {@link BeanPostProcessor} used to post process the SDG {@link CacheFactoryBean}.
|
||||
* @see org.springframework.beans.factory.config.BeanPostProcessor
|
||||
|
||||
@@ -33,10 +33,10 @@ import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.gemfire.server.SubscriptionEvictionPolicy;
|
||||
|
||||
/**
|
||||
* The CacheServerApplication annotation enables an embedded GemFire
|
||||
* {@link org.apache.geode.cache.server.CacheServer} instance in a Spring Data GemFire based application.
|
||||
* The CacheServerApplication annotation enables an embedded Pivotal GemFire {@link CacheServer} instance
|
||||
* in a SDG-based application.
|
||||
*
|
||||
* In addition, this also implies an embedded GemFire peer {@link org.apache.geode.cache.Cache} must exist
|
||||
* In addition, this also implies an embedded Pivotal GemFire peer {@link org.apache.geode.cache.Cache} must exist
|
||||
* and therefore will be configured, constructed and initialized as a Spring bean in the application context.
|
||||
*
|
||||
* @author John Blum
|
||||
@@ -107,7 +107,7 @@ public @interface CacheServerApplication {
|
||||
float criticalOffHeapPercentage() default 0.0f;
|
||||
|
||||
/**
|
||||
* By default, a GemFire member (both locators and servers) will attempt to reconnect and reinitialize the cache
|
||||
* By default, a Pivotal GemFire member (both locators and servers) will attempt to reconnect and reinitialize the cache
|
||||
* after it has been forced out of the distributed system by a network partition event or has otherwise been
|
||||
* shunned by other members. Use this property to enable the auto-reconnect behavior.
|
||||
*
|
||||
@@ -185,7 +185,7 @@ public @interface CacheServerApplication {
|
||||
int lockTimeout() default 60;
|
||||
|
||||
/**
|
||||
* Configures the log level used to output log messages at GemFire cache runtime.
|
||||
* Configures the log level used to output log messages at Pivotal GemFire cache runtime.
|
||||
*
|
||||
* Defaults to {@literal config}.
|
||||
*
|
||||
@@ -252,7 +252,7 @@ public @interface CacheServerApplication {
|
||||
int messageTimeToLive() default CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE;
|
||||
|
||||
/**
|
||||
* Configures the name of this GemFire member in the cluster (distributed system).
|
||||
* Configures the name of this Pivotal GemFire member in the cluster (distributed system).
|
||||
*
|
||||
* Defaults to {@literal SpringBasedCacheServerApplication}.
|
||||
*
|
||||
@@ -318,8 +318,8 @@ public @interface CacheServerApplication {
|
||||
|
||||
/**
|
||||
* Determines whether the Spring {@link BeanFactory} locator should be enabled to lookup
|
||||
* the Spring {@link BeanFactory} to auto-wire and configure/initialize GemFire components
|
||||
* created in a non-Spring managed, GemFire context.
|
||||
* the Spring {@link BeanFactory} to auto-wire and configure/initialize Pivotal GemFire components
|
||||
* created in a non-Spring managed, Pivotal GemFire context.
|
||||
*
|
||||
* Defaults to {@literal false}.
|
||||
*
|
||||
@@ -328,7 +328,7 @@ public @interface CacheServerApplication {
|
||||
boolean useBeanFactoryLocator() default false;
|
||||
|
||||
/**
|
||||
* Configures whether this GemFire cache member node would pull it's configuration meta-data
|
||||
* Configures whether this Pivotal GemFire cache member node would pull it's configuration meta-data
|
||||
* from the cluster-based Cluster Configuration service.
|
||||
*
|
||||
* Defaults to {@literal false}.
|
||||
|
||||
@@ -67,7 +67,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* The {@link CachingDefinedRegionsConfiguration} class is a Spring {@link Configuration @Configuration} class
|
||||
* that applies configuration to a Spring (Data GemFire/Geode) application to create GemFire/Geode cache
|
||||
* that applies configuration to a Spring (Data Pivotal GemFire/Apache Geode) application to create Pivotal GemFire/Apache Geode cache
|
||||
* {@link Region Regions} based on the use of Spring's Cache Abstraction to enable caching for application
|
||||
* service classes and methods.
|
||||
*
|
||||
|
||||
@@ -33,8 +33,8 @@ import org.springframework.data.gemfire.GemfireUtils;
|
||||
import org.springframework.data.gemfire.support.GemfireBeanFactoryLocator;
|
||||
|
||||
/**
|
||||
* The {@link ClientCacheApplication} annotation enables a Spring Data GemFire based application to become
|
||||
* a GemFire cache client (i.e. {@link org.apache.geode.cache.client.ClientCache}).
|
||||
* The {@link ClientCacheApplication} annotation enables a SDG based application to become a
|
||||
* Pivotal GemFire cache client (i.e. {@link org.apache.geode.cache.client.ClientCache}).
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.client.PoolFactory
|
||||
@@ -163,7 +163,7 @@ public @interface ClientCacheApplication {
|
||||
int loadConditioningInterval() default PoolFactory.DEFAULT_LOAD_CONDITIONING_INTERVAL;
|
||||
|
||||
/**
|
||||
* Configures the GemFire {@link org.apache.geode.distributed.Locator Locators} to which
|
||||
* Configures the Pivotal GemFire {@link org.apache.geode.distributed.Locator Locators} to which
|
||||
* this cache client will connect.
|
||||
*
|
||||
* Use either the {@literal spring.data.gemfire.pool.default.locators} property
|
||||
@@ -172,7 +172,7 @@ public @interface ClientCacheApplication {
|
||||
Locator[] locators() default {};
|
||||
|
||||
/**
|
||||
* Configures the log level used to output log messages at GemFire cache runtime.
|
||||
* Configures the log level used to output log messages at Pivotal GemFire cache runtime.
|
||||
*
|
||||
* Defaults to {@literal config}.
|
||||
*
|
||||
@@ -212,7 +212,7 @@ public @interface ClientCacheApplication {
|
||||
boolean multiUserAuthentication() default PoolFactory.DEFAULT_MULTIUSER_AUTHENTICATION;
|
||||
|
||||
/**
|
||||
* Configures the name of this GemFire member in the cluster (distributed system).
|
||||
* Configures the name of this Pivotal GemFire member in the cluster (distributed system).
|
||||
*
|
||||
* Defaults to {@literal SpringBasedCacheClientApplication}.
|
||||
*
|
||||
@@ -284,7 +284,7 @@ public @interface ClientCacheApplication {
|
||||
String serverGroup() default PoolFactory.DEFAULT_SERVER_GROUP;
|
||||
|
||||
/**
|
||||
* Configures the GemFire {@link org.apache.geode.cache.server.CacheServer CacheServers} to which
|
||||
* Configures the Pivotal GemFire {@link org.apache.geode.cache.server.CacheServer CacheServers} to which
|
||||
* this cache client will connect.
|
||||
*
|
||||
* Use either the {@literal spring.data.gemfire.pool.default.servers} property
|
||||
@@ -369,8 +369,8 @@ public @interface ClientCacheApplication {
|
||||
|
||||
/**
|
||||
* Determines whether the {@link GemfireBeanFactoryLocator} should be enabled to lookup
|
||||
* the Spring {@link BeanFactory} to auto-wire and configure/initialize GemFire components
|
||||
* created in a non-Spring managed, GemFire context.
|
||||
* the Spring {@link BeanFactory} to auto-wire and configure/initialize Pivotal GemFire components
|
||||
* created in a non-Spring managed, Pivotal GemFire context.
|
||||
*
|
||||
* Defaults to {@literal false}.
|
||||
*
|
||||
|
||||
@@ -190,14 +190,14 @@ public class ClientCacheConfiguration extends AbstractCacheConfiguration {
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures Spring container infrastructure components and beans used by Spring Data GemFire
|
||||
* to enable Pivotal GemFire or Apache Geode to function properly inside a Spring context.
|
||||
* Configures Spring container infrastructure components and beans used by SDG to enable Pivotal GemFire
|
||||
* or Apache Geode to function properly inside a Spring context.
|
||||
*
|
||||
* This overridden method configures and registers additional Spring components and bean applicable to
|
||||
* {@link ClientCache ClientCaches}.
|
||||
*
|
||||
* @param importMetadata {@link AnnotationMetadata} containing annotation meta-data
|
||||
* for the Spring Data GemFire cache application class.
|
||||
* for the SDG cache application class.
|
||||
* @see org.springframework.core.type.AnnotationMetadata
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -181,12 +181,12 @@ public class ClusterConfigurationConfiguration extends AbstractAnnotationConfigS
|
||||
|
||||
/**
|
||||
* Constructs an instance of {@link GemfireAdminOperations} to perform administrative, schema functions
|
||||
* on a GemFire cache cluster as well as a client cache from a cache client.
|
||||
* on a Pivotal GemFire cache cluster as well as a client cache from a cache client.
|
||||
*
|
||||
* @param clientCache {@link ClientCache} instance used by the {@link GemfireAdminOperations} interface
|
||||
* to access the GemFire system.
|
||||
* to access the Pivotal GemFire system.
|
||||
* @return an implementation of the {@link GemfireAdminOperations} interface to perform administrative functions
|
||||
* on a GemFire system.
|
||||
* on a Pivotal GemFire system.
|
||||
* @see org.springframework.data.gemfire.config.admin.GemfireAdminOperations
|
||||
* @see org.apache.geode.cache.client.ClientCache
|
||||
*/
|
||||
@@ -206,10 +206,10 @@ public class ClusterConfigurationConfiguration extends AbstractAnnotationConfigS
|
||||
|
||||
/**
|
||||
* Constructs an instance of {@link SchemaObjectCollector} to inspect the application's context
|
||||
* and find all the GemFire schema objects declared of a particular type or types.
|
||||
* and find all the Pivotal GemFire schema objects declared of a particular type or types.
|
||||
*
|
||||
* @return a new instance of {@link SchemaObjectCollector} to inspect a GemFire system schema
|
||||
* in search of specific GemFire schema objects (e.g. {@link Region} or {@link Index}).
|
||||
* @return a new instance of {@link SchemaObjectCollector} to inspect a Pivotal GemFire system schema
|
||||
* in search of specific Pivotal GemFire schema objects (e.g. {@link Region} or {@link Index}).
|
||||
* @see org.springframework.data.gemfire.config.schema.SchemaObjectCollector
|
||||
*/
|
||||
private SchemaObjectCollector<?> newSchemaObjectCollector() {
|
||||
@@ -221,7 +221,7 @@ public class ClusterConfigurationConfiguration extends AbstractAnnotationConfigS
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an instance of {@link SchemaObjectDefiner} used to reverse engineer a GemFire schema object instance
|
||||
* Constructs an instance of {@link SchemaObjectDefiner} used to reverse engineer a Pivotal GemFire schema object instance
|
||||
* to build a definition.
|
||||
*
|
||||
* @return a new instance of {@link SchemaObjectDefiner}.
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.data.gemfire.listener.ContinuousQueryListenerContaine
|
||||
/**
|
||||
* The {@link ContinuousQueryListenerContainerConfigurer} interfaces defines a contract for implementations to customize
|
||||
* the configuration of SDG's {@link ContinuousQueryListenerContainer} when enabling Continuous Query (CQ) functionality
|
||||
* in Spring Boot, GemFire/Geode cache client applications.
|
||||
* in Spring Boot, Pivotal GemFire/Apache Geode cache client applications.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.data.gemfire.listener.ContinuousQueryListenerContainer
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* The {@link DiskStoreConfiguration} class is a Spring {@link ImportBeanDefinitionRegistrar} used to register
|
||||
* a GemFire/Geode {@link org.apache.geode.cache.DiskStore} bean definition.
|
||||
* a Pivotal GemFire/Apache Geode {@link org.apache.geode.cache.DiskStore} bean definition.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.DiskStore
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.core.type.AnnotationMetadata;
|
||||
|
||||
/**
|
||||
* The {@link DiskStoresConfiguration} class is a Spring {@link org.springframework.context.annotation.ImportBeanDefinitionRegistrar}
|
||||
* used to register multiple GemFire/Geode {@link org.apache.geode.cache.DiskStore} bean definitions.
|
||||
* used to register multiple Pivotal GemFire/Apache Geode {@link org.apache.geode.cache.DiskStore} bean definitions.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.beans.factory.support.BeanDefinitionRegistry
|
||||
|
||||
@@ -24,12 +24,14 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.apache.geode.cache.Region;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
* The {@link EnableAutoRegionLookup} annotation configures a Spring {@link org.springframework.context.annotation.Configuration}
|
||||
* annotated class with the ability to automatically look up and register GemFire {@link org.apache.geode.cache.Region Regions}
|
||||
* which may have be defined in {@literal cache.xml} or by using GemFire's Cluster Configuration Service.
|
||||
* The {@link EnableAutoRegionLookup} annotation configures a Spring {@link Configuration} annotated class
|
||||
* with the ability to automatically look up and register Pivotal GemFire {@link Region Regions}
|
||||
* which may have be defined in {@literal cache.xml} or by using Pivotal GemFire's Cluster Configuration Service.
|
||||
*
|
||||
* This annotation defines the {@code enabled} attribute to allow users to dynamically change the behavior
|
||||
* of auto {@link org.apache.geode.cache.Region} lookup at application configuration time using either a SpEL
|
||||
|
||||
@@ -29,8 +29,8 @@ import org.springframework.data.gemfire.support.GemfireBeanFactoryLocator;
|
||||
|
||||
/**
|
||||
* The {@link EnableBeanFactoryLocator} annotation annotates a Spring {@link Configuration @Configuration} class
|
||||
* enabling SDG's {@link GemfireBeanFactoryLocator} in order to auto-wire and configure GemFire/Geode Objects
|
||||
* declared in GemFire/Geode config.
|
||||
* enabling SDG's {@link GemfireBeanFactoryLocator} in order to auto-wire and configure Pivotal GemFire/Apache Geode Objects
|
||||
* declared in Pivotal GemFire/Apache Geode config.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see java.lang.annotation.Documented
|
||||
|
||||
@@ -31,10 +31,10 @@ import org.springframework.data.gemfire.server.SubscriptionEvictionPolicy;
|
||||
|
||||
/**
|
||||
* The {@link EnableCacheServer} annotation configures a Spring {@link org.springframework.context.annotation.Configuration}
|
||||
* annotated class with a GemFire {@link CacheServer} bean in the Spring application context.
|
||||
* annotated class with a Pivotal GemFire {@link CacheServer} bean in the Spring application context.
|
||||
*
|
||||
* This annotation is used in conjunction with the {@link CacheServerApplication}, or {@link PeerCacheApplication}
|
||||
* annotations to add an additional {@link CacheServer CacheServers} to a GemFire peer cache application
|
||||
* annotations to add an additional {@link CacheServer CacheServers} to a Pivotal GemFire peer cache application
|
||||
* configured with Spring (Data GemFire).
|
||||
*
|
||||
* To add more than 1 {@link CacheServer} to your application, this annotation can be nested in
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
* The {@link EnableCacheServers} annotation enables 1 or more {@link CacheServer CacheServers}
|
||||
* to be defined and used in a peer cache application configured with Spring (Data GemFire/Geode).
|
||||
* to be defined and used in a peer cache application configured with Spring (Data Pivotal GemFire/Apache Geode).
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.server.CacheServer
|
||||
@@ -47,7 +47,7 @@ import org.springframework.context.annotation.Import;
|
||||
public @interface EnableCacheServers {
|
||||
|
||||
/**
|
||||
* Enables the definition of multiple GemFire {@link org.apache.geode.cache.server.CacheServer CacheServers}.
|
||||
* Enables the definition of multiple Pivotal GemFire {@link org.apache.geode.cache.server.CacheServer CacheServers}.
|
||||
*/
|
||||
EnableCacheServer[] servers() default {};
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.springframework.data.gemfire.mapping.annotation.ClientRegion;
|
||||
|
||||
/**
|
||||
* The {@link EnableCachingDefinedRegions} annotation marks a Spring {@link Configuration @Configuration} application
|
||||
* annotated class to enable the creation of GemFire/Geode {@link Region Regions} based on Spring's Cache Abstraction
|
||||
* annotated class to enable the creation of Pivotal GemFire/Apache Geode {@link Region Regions} based on Spring's Cache Abstraction
|
||||
* Annotations applied to application service methods and types.
|
||||
*
|
||||
* Additionally, this annotation enables Spring's Cache Abstraction with SDG's {@link EnableGemfireCaching} annotation,
|
||||
@@ -78,7 +78,7 @@ public @interface EnableCachingDefinedRegions {
|
||||
|
||||
/**
|
||||
* When this annotation is applied to a cache client application, the {@literal poolName} attribute refers to
|
||||
* the default name of the GemFire/Geode {@link Pool} assigned to client {@link Region Region(s)}.
|
||||
* the default name of the Pivotal GemFire/Apache Geode {@link Pool} assigned to client {@link Region Region(s)}.
|
||||
*
|
||||
* This value can be overridden by annotating entities with the {@link ClientRegion} annotation.
|
||||
*
|
||||
|
||||
@@ -30,9 +30,9 @@ import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
* The {@link EnableClusterConfiguration} annotation enables Apache Geode / Pivotal GemFire schema-like definitions
|
||||
* defined in a Spring [Boot], Geode/GemFire cache client application using Spring config to be pushed to
|
||||
* a Geode/GemFire cluster, similar to how schema commands (e.g. `create region`) in Gfsh are processed by
|
||||
* an Geode/GemFire Manager.
|
||||
* defined in a Spring [Boot], Geode/Pivotal GemFire cache client application using Spring config to be pushed to
|
||||
* a Geode/Pivotal GemFire cluster, similar to how schema commands (e.g. `create region`) in Gfsh are processed by
|
||||
* an Geode/Pivotal GemFire Manager.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see java.lang.annotation.Documented
|
||||
@@ -52,7 +52,7 @@ import org.springframework.context.annotation.Import;
|
||||
public @interface EnableClusterConfiguration {
|
||||
|
||||
/**
|
||||
* Configures the bind address used by the Spring, GemFire/Geode cache client application to locate
|
||||
* Configures the bind address used by the Spring, Pivotal GemFire/Apache Geode cache client application to locate
|
||||
* the Manager's HTTP Service and access the Management REST API. This configuration setting is only used
|
||||
* when {@link #useHttp()} is set to {@literal true}.
|
||||
*
|
||||
@@ -64,7 +64,7 @@ public @interface EnableClusterConfiguration {
|
||||
String host() default ClusterConfigurationConfiguration.DEFAULT_MANAGEMENT_HTTP_HOST;
|
||||
|
||||
/**
|
||||
* Configures the port used by the Spring, GemFire/Geode cache client application to locate
|
||||
* Configures the port used by the Spring, Pivotal GemFire/Apache Geode cache client application to locate
|
||||
* the Manager's HTTP Service and access the Management REST API. This configuration setting is only used
|
||||
* when {@link #useHttp()} is set to {@literal true}.
|
||||
*
|
||||
@@ -77,7 +77,7 @@ public @interface EnableClusterConfiguration {
|
||||
|
||||
/**
|
||||
* Configuration setting used to specify the data management policy used when creating {@link Region Regions}
|
||||
* on the servers in the Geode/GemFire cluster.
|
||||
* on the servers in the Geode/Pivotal GemFire cluster.
|
||||
*
|
||||
* The data management policy is expressed with a {@link RegionShortcut}, but corresponds to the various
|
||||
* different {@link DataPolicy DataPolicies} available.
|
||||
@@ -90,7 +90,7 @@ public @interface EnableClusterConfiguration {
|
||||
RegionShortcut serverRegionShortcut() default RegionShortcut.PARTITION;
|
||||
|
||||
/**
|
||||
* Configures whether connectivity between the Spring, GemFire/Geode application should be established using HTTP.
|
||||
* Configures whether connectivity between the Spring, Pivotal GemFire/Apache Geode application should be established using HTTP.
|
||||
*
|
||||
* Alternatively, you can configure this setting using the {@literal spring.data.gemfire.management.use-http}
|
||||
* property in {@literal application.properties}.
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.core.annotation.AliasFor;
|
||||
|
||||
/**
|
||||
* The {@link EnableDiskStore} annotation marks a Spring {@link Configuration @Configuration} annotated {@link Class}
|
||||
* to configure a single GemFire/Geode {@link org.apache.geode.cache.DiskStore} bean in the Spring application context
|
||||
* to configure a single Pivotal GemFire/Apache Geode {@link org.apache.geode.cache.DiskStore} bean in the Spring application context
|
||||
* in which to persist or overflow data from 1 or more cache {@link org.apache.geode.cache.Region Regions}.
|
||||
*
|
||||
* @author John Blum
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user