Updated reference and JSON support for GemfireTemplate queries

This commit is contained in:
David Turanski
2013-03-13 18:00:15 -04:00
parent fb18299759
commit 0e81e9d4c8
14 changed files with 382 additions and 106 deletions

View File

@@ -17,7 +17,7 @@
</note>
<section id="new-in-1-3-0">
<title>New in the 1.3.0.Release</title>
<title>New in the 1.3.0 Release</title>
<itemizedlist>
<listitem>
@@ -29,9 +29,25 @@
</listitem>
<listitem>
<para>A <tag>&lt;datasource&gt;</tag> tag has been added to the
<para>We have added a <tag>&lt;datasource&gt;</tag> tag to the
<emphasis>gfe-data</emphasis> XML namespace. This simplifies
establishing a basic client <link linkend="data-access:datasource">connection</link> to a GemFire data grid.</para>
establishing a basic client <link
linkend="data-access:datasource">connection</link> to a GemFire data
grid.</para>
</listitem>
<listitem>
<para>To <link linkend="bootstrap:region:json">support JSON</link> features introduced in GemFire 7.0, we have
added a ,<tag>&lt;json-region-autoproxy&gt;</tag> tag to the <emphasis>gfe-data</emphasis> XML
namespace, enabling Spring AOP to perform the necessary conversions
automatically on region operations.</para>
</listitem>
<listitem>
<para>Upgraded to GemFire 7.0.1 and added namespace support for new AsyncEventQueue attributes</para>
</listitem>
<listitem>
<para>Added support for setting subscription interest policy on regions</para>
</listitem>
</itemizedlist>
</section>

View File

@@ -117,6 +117,7 @@
pdx-read-serialized="false"
message-sync-interval="1"
search-timeout="300"
close="false"
&gt;
<co id="gfe#transaction#listener"/>&lt;gfe:transaction-listener ref="myTransactionListener"/&gt;

View File

@@ -3,35 +3,37 @@
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
>
<title>Document structure</title>
xmlns:ns5="http://www.w3.org/2000/svg"
xmlns:ns4="http://www.w3.org/1998/Math/MathML"
xmlns:ns3="http://www.w3.org/1999/xhtml"
xmlns:ns="http://docbook.org/ns/docbook">
<title>Document structure</title>
<para>The following chapters explain the core functionality offered by
Spring Data GemFire.</para>
<para>The following chapters explain the core functionality offered by
Spring Data GemFire.</para>
<para><xref linkend="bootstrap"/> describes the configuration support
provided for bootstrapping, initializing, configuring, and accessing
GemFire caches, cache servers, regions, and related distributed system
components</para>
<para><xref linkend="bootstrap"/> describes the configuration support
provided for bootstrapping, initializing, configuring, and accessing GemFire
caches, cache servers, regions, and related distributed system
components</para>
<para><xref linkend="apis"/> explains the integration between the GemFire
APIs and the various data access features available in Spring, such as
transaction management and exception translation.</para>
<para><xref linkend="apis"/> explains the integration between the GemFire
APIs and the various data access features available in Spring, such as
transaction management and exception translation.</para>
<para><xref linkend="serialization"/> describes the enhancements for
GemFire (de)serialization and management of associated objects.</para>
<para><xref linkend="serialization"/> describes the enhancements for GemFire
(de)serialization and management of associated objects.</para>
<para><xref linkend="mapping"/> describes persistence mapping for POJOs
stored in GemFire using Spring Data</para>
<para><xref linkend="mapping"/> describes persistence mapping for POJOs
stored in GemFire using Spring Data</para>
<para><xref linkend="gemfire-repositories"/> describes how to create and
use GemFire Repositories using Spring Data</para>
<para><xref linkend="gemfire-repositories"/> describes how to create and use
GemFire Repositories using Spring Data</para>
<para><xref linkend="function-annotations"/> describes how to create and
use GemFire Functions using Spring Data</para>
<para><xref linkend="function-annotations"/> describes how to create and use
GemFire Functions using Spring Data</para>
<para><xref linkend="samples"/> describes the samples provided with the
distribution to illustrate the various features available in Spring
GemFire.</para>
</chapter>
<para><xref linkend="samples"/> describes the samples provided with the
distribution to illustrate the various features available in Spring Data
GemFire.</para>
</chapter>

View File

@@ -125,9 +125,7 @@
<title>Common Region Attributes</title>
<para>The following table(s) list attributes available for various
region types:
<table
id="bootstrap:region:common:attributes:table">
region types: <table id="bootstrap:region:common:attributes:table">
<title>Common Region Attributes</title>
<tgroup cols="3">
@@ -163,7 +161,7 @@
<entry>close</entry>
<entry spanname="values">
<emphasis>boolean, default:true</emphasis>
<emphasis>boolean, default:false (Note: The default was true prior to 1.3.0)</emphasis>
</entry>
<entry spanname="description">Indicates whether the region
@@ -499,7 +497,17 @@
<para>This is discussed further in <xref
linkend="bootstrap-diskstore"/></para>
</section>
<section id="bootstrap:region:subscription">
<title>Subscription Interest Policy</title>
<para>GemFire allows configuration of subscriptions to control <ulink url="http://pubs.vmware.com//vfabricNoSuite/topic/com.vmware.vfabric.gemfire.7.0/developing/events/configure_p2p_event_messaging.html">peer to peer event handling</ulink>.
Spring Data GemFire provides a <tag>&lt;gfe:subscription/&gt;</tag> to set the interest policy on replicated and partitioned regions to either <literal>ALL</literal> or <literal>CACHE_CONTENT</literal>.
</para>
<programlisting language="xml">&lt;gfe:partitioned-region id="subscription-partition"&gt;
&lt;gfe:subscription type="CACHE_CONTENT"/&gt;
&lt;/gfe:partitioned-region&gt;</programlisting>
</section>
<section id="bootstrap:region:eviction">
<title>Data Eviction and Overflowing</title>
@@ -782,7 +790,7 @@ and a nested resolver declaration --&gt;
client region while the latter defines connection pools to be used/shared
by the various client regions.</para>
<para>Below is a typical client region configuration:</para>
<para>Below is a typical client region configuration:G</para>
<programlisting language="xml">&lt;!-- client region using the default client-cache pool --&gt;
&lt;gfe:client-region id="simple"&gt;
@@ -847,4 +855,30 @@ and a nested resolver declaration --&gt;
details.</para>
</section>
</section>
<section id="bootstrap:region:json">
<title>JSON Support</title>
<para>Gemfire 7.0 introduced support for caching JSON documents with OQL
query support. These are stored internally as <ulink url="http://www.vmware.com/support/developer/vfabric-gemfire/700-api/com/gemstone/gemfire/pdx/PdxInstance.html">PdxInstance</ulink> types using the
<ulink url="http://www.vmware.com/support/developer/vfabric-gemfire/700-api/com/gemstone/gemfire/pdx/JSONFormatter.html">JSONFormatter</ulink> to perform conversion to and from JSON strings. Spring Data
GemFire provides a <tag>&lt;gfe-data:json-region-autoproxy/&gt;</tag> tag to enable a
<ulink url="http://static.springsource.org/spring/docs/current/spring-framework-reference/htmlsingle/#aop-introduction">Spring AOP</ulink> component to advise appropropriate region operations, effectively
encapsulating the JSONFormatter, allowing your application to work directly
with JSON strings. In addition, Java objects written to JSON configured regions will
be automatically converted to JSON using the Jackson ObjectMapper. Reading these values will return a JSON string.
</para>
<para>
By default, <tag>&lt;gfe-data:json-region-autoproxy/&gt;</tag> will perform the conversion on all regions. To apply this feature to selected regions, provide a comma delimited list of
their ids via the <literal>region-refs</literal> attribute. Other attributes include a
<literal>pretty-print</literal> flag (false by default) and <literal>convert-returned-collections</literal>. By default the results of region
operations getAll() and values() will be converted for configured
regions. This is done by creating a parallel structure in local memory. This can incur significant overhead for large collections. Set this
flag to false to disable automatic conversion for these operation.
<note>Certain region operations, specifically those that use 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&lt;java.util.Map.Entry&lt;?,?&gt;&gt; is not affected.</note>
</para>
<para>This feature also works with seamlessly with GemfireTemplate operations, currently native QueryService operations are not supported.
</para>
</section>
</section>