GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — geode-examples/replicated at develop · apache/geode-examples

Expand file tree

/

replicated

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

replicated

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
scripts
scripts
 
 
src/main/java/org/apache/geode_examples/replicated
src/main/java/org/apache/geode_examples/replicated
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 

README.md

Outline

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.

Steps

  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=127.0.0.1[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=127.0.0.1[10334]" -e "query --query='select e.key from /example-region.entries e'"
    
  6. Shut down the system:

     $ gfsh run --file=scripts/stop.gfsh
    
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.