The object receiver is responsible for creation and destruction of objects on the remote host. More...
#include <idistcache.h>
Public Member Functions | |
virtual Uint64 | create_object (base::Uuid class_id, IDeserializer *deserializer)=0 |
Callback for object creation. More... | |
virtual void | destroy_object (Uint64 id, bool owner_died)=0 |
Callback for object destruction. More... | |
Public Member Functions inherited from mi::base::IInterface | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x61820375, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> | IID |
Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x61820375, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::IInterface | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
The object receiver is responsible for creation and destruction of objects on the remote host.
The distributed cache can handle an arbitrary number of such receivers, but at most one receiver per class ID.
|
pure virtual |
Callback for object creation.
This method is called on each remote host in the cluster or network when some host stores an object in the distributed cache.
Note that the data available from the deserializer was written by calling the serialize()
function on the object passed to the mi::neuraylib::IDistributed_cache::store_object() function. That means that the cache guarantees that the deserializer here is in a state that a call to the deserialize()
function of the correct class for the given class ID would work correctly.
class_id | The class ID of the object, used to find the receiver and to tell the receiver which object to create. |
deserializer | The receiver can read the data from this deserializer. |
|
pure virtual |
Callback for object destruction.
This method is called on those remote hosts which have received a corresponding create_object() call before. It will be called when either the owner removes the object or when the owner leaves the network.
id | The object ID assigned by the receiver and returned from a previous create_object() call. |
owner_died | A flag indicating whether the object was removed or the owner died. |