Pdx (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.management.configuration, class: Pdx

Package org.apache.geode.management.configuration

# Class Pdx

java.lang.Object
org.apache.geode.management.configuration.AbstractConfiguration<PdxInfo>
org.apache.geode.management.configuration.Pdx

All Implemented Interfaces:
  `Serializable`, `Identifiable<String>`, `JsonSerializable`

@Experimental public class Pdx extends AbstractConfiguration<PdxInfo>
Used to configure PDX serialization for a cache.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `PDX_ENDPOINT`
  `static final String`
  `PDX_ID`

  ### Fields inherited from class org.apache.geode.management.configuration.AbstractConfiguration

  `CLUSTER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Pdx()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AutoSerializer`
  `getAutoSerializer()`
  `String`
  `getDiskStoreName()`
  `String`
  `getId()`
  Returns `PDX_ID`
  `Links`
  `getLinks()`
  `ClassName`
  `getPdxSerializer()`
  `Boolean`
  `isIgnoreUnreadFields()`
  `Boolean`
  `isReadSerialized()`
  `void`
  `setAutoSerializer(AutoSerializer autoSerializer)`
  `void`
  `setDiskStoreName(String diskStoreName)`
  Setting a non-null diskStoreName causes the Pdx information to be persisted to the named disk store.
  `void`
  `setIgnoreUnreadFields(Boolean ignoreUnreadFields)`
  Setting ignoreUnreadFields to true can save memory during pdx deserialization but if the deserialized object is reserialized then the unread field data will be lost.
  `void`
  `setPdxSerializer(ClassName pdxSerializer)`
  `void`
  `setReadSerialized(Boolean readSerialized)`
  Setting readSerialized to true causes any pdx deserialization to produce instances of org.apache.geode.pdx.PdxInstance interface in the geode-core module instead of a domain class instance.

  ### Methods inherited from class org.apache.geode.management.configuration.AbstractConfiguration

  `getCreationCommandType, getGroup, getGroupName, isCluster, isGlobalRuntime`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### PDX_ID

    public static final String PDX_ID
    See Also:
      - Constant Field Values

  - ### PDX_ENDPOINT

    public static final String PDX_ENDPOINT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Pdx

    public Pdx()

- ## Method Details

  - ### getId

    public String getId()
    Returns `PDX_ID`
    Specified by:
      `getId` in interface `Identifiable<String>`
    Specified by:
      `getId` in class `AbstractConfiguration<PdxInfo>`
    Returns:
      an identifier uniquely identifying this Object.

  - ### getLinks

    public Links getLinks()
    Specified by:
      `getLinks` in class `AbstractConfiguration<PdxInfo>`

  - ### getAutoSerializer

    public AutoSerializer getAutoSerializer()

  - ### setAutoSerializer

    public void setAutoSerializer(AutoSerializer autoSerializer)
    Parameters:
      `autoSerializer` - the `AutoSerializer` to use
    Throws:
      `IllegalArgumentException` - if a pdxSerializer has already been set

  - ### isReadSerialized

    public Boolean isReadSerialized()

  - ### setReadSerialized

    public void setReadSerialized(Boolean readSerialized)
    Setting readSerialized to true causes any pdx deserialization to produce instances of org.apache.geode.pdx.PdxInstance interface in the geode-core module instead of a domain class instance.
    Parameters:
      `readSerialized` - a Boolean specifying whether Pdx deserialization should produce only instances of org.apache.geode.pdx.PdxInstance

  - ### getPdxSerializer

    public ClassName getPdxSerializer()

  - ### setPdxSerializer

    public void setPdxSerializer(ClassName pdxSerializer)
    Parameters:
      `pdxSerializer` - the class name given must implement the org.apache.geode.pdx.PdxSerializer interface from the geode-core module.
    Throws:
      `IllegalArgumentException` - if an autoSerializer has already been set

  - ### isIgnoreUnreadFields

    public Boolean isIgnoreUnreadFields()

  - ### setIgnoreUnreadFields

    public void setIgnoreUnreadFields(Boolean ignoreUnreadFields)
    Setting ignoreUnreadFields to true can save memory during pdx deserialization but if the deserialized object is reserialized then the unread field data will be lost. Unread fields will only exist if a class serialized with pdx has multiple versions.
    Parameters:
      `ignoreUnreadFields` - a Boolean specifying if unread fields should be ignored when deserializing

  - ### getDiskStoreName

    public String getDiskStoreName()

  - ### setDiskStoreName

    public void setDiskStoreName(String diskStoreName)
    Setting a non-null diskStoreName causes the Pdx information to be persisted to the named disk store. To configure Pdx to use the default disk store, set the diskStoreName to "DEFAULT".
    Parameters:
      `diskStoreName` - the name of the disk store to persist Pdx information to