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

This class represents an additional cluster to be used for storing data, communicating, and executing jobs. More...

#include <icluster.h>

Inheritance diagram for mi::neuraylib::ICluster:

Public Member Functions

virtual base::IInterfaceget_api_component (const base::Uuid &uuid) const =0
 Returns an API component belonging to this cluster. More...
 
template<class T>
T * get_api_component () const
 Returns an API component belonging to this cluster. More...
 
virtual Sint32 join (bool blocking=true)=0
 Joins the cluster. More...
 
virtual Sint32 leave (bool blocking=true)=0
 Leaves the cluster. More...
 
virtual neuraylib::INeuray::Status get_status () const =0
 Returns the status of this cluster. More...
 
virtual const IHost_propertiesget_host_properties () const =0
 Returns the host properties for this host. More...
 
virtual Sint32 set_host_property (const char *key, const char *value)=0
 Sets a host property for this host. 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< 0x4511782c, ... >
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< 0x4511782c, ... >
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

This class represents an additional cluster to be used for storing data, communicating, and executing jobs.

This interface is similar to mi::neuraylib::INeuray in the sense that it exposes its functionality via several API components. In contrast to mi::neuraylib::INeuray it offers only a small set of API components that are relevant for the functionality of the additional cluster, e.g., networking and scheduling configuration, the cluster-specific database and distributed cache. Instances of this interface can be created via the API component mi::neuraylib::ICluster_factory.

Note
Each cluster has its own database and distributed cache. The database from which the scope and transaction was obtained controls which cluster executes submitted jobs.
Log messages are never forwarded via an additional cluster (from the view point of the sending host). This might only happen via the main cluster. Although hosts may receive log messages from other hosts via an additional cluster (from the view point of the receiving host) in case this cluster is the main cluster for the sending host.

Member Function Documentation

 get_api_component() [1/2]

template<class T>
T * mi::neuraylib::ICluster::get_api_component ( ) const
inline

Returns an API component belonging to this cluster.

This interface supports only a subset of the available API components, namely those which are available per cluster. Currently, the supported API components are:

Template Parameters
TThe type of the API components to be queried.
Returns
A pointer to the API component or NULL if the API component is not supported or currently not available.

 get_api_component() [2/2]

virtual base::IInterface * mi::neuraylib::ICluster::get_api_component ( const base::Uuid uuid) const
pure virtual

Returns an API component belonging to this cluster.

This interface supports only a subset of the available API components, namely those which are available per cluster. Currently, the supported API components are:

Parameters
uuidThe interface ID of the corresponding interface.
Returns
A pointer to the API component or NULL if the API component is not supported or currently not available.

 get_host_properties()

virtual const IHost_properties * mi::neuraylib::ICluster::get_host_properties ( ) const
pure virtual

Returns the host properties for this host.

The host properties returned by this method are specific for this cluster. The host properties handled in mi::neuraylib::IGeneral_configuration apply only to the main cluster.

Host properties are only available after the additional cluster has been started.

Returns
The host properties for this host, or NULL on error.

 get_status()

virtual neuraylib::INeuray::Status mi::neuraylib::ICluster::get_status ( ) const
pure virtual

Returns the status of this cluster.

Returns
The status

 join()

virtual Sint32 mi::neuraylib::ICluster::join ( bool  blocking = true)
pure virtual

Joins the cluster.

This method should be called after all parameters for the cluster have been configured. It will then join the cluster according to the given settings.

Parameters
blockingIndicates whether the startup should be done in blocking mode. If true the method will not return before all initialization was done. If false the method will return immediately and the startup is done in a separate thread. The status of the startup sequence can be checked via get_status().
Returns
  • 0: Success
  • -1: Unspecified failure.

 leave()

virtual Sint32 mi::neuraylib::ICluster::leave ( bool  blocking = true)
pure virtual

Leaves the cluster.

 set_host_property()

virtual Sint32 mi::neuraylib::ICluster::set_host_property ( const char *  key,
const char *  value 
)
pure virtual

Sets a host property for this host.

The host properties set by this method are specific for this cluster. The host properties handled in mi::neuraylib::IGeneral_configuration apply only to the main cluster.

The change will be propagated to all other hosts in the cluster. The method only works if networking support is available.

Parameters
keyThe key for the property.
valueThe property value.
Returns
0, in case of success, -1 in case of failure.