Persisting PDX Metadata to Disk
Geode allows you to persist PDX metadata to disk and specify the disk store to use.
- Understand generally how to configure the Geode cache. See Basic Configuration and Programming.
- Understand how Geode disk stores work. See Disk Storage.
Procedure
- Set the
<pdx>
attributepersistent
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 Geode default disk store, set the
<pdx>
attributedisk-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 ...