These examples demonstrate how to implement specific functionality in GemFire.
Besides showing a specific GemFire feature, every example program follows the standard startup and shutdown steps for a GemFire system member. Each example:
- Initializes its cache and data regions using a declarative XML configuration file. The cache creation automatically creates the distributed system connection with any running members.
- Does its work.
- Closes its cache and exits.
Related Javadocs are listed for each example.
- If you have not already done so, install and configure GemFire Enterprise and the product examples:
- Start two terminal sessions with their environments set up for GemFire and the product examples.
- In both sessions, change directory (cd) to the quickstart directory under your examples installation.
If you have problems running the examples, see the troubleshooting checklist.
Source and configuration files are located under the examples installation quickstart directory:
- gemfire.properties, used by all of the examples
- Java source files in the quickstart subdirectory
- XML cache configuration files in the xml subdirectory
For descriptions and example walkthroughs for these different file types, see the Walkthrough of the Example Files in the Hello World Example.
The table provides links to documentation for each Quick Start example.
| Example documentation
|Replicated Caching|| Automatically replicate all data in the distributed region into your local application.
|Server-Managed Caching|| Use the client/server topology to scale your application vertically, with many clients benefiting from centralized server-side data management.
|Partitioned Data Caching|| Split large data sets between members, with the data seen by all members as a unified set.
|Reliable Event Notifications|| Configure automatic key- and query-based event notifications from server to client. Designate critical event sets as durable, so the server stores events while the client is disconnected and replays them when the client reconnects.
|Persisting Data to Disk|| Store data to disk for backup and persistence.
|Overflowing Data to Disk|| Overflow data to disk when a region reaches capacity in memory.
|Cache Expiration|| Ensure an up-to-date data set and help control region size by removing old or unused data entries.
|Cache Eviction|| Manage region size by removing least-used data entries to make way for new queries.
|Querying|| Run object-based OQL queries against your data.
|Transactions|| Combine data operations into logical units that succeed or fail together.
|Delta Propagation|| Distribute only the changes to your object - the deltas - instead of the entire object.
|Function Execution|| Distribute function execution to the members hosting your function's data.
|Secure Client|| Run your client/server installation with secure access.
|Multiple Secure Clients|| Run your client/server installation with secure access for multiple secure users inside a single client application.
|Distributed Locking|| Coordinate efforts between applications using a distributed locking service.
|Product Benchmarks|| Run peer-to-peer and client/server benchmark tests that measure the product's distribution speeds.
After you familiarize yourself with basic GemFire Enterprise functionality, you'll probably want to check out Spring GemFire Integration. Use Spring GemFire Integration with GemFire as a distributed data management platform to build Spring-powered, highly scalable applications.
Server-Managed Caching Example
Partitioned Data Caching Example
Reliable Event Notifications Examples
Persisting Data to Disk Example
Overflowing Data to Disk Example
Cache Expiration Example
Cache Eviction Example
Delta Propagation Example
Function Execution Example
Secure Client Example
Multiple Secure Client Example
Distributed Locking Example