This topic explains how to use VMware Tanzu GemFire to persist PDX metadata to disk and specify the disk store to use.
Procedure
<pdx>
attribute persistent
to true in your cache configuration. This is required for caches that use PDX with persistent regions and with regions that use a gateway sender to distribute events across a WAN.. Otherwise, it is optional.(Optional) If you want to use a disk store that is not the Tanzu GemFire default disk store, set the <pdx>
attribute disk-store-name
to the name of your non-default disk store. Note: If you are using PDX serialized objects as region entry keys and you are using persistent regions, then you must configure your PDX disk store to be a different one than the disk store used by the persistent regions.
(Optional) If you later want to rename the PDX types that are persisted to disk, you can do so on your offline disk-stores by executing the pdx rename
command. See pdx rename.
Example cache.xml:
This example cache.xml
enables PDX persistence and sets a non-default disk store in a server cache configuration:
<pdx read-serialized="true"
persistent="true" disk-store-name="SerializationDiskStore">
<pdx-serializer>
<class-name>pdxSerialization.defaultSerializer</class-name>
</pdx-serializer>
</pdx>
<region
...