In this example, region data is persisted to the subdirectory persistData1. You run the example twice so you can see how the persisted data is loaded into the region on the second run.
|To run this example, you must have terminal sessions configured for the QuickStart examples, as described in Setting Up the Environment.|
- In a single session, run the example:
No data is in the region on the first run, so the get operation returns null and the program reports that no entry was found. Then the program puts the entry with value, 'value1'.
- When the program exits, look in the persistData1 directory. You will see the data files used for persistence.
- Run the program again with the same command.
The second time, at creation, the region is initialized from disk, so the get operation returns 'value1'.
Program and cache configuration file listings: