Geode replicated region example

This is a simple example that demonstrates putting values into a replicated region, checking the size, and retrieving the values.

This example assumes you have installed Java and Geode.


  1. From the geode-examples/replicated directory, build the example and run unit tests

     $ ../gradlew build
  2. Next start the locator and two servers

     $ gfsh run --file=scripts/start.gfsh
  3. Run the example to create entries in the region

     $ ../gradlew run
  4. Kill one of the servers

     $ gfsh -e "connect --locator=[10334]" -e "stop server --name=server1"
  5. Run a gfsh query, and notice that all the entries are still available due to replication

     $ gfsh -e "connect --locator=[10334]" -e "query --query='select e.key from /example-region.entries e'"
  6. Shut down the system:

     $ gfsh run --file=scripts/stop.gfsh