LATEST VERSION: 8.0.0 - CHANGELOG
Pivotal GemFire® v8.0

Setting Up the Product Examples

Setting Up the Product Examples

The GemFire examples are included in the distribution file that contains your GemFire software. Set up your environment to run these examples as described in this section.

After you download Pivotal GemFire, you can run the examples to explore GemFire's feature set and evaluate the software.

Prerequisites

  • Install GemFire on each physical or virtual machine on which you will run the Pivotal GemFire examples as described in Installing Pivotal GemFire.
  • Make sure you have set your JAVA_HOME, GEMFIRE, and GF_JAVA environment variables properly configured.

Examples Included with Pivotal GemFire

The following examples are included in the SampleCode directory from your GemFire product download.

Table 1. GemFire Examples
Example Example Code Location Documentation Location
Hello World

A simple demonstration of GemFire data distribution.

SampleCode/helloworld Pivotal GemFire User's Guide: Hello World Example
Pivotal GemFire Tutorial

A guided tour of Pivotal GemFire's core features.

SampleCode/tutorial Pivotal GemFire User's Guide: Pivotal GemFire Tutorial
QuickStart Examples

Demonstrates the following GemFire features:

  • Benchmark examples:
    • Peer to peer
    • Client-server
  • Cache eviction
  • Cache expiration
  • Delta propagation
  • Distributed locking
  • Fixed partitioning
  • Function execution
  • JSON
  • Management and monitoring
  • Multiple secure client
  • Overflowing data to disk
  • Partitioned data caching
  • Persisting data
  • Querying
  • Replicated caching
  • Reliable event notifications:
    • Interest registration
    • Continuous querying
    • Durable event messaging
  • Secure client
  • Server-managed caching
  • Transactions
SampleCode/quickstart Pivotal GemFire User's Guide:QuickStart Examples
Programming Examples

The following examples demonstrate how to write applications using the Pivotal GemFire Java API:

  • Cache overflow
  • Cache runner
  • Client API
  • Client/Server configurations
  • Delta propagation
  • High availability overflow
  • Partitioned persistence
  • Portable data exchange serialization (PDX)
  • Transactions
  • WAN: active data
SampleCode/examples/dist

Documentation for the Programming Examples is available in the following files in the SampleCode directory of your GemFire download:

Examples guide:

SampleCode/examples/

README_dist_index.html

(Each example subdirectory contains a README.html file with the documentaiton for that example.)

Examples Javadocs:

SampleCode/examples/dist/

javadocs/index.html

OSGi Examples

The following examples demonstrate how to deploy GemFire applications into an OSGi environment:

  • cacheWorker
  • cacheWorkerFragment
SampleCode/examples/osgi

SampleCode/examples/

osgi/dist/README.html

What to do next
Note: The Spring Data GemFire project enables developers to use the Spring Data GemFire API to write applications and configure a GemFire system. See Spring Data GemFire Code Examples.