LATEST VERSION: 9.2 - RELEASE NOTES
Pivotal GemFire® Client v9.2

Creating a Region

To create a region, use RegionFactory with the RegionShortcut that most closely fits the region configuration.

From that point, customize the settings for region attributes as needed.

Creating a region using the client API only creates a proxy client side region. A corresponding region with the same name and path must also exist on the servers that have been configured for client connections and upon which the client will perform its operations.

Creating a CACHING_PROXY Region

This example creates a region using the CACHING_PROXY shortcut with no further modifications:

RegionFactory regionFactory =
    cache.CreateRegionFactory(RegionShortcut.CACHING_PROXY);

IRegion<string, string> region = regionFactory
    .Create<string, string>("exampleRegion");

Creating a CACHING_PROXY Region with LRU

This example creates a region based on the CACHING_PROXY shortcut, modifying values for two region attributes. For information on the settings, see Region Attributes Descriptions.

RegionFactory regionFactory =
    cache.CreateRegionFactory(RegionShortcut.CACHING_PROXY);

IRegion<string, string> region = regionFactory
    .SetLruEntriesLimit(20000)
    .SetInitialCapacity(20000)
    .Create<string, string>("exampleRegion");