neuray API Programmer's Manual

mi::neuraylib::ICluster_descriptor Class Reference

[Node manager]

Description

This interface describes a cluster and its properties.

Public Member Functions

virtual const IWorker_node_descriptorget_head_node() const =0
Returns the head node. More...
virtual const IStringget_multicast_address() const =0
Returns the multicast address reserved for the cluster. More...
virtual Size get_number_of_client_nodes() const =0
Returns the number of client nodes connected to the cluster.
virtual Size get_number_of_worker_nodes() const =0
Returns the number of worker nodes in the cluster.
virtual const IMapget_properties() const =0
Returns the properties of the cluster. More...
virtual Float64 get_timeout() const =0
Returns the keep-alive timeout for the cluster. More...
virtual const IWorker_node_descriptorget_worker_node( Size index) const =0
Returns a descriptor for a worker node in the cluster. More...

Member Functions

virtual const IWorker_node_descriptor* mi::​neuraylib::​ICluster_descriptor::get_head_node() const [pure virtual]

Returns the head node. The head node is a cluster member flagged by the node manager for applications that need support for a head node. It can be referenced by a placeholder substring in the argument string passed to mi::neuraylib::INode_manager_client::join_or_create_cluster().

See also:

mi::neuraylib::INode_manager_client::join_or_create_cluster() for how to reference the head node in the argument string.

Returns

The descriptor for the head node, or NULL if no head node has been flagged.

virtual const IString* mi::​neuraylib::​ICluster_descriptor::get_multicast_address() const [pure virtual]

Returns the multicast address reserved for the cluster. This multicast address may be used for communication among the child processes running in that cluster. It may also be used by client nodes to communicate with these child processes.

Returns

The multicast address and port.

virtual Size mi::​neuraylib::​ICluster_descriptor::get_number_of_client_nodes() const [pure virtual]

Returns the number of client nodes connected to the cluster.

virtual Size mi::​neuraylib::​ICluster_descriptor::get_number_of_worker_nodes() const [pure virtual]

Returns the number of worker nodes in the cluster.

virtual const IMap* mi::​neuraylib::​ICluster_descriptor::get_properties() const [pure virtual]

Returns the properties of the cluster. The type of the map is "Map<String>".

Returns

A map containing the properties associated with the cluster.

virtual Float64 mi::​neuraylib::​ICluster_descriptor::get_timeout() const [pure virtual]

Returns the keep-alive timeout for the cluster. The keep-alive timeout specifies the amount of time (in seconds) the cluster will remain operational after the last client left the cluster.

See also:

mi::neuraylib::INode_manager_cluster::set_timeout()

virtual const IWorker_node_descriptor* mi::​neuraylib::​ICluster_descriptor::get_worker_node( Size index) const [pure virtual]

Returns a descriptor for a worker node in the cluster.

Note:

The set of worker nodes in the cluster can change at any time. That is, this function can return NULL even if index is smaller than the result of the last call to get_number_of_worker_nodes().

Parameters

index
The index of the worker node (from 0 to get_number_of_worker_nodes()-1).

Returns

The descriptor for the specified worker node, or NULL if index is out of bounds.