diff --git a/README.md b/README.md index dcfe4e03..3f8a3583 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,8 @@ dependencies { } ~~~~~ -Latest GA release is _1.2.1.RELEASE_ +Latest GA release is _1.2.1.RELEASE_ +Latest Milestone release is _1.3.0.M1_ Latest nightly build is _1.3.0.BUILD-SNAPSHOT_ diff --git a/build.gradle b/build.gradle index 64ecefce..3892cca3 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,7 @@ buildscript { maven { url 'http://repo.springsource.org/plugins-release' } } dependencies { - // classpath 'org.springframework.build.gradle:bundlor-plugin:0.1.2' - classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.1.5' + classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.2.4' } } @@ -103,11 +102,7 @@ javadoc { title = "${rootProject.description} ${version} API" } -/* -bundlor { - manifestTemplate = file("${projectDir}/template.mf").text -} -*/ + jar { manifest.attributes['Implementation-Title'] = 'spring-data-gemfire' manifest.attributes['Implementation-Version'] = project.version diff --git a/docs/src/reference/docbook/index.xml b/docs/src/reference/docbook/index.xml index 3a985ef7..13911fa5 100644 --- a/docs/src/reference/docbook/index.xml +++ b/docs/src/reference/docbook/index.xml @@ -4,7 +4,7 @@ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink"> - Spring Data Gemfire Reference Guide + Spring Data GemFire Reference Guide ${version} Spring Data GemFire ${version} Spring Data GemFire diff --git a/docs/src/reference/docbook/introduction/new-features.xml b/docs/src/reference/docbook/introduction/new-features.xml index db26aa34..19e9bf42 100644 --- a/docs/src/reference/docbook/introduction/new-features.xml +++ b/docs/src/reference/docbook/introduction/new-features.xml @@ -16,6 +16,26 @@ project. +
+ New in the 1.3.0.Release + + + + Annotation support for GemFire functions. It is now possible to + declare and register functions written as POJOs with annotations. In + addition function executions are defined as annotated interfaces, + similar to the way Spring Data repositories work. See + + + + A <datasource> tag has been added to the + gfe-data XML namespace. This simplifies + establishing a basic client connection to a GemFire data grid. + + +
+
New in the 1.2.1 Release @@ -26,20 +46,6 @@
-
- New in the 1.3.0.Release - - - Annotation support for GemFire functions. It is now possible to declare and register functions written as POJOs with annotations. - In addition function executions are defined as annotated interfaces, similar to the way Spring Data repositories work. See - - - A datasource tag has been added to the gfe-data XML namespace. This simplifies establishing - a basic client connection to a Cache cluster. - - -
New in the 1.2.0 Release diff --git a/docs/src/reference/docbook/reference/bootstrap.xml b/docs/src/reference/docbook/reference/bootstrap.xml index 86de6a5a..8f3dc6bd 100644 --- a/docs/src/reference/docbook/reference/bootstrap.xml +++ b/docs/src/reference/docbook/reference/bootstrap.xml @@ -24,7 +24,7 @@ Advantages of using Spring over GemFire <literal>cache.xml</literal> - As of release 1.2.0, Spring Data Gemfire's XML namespace + As of release 1.2.0, Spring Data GemFire's XML namespace supports full configuration of the data grid. In fact, the Spring namespace is considered the preferred way to configure GemFire. GemFire will continue to support cache.xml for legacy @@ -56,7 +56,7 @@
Using the Core Spring Data GemFire Namespace - To simplify configuration, Spring Data Gemfire provides a dedicated + To simplify configuration, Spring Data GemFire provides a dedicated XML namespace for configuring core GemFire components. It is also possible to configure the beans directly through Springs standard <bean> definition. However, as of Spring Data GemFire 1.2.0, all bean properties @@ -163,6 +163,8 @@ + +
diff --git a/docs/src/reference/docbook/reference/cache.xml b/docs/src/reference/docbook/reference/cache.xml index 8711499d..63dc308b 100644 --- a/docs/src/reference/docbook/reference/cache.xml +++ b/docs/src/reference/docbook/reference/cache.xml @@ -294,7 +294,7 @@ to use a different pool. Pools can be defined through the pool element; - The client side pools can be used to configure + The client side pool can be used to configure connectivity to the server for individual entities or for the entire cache. For example, to customize the default pool used by client-cache, one needs to define a pool and wire it to @@ -309,6 +309,10 @@ </beans>
+ The <client-cache> tag also includes a ready-for-events + attribute. If set to true, the client cache initialization will include + ClientCache.readyForEvents(). + Client side configuration is covered in more detail in .
diff --git a/docs/src/reference/docbook/reference/client.xml b/docs/src/reference/docbook/reference/client.xml deleted file mode 100644 index 2014771e..00000000 --- a/docs/src/reference/docbook/reference/client.xml +++ /dev/null @@ -1,4 +0,0 @@ - -
- Cache Client Configuration -
\ No newline at end of file diff --git a/docs/src/reference/docbook/reference/data-access.xml b/docs/src/reference/docbook/reference/data-access.xml new file mode 100644 index 00000000..122572ec --- /dev/null +++ b/docs/src/reference/docbook/reference/data-access.xml @@ -0,0 +1,51 @@ + +
+ Using the GemFire Data Access Namespace + + In addition to the core gfe namespace, Spring Data + GemFire provides a gfe-data namespace intended primarily + to simplify the development of GemFire client applications. This namespace + currently supports for GemFire repositories and function execution and a + <datasource> tag that offers a convenient way to connect to + the data grid. + +
+ An Easy Way to Connect to GemFire + + For many applications, A basic connection to a GemFire grid, using + default values is sufficient. Spring Data GemFire's <datasource> tag + provides a simple way to access data. The data source creates a client + cache and connection pool. In addition, it will query the member servers + for all existing root regions and create a proxy (empty) client region for + each one. + + <gfe-data:datasource> + <locator host="somehost" port="1234"/> +</gfe-data:datasource> + + The datasource tag is synactically similar to <gfe:pool>. + It may be configured with one or more locator or server tags to connect to + an existing data grid. Additionally, all attributes available to configure + a pool are supported. This configuration will automatically create + ClientRegion beans for each region defined on members connected to the + locator, so they may be seamlessly referenced by Spring Data mapping + annotations, GemfireTemplate, and wired into application + classes. + + Of course, you can explicitly configure client regions. For + example, if you want to cache data in local memory: <gfe-data:datasource> + <locator host="somehost" port="1234"/> +</gfe-data:datasource> + +<gfe:client-region id="Customer" shortcut="CACHING_PROXY"/> +
+
diff --git a/docs/src/reference/docbook/reference/function-annotations.xml b/docs/src/reference/docbook/reference/function-annotations.xml index 353647b6..53964d8a 100644 --- a/docs/src/reference/docbook/reference/function-annotations.xml +++ b/docs/src/reference/docbook/reference/function-annotations.xml @@ -1,7 +1,7 @@ - + Annotation Support for Function Execution
@@ -9,7 +9,7 @@ Spring Data GemFire 1.3.0 introduces annotation support to simplify working with GemFire + url="http://pubs.vmware.com/vfabricNoSuite/index.jsp?topic=/com.vmware.vfabric.gemfire.7.0/developing/function_exec/chapter_overview.html??">GemFire function execution. The GemFire API provides classes to implement and register Functions @@ -69,7 +69,7 @@
Implementing a Function - Using Gemfire APIs, the FunctionContext provides a runtime + Using GemFire APIs, the FunctionContext provides a runtime invocation context including the client's calling arguments and a ResultSender interface to send results back to the client. Additionally, if the function is executed on a Region, the FunctionContext is an @@ -103,7 +103,7 @@ signature similar to the following. Let's ignore the return type for the moment: - public Object method1(String s1, int i2) {...} + public Object method1(String s1, int i2) {...} public Object method2(Map<?,?> data, String s1, int i2) {...} public Object method3(String s1, Map<?,?>data, int i2) {...} public Object method4(String s1, Map<?,?> data, Set<?> filter, int i2) {...} @@ -127,7 +127,7 @@ public void method6(FunctionContest fc);The general rule is The following example illustrates how annotations are used to expose a POJO as a GemFire function: - @Component + @Component public class MyFunctions { @GemfireFunction public String function1(String s1, @RegionData Map<?,?> data, int i2) { ... } @@ -209,7 +209,7 @@ public class MyFunctions {
-
+
Executing a Function A process invoking a remote function needs to provide calling @@ -289,7 +289,7 @@ public interface FunctionExecution { simply wire your interface into a bean that will invoke the function: - @Component + @Component public class MyApp { @Autowired FunctionExecution functionExecution; @@ -304,7 +304,7 @@ public interface FunctionExecution { example GemfireOnRegionFunctionTemplate creates an onRegion execution. For example: - Set<?,?> myFilter = getFilter(); + Set<?,?> myFilter = getFilter(); Region<?,?> myRegion = getRegion(); GemfireOnRegionOperations template = new GemfireOnRegionFunctionTemplate(myRegion); String result = template.executeAndExtract("someFunction",myFilter,"hello","world",1234);Internally, diff --git a/docs/src/reference/docbook/reference/function.xml b/docs/src/reference/docbook/reference/function.xml index ec78afcd..cc894e9f 100644 --- a/docs/src/reference/docbook/reference/function.xml +++ b/docs/src/reference/docbook/reference/function.xml @@ -1,5 +1,5 @@ -
Configuring GemFire's Function Service - As of Release 1.2.0, Spring Data GemFire provides namespace support - for registering GemFire Functions for remote + As of Release 1.3.0, Spring Data GemFire provides annotation support + for implementing and registering functions. Spring Data GemFire also provides + namespace support for registering GemFire 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 diff --git a/docs/src/reference/docbook/reference/samples.xml b/docs/src/reference/docbook/reference/samples.xml index b1421cfe..8832dba6 100644 --- a/docs/src/reference/docbook/reference/samples.xml +++ b/docs/src/reference/docbook/reference/samples.xml @@ -1,18 +1,30 @@ - + Sample Applications - The Spring Data GemFire project includes one sample application. Named - "Hello World", the sample demonstrates how to configure and use GemFire - inside a Spring application. At runtime, the sample offers a + + Sample applications are now maintained in the + + Spring + Data GemFire Examples + + repository. + + + The Spring Data GemFire project also includes one sample application. + Named "Hello World", the sample demonstrates how to configure and use + GemFire inside a Spring application. At runtime, the sample offers a shell to the user allowing him to run various commands against the grid. It provides an excellent starting point for users unfamiliar with the essential components or the Spring and GemFire concepts. - - - Additional sample applications may be found in the Spring Data GemFire Examples repository. - The sample is bundled with the distribution and is Maven-based. One can easily import them into any Maven-aware IDE (such as SpringSource Running under Linux - If you experience networking problems when starting GemFire or the samples, - try adding the following system property java.net.preferIPv4Stack=true - to the command line (insert -Djava.net.preferIPv4Stack=true). - For an alternative (global) fix especially on Ubuntu see - this link + + If you experience networking problems when starting GemFire or the + samples, try adding the following system property + java.net.preferIPv4Stack=true to the command line + (insert -Djava.net.preferIPv4Stack=true). For an + alternative (global) fix especially on Ubuntu see this link +
Starting and stopping the sample @@ -133,4 +148,4 @@ Hello World! their dependency and life-cycle callbacks.
- \ No newline at end of file + diff --git a/src/main/java/org/springframework/data/gemfire/function/BatchingResultSender.java b/src/main/java/org/springframework/data/gemfire/function/BatchingResultSender.java index b0ef73bf..c8326c39 100644 --- a/src/main/java/org/springframework/data/gemfire/function/BatchingResultSender.java +++ b/src/main/java/org/springframework/data/gemfire/function/BatchingResultSender.java @@ -27,9 +27,9 @@ import com.gemstone.gemfire.cache.execute.ResultSender; * Sends collection results using a {@link ResultSender} in chunks determined by batchSize * * @author David Turanski - * + * @since 1.3.0 */ -public class BatchingResultSender { +class BatchingResultSender { private final int batchSize; private ResultSender resultSender; diff --git a/src/main/java/org/springframework/data/gemfire/function/DefaultFunctionArgumentResolver.java b/src/main/java/org/springframework/data/gemfire/function/DefaultFunctionArgumentResolver.java index 8e6f2bd8..c831ed88 100644 --- a/src/main/java/org/springframework/data/gemfire/function/DefaultFunctionArgumentResolver.java +++ b/src/main/java/org/springframework/data/gemfire/function/DefaultFunctionArgumentResolver.java @@ -16,9 +16,10 @@ import com.gemstone.gemfire.cache.execute.FunctionContext; /** * @author David Turanski + * @since 1.3.0 * */ -public class DefaultFunctionArgumentResolver implements FunctionArgumentResolver { +class DefaultFunctionArgumentResolver implements FunctionArgumentResolver { /* (non-Javadoc) * @see org.springframework.data.gemfire.function.FunctionArgumentResolver#resolveFunctionArguments(com.gemstone.gemfire.cache.execute.FunctionContext) diff --git a/src/main/java/org/springframework/data/gemfire/function/FunctionArgumentResolver.java b/src/main/java/org/springframework/data/gemfire/function/FunctionArgumentResolver.java index 1c94705a..af650269 100644 --- a/src/main/java/org/springframework/data/gemfire/function/FunctionArgumentResolver.java +++ b/src/main/java/org/springframework/data/gemfire/function/FunctionArgumentResolver.java @@ -17,8 +17,9 @@ import com.gemstone.gemfire.cache.execute.FunctionContext; /** * Strategy Interface for resolving function invocation arguments, given a {@link FunctionContext} * @author David Turanski + * @since 1.3.0 * */ -public interface FunctionArgumentResolver { - public Object[] resolveFunctionArguments(FunctionContext functionContext); +interface FunctionArgumentResolver { + Object[] resolveFunctionArguments(FunctionContext functionContext); } diff --git a/src/main/java/org/springframework/data/gemfire/function/FunctionContextInjectingArgumentResolver.java b/src/main/java/org/springframework/data/gemfire/function/FunctionContextInjectingArgumentResolver.java index 90570c9b..991b395d 100644 --- a/src/main/java/org/springframework/data/gemfire/function/FunctionContextInjectingArgumentResolver.java +++ b/src/main/java/org/springframework/data/gemfire/function/FunctionContextInjectingArgumentResolver.java @@ -32,9 +32,10 @@ import com.gemstone.gemfire.cache.partition.PartitionRegionHelper; /** * @author David Turanski + * @since 1.3.0 * */ -public class FunctionContextInjectingArgumentResolver extends DefaultFunctionArgumentResolver { +class FunctionContextInjectingArgumentResolver extends DefaultFunctionArgumentResolver { private static Log logger = LogFactory.getLog(FunctionContextInjectingArgumentResolver.class); diff --git a/src/main/java/org/springframework/data/gemfire/function/config/FunctionExecutionBeanDefinitionRegistrar.java b/src/main/java/org/springframework/data/gemfire/function/config/FunctionExecutionBeanDefinitionRegistrar.java index 9d8d7a0b..57513cc6 100644 --- a/src/main/java/org/springframework/data/gemfire/function/config/FunctionExecutionBeanDefinitionRegistrar.java +++ b/src/main/java/org/springframework/data/gemfire/function/config/FunctionExecutionBeanDefinitionRegistrar.java @@ -31,7 +31,7 @@ import org.springframework.util.StringUtils; * @author David Turanski * */ -public class FunctionExecutionBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar { +class FunctionExecutionBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar { /* (non-Javadoc) * @see org.springframework.context.annotation.ImportBeanDefinitionRegistrar#registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry) diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/AllMembersFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/AllMembersFunctionExecution.java index 4d3d4b09..af3093a5 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/AllMembersFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/AllMembersFunctionExecution.java @@ -16,10 +16,11 @@ import com.gemstone.gemfire.cache.execute.Execution; import com.gemstone.gemfire.cache.execute.FunctionService; /** + * A FunctionExecution wrapper for onMembers execution * @author David Turanski - * + * @since 1.3.0 */ -public class AllMembersFunctionExecution extends AbstractFunctionExecution { +class AllMembersFunctionExecution extends AbstractFunctionExecution { @Override protected Execution getExecution() { diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/DefaultMemberFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/DefaultMemberFunctionExecution.java index 2f8c2a33..a5b0006e 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/DefaultMemberFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/DefaultMemberFunctionExecution.java @@ -19,7 +19,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService; * @author David Turanski * */ -public class DefaultMemberFunctionExecution extends AbstractFunctionExecution { +class DefaultMemberFunctionExecution extends AbstractFunctionExecution { @Override protected Execution getExecution() { diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/DistributedMemberFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/DistributedMemberFunctionExecution.java index 87f7d0e7..fb4c6e68 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/DistributedMemberFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/DistributedMemberFunctionExecution.java @@ -22,7 +22,7 @@ import com.gemstone.gemfire.distributed.DistributedMember; * @author David Turanski * */ -public class DistributedMemberFunctionExecution extends AbstractFunctionExecution { +class DistributedMemberFunctionExecution extends AbstractFunctionExecution { private final DistributedMember distributedMember; diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/DistributedMembersFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/DistributedMembersFunctionExecution.java index 1dcf7223..5970ff77 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/DistributedMembersFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/DistributedMembersFunctionExecution.java @@ -22,7 +22,7 @@ import com.gemstone.gemfire.distributed.DistributedMember; * @author David Turanski * */ -public class DistributedMembersFunctionExecution extends AbstractFunctionExecution { +class DistributedMembersFunctionExecution extends AbstractFunctionExecution { private final Set distributedMembers; /** diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/GroupMemberFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/GroupMemberFunctionExecution.java index 6304dcc1..b52034ac 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/GroupMemberFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/GroupMemberFunctionExecution.java @@ -21,7 +21,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService; * @author David Turanski * */ -public class GroupMemberFunctionExecution extends AbstractFunctionExecution { +class GroupMemberFunctionExecution extends AbstractFunctionExecution { private final String groups[]; diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/GroupMembersFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/GroupMembersFunctionExecution.java index cbfb9006..5de678c8 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/GroupMembersFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/GroupMembersFunctionExecution.java @@ -21,7 +21,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService; * @author David Turanski * */ -public class GroupMembersFunctionExecution extends AbstractFunctionExecution { +class GroupMembersFunctionExecution extends AbstractFunctionExecution { private final String groups[]; diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/PoolServerFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/PoolServerFunctionExecution.java index 4368eed6..e5f75161 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/PoolServerFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/PoolServerFunctionExecution.java @@ -25,7 +25,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService; * @author David Turanski * */ -public class PoolServerFunctionExecution extends AbstractFunctionExecution implements InitializingBean { +class PoolServerFunctionExecution extends AbstractFunctionExecution implements InitializingBean { private Pool pool; diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/PoolServersFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/PoolServersFunctionExecution.java index ebbb40e1..7c223eff 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/PoolServersFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/PoolServersFunctionExecution.java @@ -23,7 +23,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService; * @author David Turanski * */ -public class PoolServersFunctionExecution extends AbstractFunctionExecution { +class PoolServersFunctionExecution extends AbstractFunctionExecution { private final Pool pool; diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/RegionFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/RegionFunctionExecution.java index d16f2bef..e198c396 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/RegionFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/RegionFunctionExecution.java @@ -25,7 +25,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService; * @author David Turanski * */ -public class RegionFunctionExecution extends AbstractFunctionExecution { +class RegionFunctionExecution extends AbstractFunctionExecution { private final Region region; diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/ServerFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/ServerFunctionExecution.java index 9f2bccd8..9a311269 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/ServerFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/ServerFunctionExecution.java @@ -23,7 +23,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService; * @author David Turanski * */ -public class ServerFunctionExecution extends AbstractFunctionExecution { +class ServerFunctionExecution extends AbstractFunctionExecution { private RegionService regionService; diff --git a/src/main/java/org/springframework/data/gemfire/function/execution/ServersFunctionExecution.java b/src/main/java/org/springframework/data/gemfire/function/execution/ServersFunctionExecution.java index dd6257e7..638ed619 100644 --- a/src/main/java/org/springframework/data/gemfire/function/execution/ServersFunctionExecution.java +++ b/src/main/java/org/springframework/data/gemfire/function/execution/ServersFunctionExecution.java @@ -23,7 +23,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService; * @author David Turanski * */ -public class ServersFunctionExecution extends AbstractFunctionExecution { +class ServersFunctionExecution extends AbstractFunctionExecution { private final RegionService regionService;