public class PdxTest
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.ClassLoader |
fixedLoader |
static boolean |
pdx661Behavior |
static java.lang.ClassLoader |
version1Loader |
static java.lang.ClassLoader |
version2Loader |
| Constructor and Description |
|---|
PdxTest() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.ClassLoader |
createClassLoader(long version)
Create and return (but don't install) a class loader for the given version (either 1
for a version1 loader or 2 for a version2 loader.
|
static java.util.Map<java.lang.String,java.lang.Object> |
getFieldMap(java.lang.Object anObject)
Return a map of all fields (including inherited fields) of anObject.
|
static java.lang.String |
getFieldValue(java.lang.Object anObj,
java.lang.String fieldName)
Return the toString() representation of the field fieldName from the given object anObj
or null.
|
static java.lang.String |
getNewValueStr(com.gemstone.gemfire.cache.EntryEvent eEvent) |
static java.lang.String |
getOldValueStr(com.gemstone.gemfire.cache.EntryEvent eEvent) |
static java.lang.Object |
getVersionedInstance(java.lang.String className)
Use reflection to create a new instance of a versioned class whose
name is specified by className.
|
static parReg.query.NewPortfolio |
getVersionedNewPortfolio(java.lang.String className,
java.lang.String name,
int index)
Use reflection to create a new instance of PdxVersionedNewPortfolio.
|
static QueryObject |
getVersionedQueryObject(java.lang.String className,
long base,
int valueGeneration,
int byteArraySize,
int levels)
Use reflection to create a new instance of PdxVersionedQueryObject.
|
static BaseValueHolder |
getVersionedValueHolder(java.lang.String className,
java.lang.Object anObj,
RandomValues rv)
Use reflection to create a new instance of VersionedValueHolder or
a subclass assuming it has a constructor with args (Object, RandomValues).
|
static BaseValueHolder |
getVersionedValueHolder(java.lang.String className,
java.lang.String key,
RandomValues rv)
Use reflection to create a new instance of VersionedValueHolder or
a subclass assuming it has a constructor with args (String, RandomValues).
|
static java.lang.ClassLoader |
initClassLoader()
If PdxPrms.initClassLoader is true, then randomly choose a versioned
class path and create and install a class loader for it on this thread.
|
static void |
invokeFromData(java.lang.Object anObj,
com.gemstone.gemfire.pdx.PdxReader reader)
Using reflection, invoke the instance method myFromData on anObj passing
reader as an argument.
|
static void |
invokeToData(java.lang.Object anObj,
com.gemstone.gemfire.pdx.PdxWriter writer)
Using reflection, invoke the instance method myToData on anObj passing
writer as an argument.
|
static java.lang.Object |
restoreFromFieldMap(java.util.Map<java.lang.String,java.lang.Object> fieldMap)
Return an object with fields restored to the values in the map
(obtained from getFieldMap(Object).
|
static BaseValueHolder |
toValueHolder(java.lang.Object anObj)
Given an object (assumed to be either a ValueHolder, PdxInstance or null)
return either the ValueHolder or the ValueHolder represented by the
PdxInstance or null.
|
public static boolean pdx661Behavior
public static java.lang.ClassLoader fixedLoader
public static java.lang.ClassLoader version1Loader
public static java.lang.ClassLoader version2Loader
public static java.lang.ClassLoader initClassLoader()
public static java.lang.ClassLoader createClassLoader(long version)
version - Either 1 or 2 to indicate a class loader for version1 or version2public static java.lang.Object getVersionedInstance(java.lang.String className)
className - The name of the versioned class to create.public static BaseValueHolder getVersionedValueHolder(java.lang.String className, java.lang.String key, RandomValues rv)
className - The specific class to create (really any class with constructor
with args (String, RandomValues).key - The String argument to the constructor.rv - The RandomValues instance to pass to the constructor.public static BaseValueHolder getVersionedValueHolder(java.lang.String className, java.lang.Object anObj, RandomValues rv)
className - The specific class to create (really any class with constructor
with args (String, RandomValues).anObj - The Object argument to the constructor.rv - The RandomValues instance to pass to the constructor.public static parReg.query.NewPortfolio getVersionedNewPortfolio(java.lang.String className,
java.lang.String name,
int index)
name - Argument for the constructor.index - Argument for the constructor.public static QueryObject getVersionedQueryObject(java.lang.String className, long base, int valueGeneration, int byteArraySize, int levels)
public static BaseValueHolder toValueHolder(java.lang.Object anObj)
anObj - The ValueHolder, PdxInstance or nullpublic static java.util.Map<java.lang.String,java.lang.Object> getFieldMap(java.lang.Object anObject)
anObject - The object with fields to include in the return map.public static java.lang.Object restoreFromFieldMap(java.util.Map<java.lang.String,java.lang.Object> fieldMap)
fieldMap - Map of field name (key) and field value (map value) for all
fields for anObject. In addition, the map contains the key
"className" and value (String), the class name for anObject.public static java.lang.String getOldValueStr(com.gemstone.gemfire.cache.EntryEvent eEvent)
public static java.lang.String getNewValueStr(com.gemstone.gemfire.cache.EntryEvent eEvent)
public static void invokeToData(java.lang.Object anObj,
com.gemstone.gemfire.pdx.PdxWriter writer)
throws com.gemstone.gemfire.GemFireRethrowable
anObj - The object to receive the myToData method invocation.writer - The object to use as the argument to _toDatacom.gemstone.gemfire.GemFireRethrowablepublic static void invokeFromData(java.lang.Object anObj,
com.gemstone.gemfire.pdx.PdxReader reader)
anObj - The object to receive the myFromData method invocation.writer - The object to use as the argument to _fromDatajava.lang.Throwablepublic static java.lang.String getFieldValue(java.lang.Object anObj,
java.lang.String fieldName)
throws java.lang.NoSuchFieldException
anObj - The object that contains the field fieldNamefieldName - Return the toString() value of fieldName in anObj.java.lang.NoSuchFieldExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.