@@ -50,7 +50,7 @@ abstraction to locate the file. This allows various search patterns to be used,
|
||||
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
|
||||
http://gemfire.docs.pivotal.io/latest/userguide/index.html#reference/topics/gemfire_properties.html[properties]
|
||||
http://gemfire.docs.pivotal.io/docs-gemfire/reference/topics/gemfire_properties.html[properties]
|
||||
using any of Spring's `Properties` support features.
|
||||
|
||||
For example, the developer may use the `properties` element defined in the `util` namespace to define `Properties`
|
||||
@@ -130,15 +130,15 @@ See the GemFire http://gemfire.docs.pivotal.io/docs-gemfire/latest/managing/auto
|
||||
<3> Setting the `use-cluster-configuration` attribute to true (default is false) to enable a GemFire member to retrieve the common, shared Cluster-based configuration from a Locator.
|
||||
See the GemFire http://gemfire.docs.pivotal.io/docs-gemfire/configuring/cluster_config/gfsh_persist.html[product documentation] for more details.
|
||||
<4> An example of a `TransactionListener` callback declaration using a bean reference. The referenced bean must implement
|
||||
http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/TransactionListener.html[TransactionListener].
|
||||
http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/TransactionListener.html[TransactionListener].
|
||||
`TransactionListener(s)` can be implemented to handle transaction related events.
|
||||
<5> An example of a `TransactionWriter` callback declaration using an inner bean declaration this time. The bean must implement
|
||||
http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/TransactionWriter.html[TransactionWriter].
|
||||
http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/TransactionWriter.html[TransactionWriter].
|
||||
`TransactionWriter` is a callback that is allowed to veto a transaction.
|
||||
<6> An example of a `GatewayConflictResolver` declaration using a bean reference. The referenced bean must implement
|
||||
http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/util/GatewayConflictResolver.html[GatewayConflictResolver].
|
||||
http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/util/GatewayConflictResolver.html[GatewayConflictResolver].
|
||||
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.
|
||||
<7> Enable GemFire's http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/DynamicRegionFactory.html[DynamicRegionFactory],
|
||||
<7> Enable GemFire's http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/DynamicRegionFactory.html[DynamicRegionFactory],
|
||||
which provides a distributed region creation service.
|
||||
<8> Declares a JNDI binding to enlist an external DataSource in a GemFire transaction.
|
||||
|
||||
@@ -232,7 +232,7 @@ http://gemfire.docs.pivotal.io/docs-gemfire/configuring/cluster_config/gfsh_pers
|
||||
[[bootstrap:cache:server]]
|
||||
== Configuring a GemFire Cache Server
|
||||
|
||||
_Spring Data GemFire_ includes dedicated support for configuring a http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/server/CacheServer.html[CacheServer],
|
||||
_Spring Data GemFire_ includes dedicated support for configuring a http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/server/CacheServer.html[CacheServer],
|
||||
allowing complete configuration through the Spring container:
|
||||
|
||||
[source,xml]
|
||||
@@ -280,7 +280,7 @@ by the clients connecting right away.
|
||||
== Configuring a GemFire ClientCache
|
||||
|
||||
In addition to defining a GemFire peer http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/Cache.html[Cache],
|
||||
_Spring Data GemFire_ also supports the definition of a GemFire http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/client/ClientCache.html[ClientCache]
|
||||
_Spring Data GemFire_ also supports the definition of a GemFire http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/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`.
|
||||
|
||||
@@ -317,7 +317,7 @@ to the cache definition:
|
||||
----
|
||||
|
||||
The `<client-cache>` element also includes the `ready-for-events` attribute. If set to `true`, the client cache
|
||||
initialization will include a call to http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/client/ClientCache.html#readyForEvents()[ClientCache.readyForEvents()].
|
||||
initialization will include a call to http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/client/ClientCache.html#readyForEvents()[ClientCache.readyForEvents()].
|
||||
|
||||
Client-side configuration is covered in more detail in <<bootstrap:region:client>>.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ The container is fully customizable - one can chose either to use the CQ thread
|
||||
[[apis:cq-container:adapter]]
|
||||
== The `ContinuousQueryListenerAdapter` and `ContinuousQueryListener`
|
||||
|
||||
The `ContinuousQueryListenerAdapter` class is the final component in Spring Data GemFire CQ support: in a nutshell, it allows you to expose almost *any* class as a EDP (there are of course some constraints) - it implements `ContinuousQueryListener`, a simpler listener interface similar to GemFire http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/query/CqListener.html[CqListener].
|
||||
The `ContinuousQueryListenerAdapter` class is the final component in Spring Data GemFire CQ support: in a nutshell, it allows you to expose almost *any* class as a EDP (there are of course some constraints) - it implements `ContinuousQueryListener`, a simpler listener interface similar to GemFire http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/query/CqListener.html[CqListener].
|
||||
|
||||
Consider the following interface definition. Notice the various event handling methods and their parameters:
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ For GemFire, Spring Data GemFire provides a dedicated, per-cache, transaction ma
|
||||
|
||||
NOTE: The example above can be simplified even more by eliminating the `cache-ref` attribute if the GemFire Cache is defined under the default name`gemfireCache`. As with the other Spring Data GemFire namespace elements, if the Cache bean name is not configured, the aforementioned naming convention will used. Additionally, the transaction manager name is`gemfireTransactionManager` if not explicitly specified.
|
||||
|
||||
Currently, GemFire supports optimistic transactions with *read committed* isolation. Furthermore, to guarantee this isolation, developers should avoid making *in-place* changes that manually modify values present in the Cache. To prevent this from happening, the transaction manager configures the Cache to use *copy on read* semantics, meaning a clone of the actual value is created, each time a read is performed. This behavior can be disabled if needed through the `copyOnRead` property. For more information on the semantics of the underlying GemFire transaction manager, see the GemFire http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/CacheTransactionManager.html[documentation].
|
||||
Currently, GemFire supports optimistic transactions with *read committed* isolation. Furthermore, to guarantee this isolation, developers should avoid making *in-place* changes that manually modify values present in the Cache. To prevent this from happening, the transaction manager configures the Cache to use *copy on read* semantics, meaning a clone of the actual value is created, each time a read is performed. This behavior can be disabled if needed through the `copyOnRead` property. For more information on the semantics of the underlying GemFire transaction manager, see the GemFire http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/CacheTransactionManager.html[documentation].
|
||||
|
||||
:leveloffset: +1
|
||||
include::{basedocdir}/reference/cq-container.adoc[]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Spring Data GemFire 1.3.0 introduces annotation support to simplify working with
|
||||
http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/function_exec/chapter_overview.html[GemFire Function Execution].
|
||||
The GemFire API provides classes to implement and register http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/Function.html[Functions]
|
||||
The GemFire API provides classes to implement and register http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/Function.html[Functions]
|
||||
deployed to Cache servers that may be invoked remotely by member applications, typically cache clients.
|
||||
Functions may execute in parallel, distributed among multiple servers, combining results in a map-reduce pattern,
|
||||
or may be targeted at a single server. A Function execution may be also be targeted to a specific Region.
|
||||
@@ -21,14 +21,14 @@ the ability to invoke registered Functions remotely via annotated interfaces.
|
||||
== Implementation vs Execution
|
||||
|
||||
There are two separate concerns to address. First is the Function implementation (server) which must interact with
|
||||
the http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/FunctionContext.html[FunctionContext]
|
||||
to obtain the invocation arguments, the http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/ResultSender.html[ResultsSender]
|
||||
the http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/FunctionContext.html[FunctionContext]
|
||||
to obtain the invocation arguments, the http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/ResultSender.html[ResultsSender]
|
||||
and other execution context information. The Function implementation typically accesses the Cache and or Region
|
||||
and is typically registered with the http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/FunctionService.html[FunctionService]
|
||||
and is typically registered with the http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/FunctionService.html[FunctionService]
|
||||
under a unique Id. The application invoking a Function (the client) does not depend on the implementation. To invoke
|
||||
a Function remotely, the application instantiates an http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/Execution.html[Execution]
|
||||
a Function remotely, the application instantiates an http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/Execution.html[Execution]
|
||||
providing the Function ID, invocation arguments, the Function target or scope (Region, server, servers,
|
||||
member, members). If the Function produces a result, the invoker uses a http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/ResultCollector.html[ResultCollector]
|
||||
member, members). If the Function produces a result, the invoker uses a http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/ResultCollector.html[ResultCollector]
|
||||
to aggregate and acquire the execution results. In certain scenarios, a custom ResultCollector implementation
|
||||
is required and may be registered with the Execution.
|
||||
|
||||
@@ -170,7 +170,7 @@ To support client-side Function execution, the following annotations are provide
|
||||
`@OnServers`, `@OnMember`, `@OnMembers`. These correspond to the Execution implementations GemFire's FunctionService
|
||||
provides. Each annotation exposes the appropriate attributes. These annotations also provide an optional
|
||||
`resultCollector` attribute whose value is the name of a Spring bean implementing
|
||||
http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/ResultCollector.html[ResultCollector]
|
||||
http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/ResultCollector.html[ResultCollector]
|
||||
to use for the execution.
|
||||
|
||||
NOTE: The proxy interface binds all declared methods to the same execution configuration. Although it is expected
|
||||
@@ -348,7 +348,7 @@ But, in actuality, what GemFire executes the Function on the Server is...
|
||||
process(regionData, order:PdxInstance, :PdxInstanceEnum, 400);
|
||||
----
|
||||
|
||||
Notice that the `Order` and `OrderSource` have passed to the Function as http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/pdx/PdxInstance.html[PDX instances].
|
||||
Notice that the `Order` and `OrderSource` have passed to the Function as http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/pdx/PdxInstance.html[PDX instances].
|
||||
Again, this is all because `read-serialized` is set to true on the GemFire Server, which may be necessary in cases
|
||||
where the GemFire Servers are interacting with multiple different client types (e.g. native clients).
|
||||
|
||||
@@ -370,7 +370,7 @@ where the SDG annotated POJO Function is registered and used, e.g. ...
|
||||
<gfe:cache ... pdx-serializer-ref="customPdxSerializeer" pdx-read-serialized="true"/>
|
||||
----
|
||||
|
||||
Alternatively, a developer my use GemFire's http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/pdx/ReflectionBasedAutoSerializer.html[ReflectionBasedAutoSerializer].
|
||||
Alternatively, a developer my use GemFire's http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/pdx/ReflectionBasedAutoSerializer.html[ReflectionBasedAutoSerializer].
|
||||
Of course, it is recommend to use a "custom" `PdxSerializer` where possible to maintain finer grained control over your
|
||||
serialization strategy.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[[bootstrap:function]]
|
||||
= Configuring GemFire's Function Service
|
||||
|
||||
As of Release 1.3.0, Spring Data GemFire provides <<function-annotations,annotation>> support for implementing and registering functions. Spring Data GemFire also provides namespace support for registering GemFire http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/Function.html[Functions] for remote function execution. Please refer to the GemFire documentation for more information on the function execution framework. Functions are declared as Spring beans and must implement the `com.gemstone.gemfire.cache.execute.Function` interface or extend `com.gemstone.gemfire.cache.execute.FunctionAdapter`. The namespace uses a familiar pattern to declare functions:
|
||||
As of Release 1.3.0, Spring Data GemFire provides <<function-annotations,annotation>> support for implementing and registering functions. Spring Data GemFire also provides namespace support for registering GemFire http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/execute/Function.html[Functions] for remote function execution. Please refer to the GemFire documentation for more information on the function execution framework. Functions are declared as Spring beans and must implement the `com.gemstone.gemfire.cache.execute.Function` interface or extend `com.gemstone.gemfire.cache.execute.FunctionAdapter`. The namespace uses a familiar pattern to declare functions:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
@@ -223,7 +223,7 @@ The following table(s) list attributes available for various region types:
|
||||
| Indicates whether the Region persists entries to a Disk Store (disk).
|
||||
|
||||
| shorcut
|
||||
| *See http://gemfire.docs.pivotal.io/7.0.2/javadocs/japi/com/gemstone/gemfire/cache/RegionShortcut.html
|
||||
| *See http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/RegionShortcut.html
|
||||
| The RegionShortcut for this Region. Allows easy initialization of the region based on pre-defined defaults.
|
||||
|
||||
| statistics
|
||||
@@ -243,7 +243,7 @@ The following table(s) list attributes available for various region types:
|
||||
=== Cache Listeners
|
||||
|
||||
`CacheListeners` are registered with a Region to handle Region events such as entries being created, updated, destroyed,
|
||||
etc. A `CacheListener` can be any bean that implements the http://gemfire.docs.pivotal.io/7.0.2/javadocs/japi/com/gemstone/gemfire/cache/CacheListener.html[`CacheListener`] interface.
|
||||
etc. A `CacheListener` can be any bean that implements the http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/CacheListener.html[`CacheListener`] interface.
|
||||
A Region may have multiple listeners, declared using the `cache-listener` element enclosed in a `*-region` element.
|
||||
|
||||
In the example below, there are two `CacheListener's` declared. The first references a top-level named Spring bean;
|
||||
@@ -279,7 +279,7 @@ are mutually exclusive and using both on the same element will result in an exce
|
||||
|
||||
<bean id="c-listener" class="some.pkg.SimpleCacheListener"/>
|
||||
</beans>
|
||||
|
||||
|
||||
----
|
||||
|
||||
.Bean Reference Conventions
|
||||
@@ -303,7 +303,7 @@ from an external data source, a database for example. A `CacheWriter` is invoked
|
||||
intended for synchronizing to an external data source. The difference is GemFire only supports at most a single instance
|
||||
of each for each Region. However, either declaration style may be used.
|
||||
|
||||
See http://gemfire.docs.pivotal.io/7.0.2/javadocs/japi/com/gemstone/gemfire/cache/CacheLoader.html[`CacheLoader`] and http://gemfire.docs.pivotal.io/7.0.2/javadocs/japi/com/gemstone/gemfire/cache/CacheWriter.html[`CacheWriter`] for more details.
|
||||
See http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/CacheLoader.html[`CacheLoader`] and http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/CacheWriter.html[`CacheWriter`] for more details.
|
||||
|
||||
[[bootstrap:region:common:subregions]]
|
||||
=== Subregions
|
||||
@@ -563,7 +563,7 @@ To enable persistence with Spring Data GemFire, simply set the `persistent` attr
|
||||
|
||||
IMPORTANT: Persistence for partitioned regions is supported from GemFire 6.5 onwards - configuring this option on a previous release will trigger an initialization exception.
|
||||
|
||||
Persistence may also be configured using the `data-policy` attribute, set to one of http://gemfire.docs.pivotal.io/7.0.2/javadocs/japi/com/gemstone/gemfire/cache/DataPolicy.html[GemFire's data policy settings]. For instance...
|
||||
Persistence may also be configured using the `data-policy` attribute, set to one of http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/DataPolicy.html[GemFire's data policy settings]. For instance...
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
@@ -686,7 +686,7 @@ Region Expiration using the SDG XML namespace, like so...
|
||||
----
|
||||
====
|
||||
|
||||
Spring Data GemFire's @Expiration annotation support is implemented with GemFire's http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/CustomExpiry.html[`CustomExpiry`] interface.
|
||||
Spring Data GemFire's @Expiration annotation support is implemented with GemFire's http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/CustomExpiry.html[`CustomExpiry`] interface.
|
||||
See http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/expiration/configuring_data_expiration.html[GemFire's User Guide] for more details
|
||||
|
||||
The Spring Data GemFire `AnnotationBasedExpiration` class (and `CustomExpiry` implementation) is specifically responsible
|
||||
@@ -971,7 +971,7 @@ A special key `ALL_KEYS` means interest is registered for all keys (identical to
|
||||
[[bootstrap:region:json]]
|
||||
== JSON Support
|
||||
|
||||
Gemfire 7.0 introduced support for caching JSON documents with OQL query support. These are stored internally as http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/pdx/PdxInstance.html[PdxInstance] types using the http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/pdx/JSONFormatter.html[JSONFormatter] to perform conversion to and from JSON strings. Spring Data GemFire provides a `<gfe-data:json-region-autoproxy/>` tag to enable a http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#aop-introduction[AOP with Spring] component to advise appropriate 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.
|
||||
Gemfire 7.0 introduced support for caching JSON documents with OQL query support. These are stored internally as http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/pdx/PdxInstance.html[PdxInstance] types using the http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/pdx/JSONFormatter.html[JSONFormatter] to perform conversion to and from JSON strings. Spring Data GemFire provides a `<gfe-data:json-region-autoproxy/>` tag to enable a http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#aop-introduction[AOP with Spring] component to advise appropriate 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.
|
||||
|
||||
By default, `<gfe-data:json-region-autoproxy/>` will perform the conversion on all regions. To apply this feature to selected regions, provide a comma delimited list of their ids via the `region-refs` attribute. Other attributes include a `pretty-print` flag (false by default) and `convert-returned-collections`. 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<java.util.Map.Entry<?,?>> is not affected.
|
||||
|
||||
|
||||
@@ -165,22 +165,22 @@ Currently, the set of OQL Query language extensions that are supported by Spring
|
||||
| Description
|
||||
| Arguments
|
||||
|
||||
| http://gemfire.docs.pivotal.io/latest/userguide/developing/query_index/query_index_hints.html#topic_cfb_mxn_jq[HINT]
|
||||
| http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/query_index/query_index_hints.html#topic_cfb_mxn_jq[HINT]
|
||||
| `@Hint`
|
||||
| OQL Query Index Hints
|
||||
| `String[]` (e.g. @Hint({ "IdIdx", "TxDateIdx" }))
|
||||
|
||||
| http://gemfire.docs.pivotal.io/latest/userguide/developing/query_select/the_import_statement.html#concept_2E9F15B2FE9041238B54736103396BF7[IMPORT]
|
||||
| http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/query_select/the_import_statement.html#concept_2E9F15B2FE9041238B54736103396BF7[IMPORT]
|
||||
| `@Import`
|
||||
| Qualify application-specific types.
|
||||
| `String` (e.g. @Import("org.example.app.domain.Type"))
|
||||
|
||||
| http://gemfire.docs.pivotal.io/latest/userguide/developing/query_select/the_select_statement.html#concept_85AE7D6B1E2941ED8BD2A8310A81753E__section_25D7055B33EC47B19B1B70264B39212F[LIMIT]
|
||||
| http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/query_select/the_select_statement.html#concept_85AE7D6B1E2941ED8BD2A8310A81753E__section_25D7055B33EC47B19B1B70264B39212F[LIMIT]
|
||||
| `@Limit`
|
||||
| Limit the returned query result set.
|
||||
| `Integer` (e.g. @Limit(10); default is Integer.MAX_VALUE)
|
||||
|
||||
| http://gemfire.docs.pivotal.io/latest/userguide/developing/query_additional/query_debugging.html#concept_2D557E24AAB24044A3DB36B3124F6748[TRACE]
|
||||
| http://gemfire.docs.pivotal.io/docs-gemfire/latest/developing/query_additional/query_debugging.html#concept_2D557E24AAB24044A3DB36B3124F6748[TRACE]
|
||||
| `@Trace`
|
||||
| Enable OQL Query specific debugging.
|
||||
| NA
|
||||
|
||||
@@ -6,7 +6,7 @@ To improve overall performance of the data grid, GemFire supports a dedicated se
|
||||
[[serialization:wiring]]
|
||||
== Wiring deserialized instances
|
||||
|
||||
It is fairly common for serialized objects to have transient data. Transient data is often dependent on the node or environment where it lives at a certain point in time, for example a DataSource. 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 http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/Instantiator.html[`Instantiator`] that performs wiring for each new instance created by GemFire during deserialization.
|
||||
It is fairly common for serialized objects to have transient data. Transient data is often dependent on the node or environment where it lives at a certain point in time, for example a DataSource. 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 http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/Instantiator.html[`Instantiator`] that performs wiring for each new instance created by 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 (Spring users might find this approach similar to that of http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#aop-atconfigurable[`@Configurable`]). The `WiringInstantiator` works just like `WiringDeclarableSupport`, trying to first locate a bean definition as a wiring template and following to autowiring otherwise. Please refer to the previous section (<<apis:declarable>>) for more details on wiring functionality.
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[[bootstrap:snapshot]]
|
||||
= Using the GemFire Snapshot Service
|
||||
|
||||
Spring Data GemFire supports `Cache` and `Region` snapshots using http://gemfire.docs.pivotal.io/docs-gemfire/latest/managing/cache_snapshots/chapter_overview.html[GemFire's Snapshot Service].
|
||||
The out-of-the-box Snapshot Service support offers several convenient features to simply the use of GemFire's http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/CacheSnapshotService.html[Cache]
|
||||
and http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/RegionSnapshotService.html[Region] Snapshot Service APIs.
|
||||
Spring Data GemFire supports `Cache` and `Region` snapshots using http://gemfire81.docs.pivotal.io/latest/userguide/index.html#managing/cache_snapshots/chapter_overview.html[GemFire's Snapshot Service].
|
||||
The out-of-the-box Snapshot Service support offers several convenient features to simply the use of GemFire's http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/CacheSnapshotService.html[Cache]
|
||||
and http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/RegionSnapshotService.html[Region] Snapshot Service APIs.
|
||||
|
||||
As http://gemfire.docs.pivotal.io/docs-gemfire/latest/managing/cache_snapshots/chapter_overview.html[GemFire documentation] describes,
|
||||
snapshots allow you to save and subsequently reload the data later, which can be useful for moving data between environments,
|
||||
@@ -55,7 +55,7 @@ It is also straightforward to define a snapshot service for a GemFire Region by
|
||||
|
||||
When the `region-ref` attribute is specified the Spring Data GemFire `SnapshotServiceFactoryBean` resolves
|
||||
the `region-ref` attribute to a Region bean defined in the Spring context and then proceeds to create a
|
||||
http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/RegionSnapshotService.html[RegionSnapshotService].
|
||||
http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/RegionSnapshotService.html[RegionSnapshotService].
|
||||
Again, the snapshot import and export definitions function the same way, however, the `location` must refer to a file
|
||||
on export.
|
||||
|
||||
@@ -70,9 +70,9 @@ This is useful when data exported from 1 Region is used to feed the import of an
|
||||
[[bootstrap:snapshot:location]]
|
||||
== Snapshot Location
|
||||
|
||||
For a `Cache`-based SnapshotService (i.e. a GemFire http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/CacheSnapshotService.html[CacheSnapshotService])
|
||||
For a `Cache`-based SnapshotService (i.e. a GemFire http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/CacheSnapshotService.html[CacheSnapshotService])
|
||||
a developer would typically pass it a directory containing all the snapshot files to load rather than individual snapshot files,
|
||||
as the overloaded http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/CacheSnapshotService.html#load(java.io.File,%20com.gemstone.gemfire.cache.snapshot.SnapshotOptions.SnapshotFormat)[load] method
|
||||
as the overloaded http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/CacheSnapshotService.html#load(java.io.File,%20com.gemstone.gemfire.cache.snapshot.SnapshotOptions.SnapshotFormat)[load] method
|
||||
in the `CacheSnapshotService` API indicates.
|
||||
|
||||
NOTE: Of course, a developer may use the other, overloaded `load(:File[], :SnapshotFormat, :SnapshotOptions)` method
|
||||
@@ -97,7 +97,7 @@ Spring Data GemFire will conveniently extract the provided ZIP file and treat it
|
||||
== Snapshot Filters
|
||||
|
||||
The real power of defining multiple snapshot imports and exports is realized through the use of snapshot filters.
|
||||
Snapshot filters implement GemFire's http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/SnapshotFilter.html[SnapshotFilter] interface
|
||||
Snapshot filters implement GemFire's http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/SnapshotFilter.html[SnapshotFilter] interface
|
||||
and are used to filter Region entries for inclusion into the Region on import and for inclusion into the snapshot on export.
|
||||
|
||||
Spring Data GemFire makes it brain dead simple to utilize snapshot filters on import and export using the `filter-ref`
|
||||
@@ -130,7 +130,7 @@ attribute or an anonymous, nested bean definition:
|
||||
----
|
||||
|
||||
In addition, more complex snapshot filters can be expressed with the `ComposableSnapshotFilter` Spring Data GemFire class.
|
||||
This class implements GemFire's http://gemfire.docs.pivotal.io/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/SnapshotFilter.html[SnapshotFilter] interface
|
||||
This class implements GemFire's http://data-docs-samples.cfapps.io/docs-gemfire/latest/javadocs/japi/com/gemstone/gemfire/cache/snapshot/SnapshotFilter.html[SnapshotFilter] interface
|
||||
as well as the https://en.wikipedia.org/wiki/Composite_pattern[Composite] software design pattern. In a nutshell, the
|
||||
https://en.wikipedia.org/wiki/Composite_pattern[Composite] design pattern allows developers to compose multiple objects
|
||||
of the same type and treat the conglomerate as single instance of the object type, a very powerful and useful abstraction
|
||||
|
||||
Reference in New Issue
Block a user