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

@Experimental public class Pdx extends AbstractConfiguration<PdxInfo>
Used to configure PDX serialization for a cache.
See Also:
  • Field Details

  • 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