The node manager worker class allows to set properties and announce them to other nodes. More...
#include <inode_manager.h>
Public Member Functions | |
virtual Sint32 | start (const char *listen_address=0, bool tcp=false, const char *discovery_address=0, const char *cluster_interface=0)=0 |
Starts the operation of the node manager. More... | |
virtual Sint32 | shutdown ()=0 |
Shuts down the operation of the node manager. More... | |
virtual const IString * | get_listen_address () const =0 |
Returns the listen address used by the node manager. More... | |
virtual Sint32 | set_multicast_base_address (const char *base_address)=0 |
Sets the multicast base address. More... | |
virtual const IString * | get_multicast_base_address () const =0 |
Returns the multicast base address. More... | |
virtual Sint32 | set_property (const char *name, const char *value)=0 |
Sets a property of a worker node. More... | |
virtual const IString * | get_property (const char *name) const =0 |
Returns a property of a worker node. More... | |
virtual Sint32 | remove_property (const char *name)=0 |
Removes a property of a worker node. More... | |
virtual void | set_child_process_resolver (IChild_process_resolver *child_process_resolver)=0 |
Sets the child process resolver. More... | |
virtual IChild_process_resolver * | get_child_process_resolver () const =0 |
Returns the child process resolver. More... | |
virtual void | add_shutdown_node_managers_callback (IShutdown_node_managers_callback *callback)=0 |
Adds a callback to be called when a request to shutdown all clients and workers is received. More... | |
virtual void | remove_shutdown_node_managers_callback (IShutdown_node_managers_callback *callback)=0 |
Removes a previously added callback to be called when a request to shutdown all clients and workers is received. 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 IInterface * | get_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 IInterface * | get_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< 0xeb232bd5, ... > | |
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< 0xeb232bd5, ... > | |
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... | |
The node manager worker class allows to set properties and announce them to other nodes.
It also allows a client node to start child processes. It should be used in a process running on the worker nodes.
|
pure virtual |
Adds a callback to be called when a request to shutdown all clients and workers is received.
callback | The callback to be added. |
|
pure virtual |
Returns the child process resolver.
|
pure virtual |
Returns the listen address used by the node manager.
|
pure virtual |
Returns the multicast base address.
The node manager reserves a unique multicast address for each cluster that it manages. These multicast addresses start at the multicast base address and are obtained by incrementing the last octet, then the second-last octet, and so on.
|
pure virtual |
Returns a property of a worker node.
name | The name of the property to get. |
NULL
if there is no property with the given name.
|
pure virtual |
Removes a property of a worker node.
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 to be called when a request to shutdown all clients and workers is received.
callback | The callback to be removed. |
|
pure virtual |
Sets the child process resolver.
child_process_resolver | The new child process resolver. The value NULL can be used to remove the current child process resolver (which effectively is the same as a child process resolver instance that returns its first argument unchanged). |
|
pure virtual |
Sets the multicast base address.
The node manager reserves a unique multicast address for each cluster that it manages. These multicast addresses start at the multicast base address and are obtained by incrementing the last octet, then the second-last octet, and so on.
base_address | A multicast address to be used as a base when reserving cluster multicast addresses. |
|
pure virtual |
Sets a property of a worker node.
This change will be forwarded immediately to all clients.
name | The name of the property. |
value | The value to set for the property. |
NULL
pointers).
|
pure virtual |
Shuts down the operation of the node manager.
|
pure virtual |
Starts the operation of the node manager.
For the optional cluster_interface parameter, the address can also be specified as a sub net using the CIDR notation a.b.c.d/xx. If there is an interface on the host with an address inside this range the first match will be used. This is useful for example when configuring several hosts. This means that on a host which has the address 192.168.1.1, specifying the address as 192.168.0.0/16:10000 would make the host bind to the 192.168.1.1 address on port 10000.
listen_address | The address used to communicate with other node manager instances. Should be a multicast address unless TCP networking is selected. |
tcp | Indicates whether TCP or UDP should be used. |
discovery_address | The address of the TCP head node used for host discovery. If this is the same as the listen address, the node will be head node. |
cluster_interface | The address of the cluster interface for listening. |