Customizing Serialization with Class Pattern Strings

Use class pattern strings to name the classes that you want to serialize using GemFire's reflection-based autoserializer and to specify object identity fields and to specify fields to exclude from serialization.

The class pattern strings used to configured the ReflectionBasedAutoSerializer are standard regular expressions. For example, this expression would select all classes defined in the package and its subpackages:
You can augment the pattern strings with a special notation to define fields to exclude from serialization and to define fields to mark as PDX identity fields. The full syntax of the pattern string is:
<class pattern> [# (identity|exclude) = <field pattern>]... [, <class pattern>...]
The following example pattern string sets these PDX serialization criteria:*#identity=id.*#exclude=creationDate,
Note: There is no association between the identity and exclude options, so the pattern above could also be expressed as:*#identity=id.*,*#exclude=creationDate,
Note: The order of the patterns is not relevant. All defined class patterns are used when determining whether a field should be considered as an identity field or should be excluded.