The examples in this folder are showcase features of GemFire and demonstrate their basic usage.
For details on all GemFire features, see Tanzu GemFire Documentation.
Your client code must link against the same or older version (ignoring patch versions) of Tanzu GemFire as the Tanzu GemFire server it will connect to.
To link against an older version of GemFire, edit the gemfireVersion=
line in gradle.properties
.
In order to execute the examples in this project, follow these steps:
- Ensure JDK 11 or JDK 17 is installed (and set JAVA_HOME if it's not the default). JDK 8 can be used, but some examples such as lucene and luceneSpatial will not work.
- Download the version of GemFire that you want to use as the server from Broadcom Customer Support
- Unpack the GemFire TGZ file (e.g.
tar xzf vmware-gemfire-10.1.0.tgz
) export GEMFIRE_HOME
to point to the top level directory inside the extracted GemFire. For example, if you extracted in /tmp/downloads,export GEMFIRE_HOME=/tmp/downloads/vmware-gemfire-10.1.0
.- When you first run the gradle commands below you'll be prompted to supply credentials. Set gemfireReleaseRepoUser but leave gemfireReleaseRepoPassword blank for instructions how to obtain an access token.
You can now run an example with the following gradle targets:
build
- compiles the example and runs unit testsstart
- initializes the Tanzu GemFire clusterrun
- runs the example Applicationstop
- shuts down the clusterrunAll
- invokes start, run, stop
The commands you need to run a specific example will be given in the README.md
file. Sample
usage:
$ ./gradlew :replicated:start
$ ./gradlew :replicated:run
$ ./gradlew :replicated:stop
The following sections call out ready-made examples. You may want to start your journey with the Tanzu GemFire Documentation.
- Replicated Region
- Partitioned Region
- Put Multiple Values at Once
- Functions
- Persistence
- OQL (Querying)