Class PdxInstanceBuilder

java.lang.Object
org.springframework.geode.pdx.PdxInstanceBuilder

public class PdxInstanceBuilder extends Object
The PdxInstanceBuilder class is a Builder used to construct and initialize a PdxInstance from different sources.
Since:
1.3.0
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PdxInstanceBuilder(org.apache.geode.cache.RegionService regionService)
    Constructs a new instance of PdxInstanceBuilder initialized with the required RegionService.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.geode.pdx.PdxInstanceFactory
    copy(org.apache.geode.pdx.PdxInstance pdxInstance)
    Copies the contents of the existing PdxInstance to a new PdxInstance built with this Builder.
    Factory method used to construct a new instance of the PdxInstanceBuilder class.
    create(org.apache.geode.cache.RegionService regionService)
    Factory method use to construct a new instance of the PdxInstanceBuilder class initialized with the given, required RegionService used by the Builder to performs its functions.
    from(Object source)
    Constructs a new PdxInstance from the given, required source Object.
    protected org.apache.geode.cache.RegionService
    Returns a reference to the configured RegionService used to perform the operations of this PDX Builder.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PdxInstanceBuilder

      protected PdxInstanceBuilder(org.apache.geode.cache.RegionService regionService)
      Constructs a new instance of PdxInstanceBuilder initialized with the required RegionService.
      Parameters:
      regionService - RegionService instance used to perform the functions of the PDX Builder.
      Throws:
      IllegalArgumentException - if RegionService is null.
      See Also:
      • RegionService
  • Method Details

    • create

      public static PdxInstanceBuilder create()
      Factory method used to construct a new instance of the PdxInstanceBuilder class. This factory method tries to resolve the GemFireCache instance for the caller by using SimpleCacheResolver. Alternatively, callers may provider their own GemFireCache instance by calling create(RegionService).
      Returns:
      a new instance of the PdxInstanceBuilder.
      Throws:
      IllegalArgumentException - if a GemFireCache instance is not present.
      See Also:
    • create

      public static PdxInstanceBuilder create(org.apache.geode.cache.RegionService regionService)
      Factory method use to construct a new instance of the PdxInstanceBuilder class initialized with the given, required RegionService used by the Builder to performs its functions.
      Parameters:
      regionService - RegionService instance used by the PdxInstanceBuilder to perform its functions; must not be null.
      Returns:
      an new instance of the PdxInstanceBuilder.
      Throws:
      IllegalArgumentException - if GemFireCache is null.
      See Also:
    • getRegionService

      protected org.apache.geode.cache.RegionService getRegionService()
      Returns a reference to the configured RegionService used to perform the operations of this PDX Builder.
      Returns:
      a reference to the configured RegionService; never null.
    • copy

      public org.apache.geode.pdx.PdxInstanceFactory copy(org.apache.geode.pdx.PdxInstance pdxInstance)
      Copies the contents of the existing PdxInstance to a new PdxInstance built with this Builder.
      Parameters:
      pdxInstance - PdxInstance to copy.
      Returns:
      an instance of the PdxInstanceFactory used to create the PdxInstance.
      Throws:
      IllegalArgumentException - if PdxInstance is null.
      See Also:
      • PdxInstance
      • PdxInstanceFactory
    • from

      public PdxInstanceBuilder.Factory from(Object source)
      Constructs a new PdxInstance from the given, required source Object.
      Parameters:
      source - Object being serialized to PDX; must not be null.
      Returns:
      a PdxInstanceBuilder.Factory used to create the PdxInstance from the given, required source Object, which was serialized to PDX.
      Throws:
      IllegalArgumentException - if source is null.
      See Also: