Pivotal GemFire® Native Client v9.0

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:

  <pool name="examplePool" subscription-enabled="true" >
    <server host="localhost" port="40404" />
  <region name="A" refid="PROXY">
    <region-attributes pool-name="examplePool"/>
  <region name="A1">
    <region-attributes refid="PROXY" pool-name="examplePool"/>
  <region name="A2" refid="CACHING_PROXY">
    <region-attributes pool-name="examplePool">
        <expiration-attributes timeout="120" action="invalidate"/>

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