Configuring Persistence

You can persist the data that your application stores in a region. Persistence allows you to restore data after a failure or normal shutdown of GemFire.

To configure persistence, you set the persistent attribute of your region configuration to true. You also set a disk-store attribute that defines where the data is persisted.

For example, the following Spring application context XML configuration (from the basic/persistence example) enables persistence for a partitioned region that uses a disk store:
<gfe:replicated-region id="Order" disk-store-ref="orderDiskStore" >
        <gfe:cache-listener ref="cacheListener"/>
        <gfe:eviction 
           threshold="300"
           type="ENTRY_COUNT" 
           action="OVERFLOW_TO_DISK"/>
    </gfe:replicated-region>
    ... 
    <gfe:disk-store id="orderDiskStore">
    	<gfe:disk-dir location="orders"/>
    </gfe:disk-store>
    

Additional Resources