DiCE API nvidia_logo_transpbg.gif Up
mi::neuraylib::IDistributed_cache Class Referenceabstract

The distributed cache service can be used to create temporary objects in a cluster. More...

#include <idistcache.h>

Inheritance diagram for mi::neuraylib::IDistributed_cache:

Public Member Functions

virtual void register_receiver (base::Uuid class_id, IObject_receiver *receiver)=0
 Registers a receiver with the distributed cache. More...
 
virtual void unregister_receiver (base::Uuid class_id)=0
 Unregisters a receiver with the distributed cache. More...
 
virtual Sint32 store_object (ISerializable *serializable, bool cluster_only=true)=0
 Stores an object in the distributed cache. More...
 
virtual void remove_object (ISerializable *serializable)=0
 Removes an object from the cache. 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 IInterfaceget_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 IInterfaceget_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< 0x29582fa9, ... >
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< 0x29582fa9, ... >
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...
 

Detailed Description

The distributed cache service can be used to create temporary objects in a cluster.

The distributed cache manages the distribution of objects and triggers the destruction of objects. The objects will exist on every host in the cluster. The creating host is the owner of an object, each object can have only one owner. It will be destroyed on remote hosts when the owner removes the object or when the owner leaves the network. A stored object can be changed but no synchronization of changes with other hosts is done.

Member Function Documentation

 register_receiver()

virtual void mi::neuraylib::IDistributed_cache::register_receiver ( base::Uuid  class_id,
IObject_receiver receiver 
)
pure virtual

Registers a receiver with the distributed cache.

Each receiver will be responsible for one or more class IDs. It will be invoked when a remote host stored an object with one of the class IDs the receiver is responsible for. It will also be invoked when the object needs to be destroyed.

A previously registered receiver for this class ID will be unregistered.

Parameters
class_idID of the class this receiver will handle
receiverThe receiver object

 remove_object()

virtual void mi::neuraylib::IDistributed_cache::remove_object ( ISerializable serializable)
pure virtual

Removes an object from the cache.

The distributed cache notifies all hosts which received the notification from the store_object() call. The object itself is not destroyed or otherwise touched in any way.

Parameters
serializableThe object to remove

 store_object()

virtual Sint32 mi::neuraylib::IDistributed_cache::store_object ( ISerializable serializable,
bool  cluster_only = true 
)
pure virtual

Stores an object in the distributed cache.

The distributed cache notifies all remote hosts in either the whole network or in the cluster only (default) provided they registered a receiver for the corresponding class ID. Hosts which join after the object was stored but before the object was removed will also get notified.

Note
Due to a current limitation this notification is currently missing.
Parameters
serializableThe object to store
cluster_onlyThe flag indicates if the object is stored globally or only in the cluster.
Returns

 unregister_receiver()

virtual void mi::neuraylib::IDistributed_cache::unregister_receiver ( base::Uuid  class_id)
pure virtual

Unregisters a receiver with the distributed cache.

The cache will then remove all information about all objects of the given class ID to avoid calling the receiver in a later destroy_object() call. It will not call the destroy_object() function for any one of the removed objects during removal of the information about these class IDs.

Parameters
class_idID of the class this receiver handled