Declarative Region Creation

Declarative region creation involves placing the region's XML declaration, with the appropriate attribute settings, in the cache.xml file that is loaded at cache creation.

Note: Before creating a region, specify region attributes. See Region Attributes.
Regions are placed inside the cache declaration in region elements. For example:
<cache>
  <pool name="examplePool" subscription-enabled="true" >
    <server host="localhost" port="40404" />
  </pool>
  <region name="A" refid="PROXY">
    <region-attributes pool-name="examplePool"/>
  </region>
  <region name="A1">
    <region-attributes refid="PROXY" pool-name="examplePool"/>
  </region>
  <region name="A2" refid="CACHING_PROXY">
    <region-attributes pool-name="examplePool">
      <region-time-to-live>
        <expiration-attributes timeout="120" action="invalidate"/>
      </region-time-to-live>
    </region-attributes>
  </region>
</cache>
	

The cache.xml file contents must conform to the DTD provided in the productDir/dtd/gfcpp-cache7000.dtd file. For details, see Cache Initialization File.

Note: For more information on how to create a region, see Pivotal GemFire Native Client C++ API, Pivotal GemFire Native Client C# .NET API, and the native client API reference (https://www.vmware.com/support/pubs/vfabric-apiref.html).