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

Accessing an Entry

Accessing an Entry

The region entry retrieval methods return the value associated with the specified key, and pass the callback argument to any cache loaders or cache writers that are invoked during the operation.

If the value is not available locally, it is requested from the server. If the server request is unsuccessful, a local cache loader is invoked, if one is available. The operation throws keyNotFoundException if the Region is unable to retrieve a value through any of these means.

Using the Region API to Retrieve Values From the Cache

Here, the program retrieves two entries from the region.
string value1 = region1["Key1"];
string value2 = region1["Key2"];
 
int valueA = region2["KeyA"];
int valueB = region2["KeyB"];
 
string valueQ = region.Get(111, null);
string valueR = region.Get(222, null);