The interface to a cluster created and managed by the node manager. More...
Public Types | |
enum |
Cluster_status { CLUSTER_ESTABLISHED = 0, CLUSTER_SHUTDOWN = 1, CLUSTER_FAILURE = 2 } |
Possible cluster states. More... |
|
Public Types inherited from mi::base::Interface_declare< 0x0a58b727, 0x0ed4, 0x4ecf, 0x90, 0x9a, 0x30, 0x7c, 0x65, 0xd4, 0x47, 0xe8 > | |
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... |
|
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... |
|
Public Member Functions | |
virtual const ICluster_descriptor * | get_cluster_descriptor () const =0 |
Returns the cluster descriptor for the cluster. More... |
|
virtual Cluster_status | get_cluster_status () const =0 |
Returns the status of the cluster. More... |
|
virtual void | set_timeout (Float64 timeout)=0 |
Sets the keep-alive timeout for the cluster. More... |
|
virtual Sint32 | set_cluster_property (const char *name, const char *value)=0 |
Sets a cluster property. More... |
|
virtual Sint32 | remove_cluster_property (const char *name)=0 |
Removes a cluster property. More... |
|
virtual Sint32 | shutdown_worker_program ()=0 |
Shuts down the program that was started on all worker nodes when the cluster was created. More... |
|
virtual Sint32 | restart_worker_program ()=0 |
Restarts the program that is supposed to run on all workers. More... |
|
virtual void | shutdown ()=0 |
Initiates the shutdown of the cluster. More... |
|
virtual IWorker_node_descriptor * | get_head_node ()=0 |
Returns the head node. More... |
|
virtual void | add_worker_property_callback (IWorker_node_property_callback *callback)=0 |
Adds a callback to be called when a property of a worker node changes. More... |
|
virtual void | remove_worker_property_callback (IWorker_node_property_callback *callback)=0 |
Removes a previously added callback for property changes of worker nodes. More... |
|
virtual void | add_cluster_property_callback (ICluster_property_callback *callback)=0 |
Adds a callback to be called when a cluster property changes. More... |
|
virtual void | remove_cluster_property_callback (ICluster_property_callback *callback)=0 |
Removes a previously added callback for cluster property changes. More... |
|
virtual void | add_worker_node_callback (IWorker_node_callback *callback)=0 |
Adds a callback to be called when a worker node joins or leaves the cluster. More... |
|
virtual void | remove_worker_node_callback (IWorker_node_callback *callback)=0 |
Removes a previously added callback for joined or left worker nodes. More... |
|
virtual void | add_client_node_callback (IClient_node_callback *callback)=0 |
Adds a callback to be called when a client joins or leaves the cluster. More... |
|
virtual void | remove_client_node_callback (IClient_node_callback *callback)=0 |
Removes a previously added callback for joined or left client nodes. More... |
|
virtual void | add_head_node_callback (IHead_node_callback *callback)=0 |
Adds a callback to be called when a new node becomes head node. More... |
|
virtual void | remove_head_node_callback (IHead_node_callback *callback)=0 |
Removes a previously added callback for notification about a new head node. More... |
|
Additional Inherited Members | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x0a58b727, 0x0ed4, 0x4ecf, 0x90, 0x9a, 0x30, 0x7c, 0x65, 0xd4, 0x47, 0xe8 > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
The interface to a cluster created and managed by the node manager.
As long as an application holds this interface, the application will be part of the cluster. Releasing the last handle to this interface gives up cluster membership. When that happens, the node manager will check if there are no more clients. If there are still clients, the cluster will be kept alive. If there are none, then the optional timeout will be started. After the timeout elapsed without another client joining, or immediately if there is no timeout, the cluster will be shut down.
Possible cluster states.
Enumerator | |
---|---|
CLUSTER_ESTABLISHED |
The cluster has been successfully established. |
CLUSTER_SHUTDOWN |
The cluster has been shutdown. |
CLUSTER_FAILURE |
The cluster has failed for unspecified reasons. |
|
pure virtual |
Adds a callback to be called when a client joins or leaves the cluster.
Note that when adding a callback, it will be called automatically for all client nodes already in the cluster.
callback | The callback to be added. |
|
pure virtual |
Adds a callback to be called when a cluster property changes.
When adding a callback it will be called immediately once. The cluster descriptor will contain all cluster properties known at this point.
callback | The callback to be added. |
|
pure virtual |
Adds a callback to be called when a new node becomes head node.
When adding a callback, it will be called immediately once.
callback | The callback to be added. |
|
pure virtual |
Adds a callback to be called when a worker node joins or leaves the cluster.
Note that when adding a callback, it will be called automatically for all worker nodes already in the cluster.
callback | The callback to be added. |
|
pure virtual |
Adds a callback to be called when a property of a worker node changes.
When adding a callback it will be called immediately once for all worker nodes existing at this point. The descriptor contains all properties for the worker node known at this point.
callback | The callback to be added. |
|
pure virtual |
Returns the cluster descriptor for the cluster.
|
pure virtual |
Returns the status of the cluster.
|
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().
NULL
if no head node has been flagged.
|
pure virtual |
Removes a previously added callback for joined or left client nodes.
callback | The callback to be removed. |
|
pure virtual |
Removes a cluster property.
This change will be forwarded immediately to all clients.
name | The name of the property to remove. |
NULL
pointer).
|
pure virtual |
Removes a previously added callback for cluster property changes.
callback | The callback to be removed. |
|
pure virtual |
Removes a previously added callback for notification about a new head node.
callback | The callback to be removed. |
|
pure virtual |
Removes a previously added callback for joined or left worker nodes.
callback | The callback to be removed. |
|
pure virtual |
Removes a previously added callback for property changes of worker nodes.
callback | The callback to be removed. |
|
pure virtual |
Restarts the program that is supposed to run on all workers.
The program command line used will be the same that was passed to mi::neuraylib::INode_manager_client::join_or_create_cluster() when the cluster was created.
|
pure virtual |
Sets a cluster property.
This change will be forwarded immediately to all clients.
name | The name of the property to set. |
value | The value string to be set for the property. |
NULL
pointers).
|
pure virtual |
Sets 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. If no timeout is set, the value defaults to 0, meaning the cluster will be shut down as soon as the last connected client disconnects.
|
pure virtual |
Initiates the shutdown of the cluster.
This method shuts down the cluster unconditionally, independent of the keep-alive timeout or the number of client nodes using the cluster.
|
pure virtual |
Shuts down the program that was started on all worker nodes when the cluster was created.
The cluster with all worker nodes is retained. This call will usually followed by a call to restart_worker_program().