public class PdxInstanceBuilder
extends java.lang.Object
PdxInstanceBuilder class is a Builder
used to construct and initialize a PdxInstance from different sources.GemFireCache,
RegionService,
PdxInstance,
PdxInstanceFactory,
Builder Software Design Pattern| Modifier and Type | Class and Description |
|---|---|
static interface |
PdxInstanceBuilder.Factory |
| Modifier | Constructor and Description |
|---|---|
protected |
PdxInstanceBuilder(org.apache.geode.cache.RegionService regionService)
Constructs a new instance of
PdxInstanceBuilder initialized with the required RegionService. |
| Modifier and Type | Method and 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. |
static PdxInstanceBuilder |
create()
Factory method used to construct a new instance of the
PdxInstanceBuilder class. |
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. |
PdxInstanceBuilder.Factory |
from(java.lang.Object source)
Constructs a new
PdxInstance from the given, required source Object. |
protected org.apache.geode.cache.RegionService |
getRegionService()
Returns a reference to the configured
RegionService used to perform the operations of this PDX Builder. |
protected PdxInstanceBuilder(org.apache.geode.cache.RegionService regionService)
PdxInstanceBuilder initialized with the required RegionService.regionService - RegionService instance used to perform the functions of the PDX Builder.java.lang.IllegalArgumentException - if RegionService is null.RegionServicepublic static PdxInstanceBuilder create()
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).PdxInstanceBuilder.java.lang.IllegalArgumentException - if a GemFireCache instance is not present.create(RegionService)public static PdxInstanceBuilder create(org.apache.geode.cache.RegionService regionService)
PdxInstanceBuilder class initialized with
the given, required RegionService used by the Builder to performs its functions.regionService - RegionService instance used by the PdxInstanceBuilder to perform
its functions;
must not be null.PdxInstanceBuilder.java.lang.IllegalArgumentException - if GemFireCache is null.GemFireCache,
PdxInstanceBuilder(RegionService)protected org.apache.geode.cache.RegionService getRegionService()
RegionService used to perform the operations of this PDX Builder.RegionService; never null.public org.apache.geode.pdx.PdxInstanceFactory copy(org.apache.geode.pdx.PdxInstance pdxInstance)
PdxInstance to a new PdxInstance built with this Builder.pdxInstance - PdxInstance to copy.PdxInstanceFactory used to create
the PdxInstance.java.lang.IllegalArgumentException - if PdxInstance is null.PdxInstance,
PdxInstanceFactorypublic PdxInstanceBuilder.Factory from(java.lang.Object source)
PdxInstance from the given, required source Object.source - Object being serialized to PDX; must not be null.PdxInstanceBuilder.Factory used to create the PdxInstance from the given,
required source Object, which was serialized to PDX.java.lang.IllegalArgumentException - if source is null.PdxInstanceBuilder.Factory