NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IHost_callback Class Referenceabstract

Abstract interface to report cluster status changes. More...

Inheritance diagram for mi::neuraylib::IHost_callback:
Inheritance graph
[legend]

Public Member Functions

virtual void  connection_callback (Uint32 host_id, bool flag)=0
  This function is called when this host established or lost the connection to the cluster. More...
 
virtual void  membership_callback (Uint32 host_id, bool flag)=0
  This function is called when a remote host joined or left the cluster. More...
 
virtual void  property_callback (Uint32 host_id, const IHost_properties *properties)=0
  This function is called when a remote host communicates its properties. More...
 
virtual void  synchronizer_callback (Uint32 host_id)=0
  This function is called whenever the synchronizer host changes. More...
 
virtual void  database_status_callback (const char *status)=0
  This function is called when the database changes status. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x39163199, 0xfd6a, 0x4c53, 0xa8, 0x00, 0xdd, 0x70, 0xc6, 0xbc, 0x61, 0xf3 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x39163199, 0xfd6a, 0x4c53, 0xa8, 0x00, 0xdd, 0x70, 0xc6, 0xbc, 0x61, 0xf3 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

Abstract interface to report cluster status changes.

Each of the methods below deals with a certain type of cluster status changes, for example, hosts joining or leaving a cluster.

Users can implement this interface and register an instance of the implementation class as callback object to be notified in case of cluster status changes (see mi::neuraylib::INetwork_configuration::register_host_callback()).

Note
Instances of this interface should not be created on the stack, since this might lead to premature destruction of such instances while still being in use by Iray.

Member Function Documentation

virtual void mi::neuraylib::IHost_callback::connection_callback ( Uint32  host_id,
bool  flag 
)
pure virtual

This function is called when this host established or lost the connection to the cluster.

It should return as soon as possible because it may block further network operations.

Parameters
host_id The host ID of this host. This ID is guaranteed to be unique in a cluster and will never be reused for another host.
flag true in case of an established connection, false in case of a lost connection.
virtual void mi::neuraylib::IHost_callback::database_status_callback ( const char *  status)
pure virtual

This function is called when the database changes status.

When the database is fully operational the function will be called first with the status "ok". When the database is recovering from a host failure the function will be called with the status "recovery". When the recovery is finished the function will be called with the status "ok" again.

Note that the database can switch to recovery mode when a host is started. This happens when the configured redundancy level could not be reached because simply not enough hosts where present before.

Parameters
status The status of the database.
virtual void mi::neuraylib::IHost_callback::membership_callback ( Uint32  host_id,
bool  flag 
)
pure virtual

This function is called when a remote host joined or left the cluster.

It should return as soon as possible because it may block further network operations.

Parameters
host_id The host ID of the host joining or leaving. This ID is guaranteed to be unique in a cluster and will never be reused for another host.
flag true in case of a joining host, false in case of a leaving host.
virtual void mi::neuraylib::IHost_callback::property_callback ( Uint32  host_id,
const IHost_properties properties 
)
pure virtual

This function is called when a remote host communicates its properties.

It should return as soon as possible because it may block further network operations.

Parameters
host_id The host ID of the remote host. This ID is guaranteed to be unique in a cluster and will never be reused for another host.
properties The properties of the remote host, e.g., its address.
virtual void mi::neuraylib::IHost_callback::synchronizer_callback ( Uint32  host_id)
pure virtual

This function is called whenever the synchronizer host changes.

It can be used to record the synchronizer ID for display usages. Since it is guaranteed that there is at any point in time exactly one synchronizer in a working cluster it can also be used to do certain tasks only on the synchronizer.

Parameters
host_id The host ID of the new synchronizer.