Performing put, get, and localDestroy Operations with a PDX Domain Object
This topic demonstrates how you can perform operations on a PDX domain object after you have implemented PDX serializable in your domain class.
For example, you can perform operations like put, get, and localDestroy with the domain class you defined for PDX serialization in the PdxSerializable Example.
To perform operations, you could write the following application code:
Register the PDX domain class.
Create the PDX domain object
CacheablePtr pdxobj(new PdxObject(100, "Value-1")); CacheableKeyPtr keyport = CacheableKey::create("ABC");
Here’s an example of a put operation.
Here’s an example of locally destroying the entry.
Here’s an example of a get operation.
PdxObject *obj2 = dynamic_cast<PdxObject *> ((rptr->get(keyport)).ptr()); LOGINFO("Debug:Returned ID = %d", obj2->getID());