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

Represents a connection to a cluster manager. More...

#include <icluster_manager_configuration.h>

Inheritance diagram for mi::neuraylib::ICluster_manager_connection:

Public Member Functions

virtual const char * get_address () const =0
 Returns the address of the cluster manager to which this connection connects to. More...
 
virtual Size get_number_of_compatible_software_packages () const =0
 Returns the number of compatible software packages. More...
 
virtual const ISoftware_packageget_compatible_software_package (Size index) const =0
 Returns a compatible software package. More...
 
virtual Size get_number_of_software_packages () const =0
 Returns the number of software packages. More...
 
virtual const ISoftware_packageget_software_package (Size index) const =0
 Returns a software package. More...
 
virtual const ICluster_pool_informationget_cluster_pool_information () const =0
 Returns information about the pool. More...
 
virtual ICluster_manager_clusterreserve_cluster (Size requested_nodes, const char *software_package_id, Sint32 *errors=0)=0
 Reserves a cluster of nodes from the pool of free nodes. More...
 
virtual Sint32 release_cluster ()=0
 Releases the reserved cluster for this user. More...
 
virtual ICluster_manager_clusterget_cluster ()=0
 Returns the reserved cluster for this user, or NULL if there is none. More...
 
virtual void set_cluster_notification_callback (ICluster_notification_callback *callback)=0
 Sets a callback to be called in case of certain events. More...
 
virtual bool authenticate_user (const char *user_name, const char *password, bool *is_admin=0, Sint32 *errors=0)=0
 Checks whether an user exists on the cluster manager and whether the password matches. More...
 
virtual void set_auto_release_cluster (bool auto_release_enabled)=0
 Sets if a reserved cluster should be auto-released, if this connection is closed / lost for example because of a network outage or a crash of the client process. More...
 
virtual bool get_auto_release_cluster ()=0
 Return if auto-release is enabled or not. More...
 
virtual const char * get_vca_name () const =0
 Get the name of the VCA to which this connections connects to. 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< 0x0a54aeb4, ... >
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< 0x0a54aeb4, ... >
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

Represents a connection to a cluster manager.

The connection allows inquiring information about the cluster manager and the nodes in the pool. Furthermore, it allows reserving a cluster of nodes.

See also
mi::neuraylib::ICluster_manager_configuration::connect()

Member Function Documentation

 authenticate_user()

virtual bool mi::neuraylib::ICluster_manager_connection::authenticate_user ( const char *  user_name,
const char *  password,
bool *  is_admin = 0,
Sint32 errors = 0 
)
pure virtual

Checks whether an user exists on the cluster manager and whether the password matches.

This can be used to share an authentication database between a cluster manager and a connected application.

Parameters
user_nameUser name of the user to be checked.
passwordPassword of the user to be checked.
[out]is_adminAn optional pointer to a bool to which the information is written whether an authenticated user is an admin. If the user could not be authenticated, then the content is undefined.
[out]errorsAn optional pointer to an mi::Sint32 to which an error code will be written. The error codes have the following meaning:
  • 0: Success.
  • -3: The connection to the cluster manager broke down.
  • -5: The request timed out. Please check if the cluster manager is working properly.
Returns
true, if the user could be authenticated, or false otherwise.

 get_address()

virtual const char * mi::neuraylib::ICluster_manager_connection::get_address ( ) const
pure virtual

Returns the address of the cluster manager to which this connection connects to.

 get_auto_release_cluster()

virtual bool mi::neuraylib::ICluster_manager_connection::get_auto_release_cluster ( )
pure virtual

Return if auto-release is enabled or not.

Returns
True, if auto-release is enabled, false otherwise.

 get_cluster()

virtual ICluster_manager_cluster * mi::neuraylib::ICluster_manager_connection::get_cluster ( )
pure virtual

Returns the reserved cluster for this user, or NULL if there is none.

Note
This method also returns the cluster if it was reserved by other means than via reserve_cluster(), e.g., via a GUI.

 get_cluster_pool_information()

virtual const ICluster_pool_information * mi::neuraylib::ICluster_manager_connection::get_cluster_pool_information ( ) const
pure virtual

Returns information about the pool.

This will ask the cluster manager for the information and block until the information was received.

 get_compatible_software_package()

virtual const ISoftware_package * mi::neuraylib::ICluster_manager_connection::get_compatible_software_package ( Size  index) const
pure virtual

Returns a compatible software package.

An installed software package is compatible if its Bridge version is compatible with the client's Bridge version.

See also
get_number_of_compatible_software_packages()
Parameters
indexThe index of the software package.
Returns
The index-th software package or NULL if index is out of bounds.

 get_number_of_compatible_software_packages()

virtual Size mi::neuraylib::ICluster_manager_connection::get_number_of_compatible_software_packages ( ) const
pure virtual

Returns the number of compatible software packages.

An installed software package is compatible if its Bridge version is compatible with the client's Bridge version.

See also
get_compatible_software_package()

 get_number_of_software_packages()

virtual Size mi::neuraylib::ICluster_manager_connection::get_number_of_software_packages ( ) const
pure virtual

Returns the number of software packages.

See also
get_software_package()

 get_software_package()

virtual const ISoftware_package * mi::neuraylib::ICluster_manager_connection::get_software_package ( Size  index) const
pure virtual

Returns a software package.

See also
get_number_of_software_packages()
Parameters
indexThe index of the software package.
Returns
The index-th software package or NULL if index is out of bounds.

 get_vca_name()

virtual const char * mi::neuraylib::ICluster_manager_connection::get_vca_name ( ) const
pure virtual

Get the name of the VCA to which this connections connects to.

Returns
The name of the VCA or VCA pool.

 release_cluster()

virtual Sint32 mi::neuraylib::ICluster_manager_connection::release_cluster ( )
pure virtual

Releases the reserved cluster for this user.

Note
This method must not be called from within a callback.
Returns
  • 0: Success.
  • -1: Cluster could not be released/was immediately re-established.
  • -2: No cluster is running at the moment.

 reserve_cluster()

virtual ICluster_manager_cluster * mi::neuraylib::ICluster_manager_connection::reserve_cluster ( Size  requested_nodes,
const char *  software_package_id,
Sint32 errors = 0 
)
pure virtual

Reserves a cluster of nodes from the pool of free nodes.

Note
Currently only one cluster may be reserved at a time. This method must not be called from within a callback.
Parameters
requested_nodesThe number of nodes requested for the cluster. This is the maximum number of nodes. The returned cluster may contain fewer nodes.
software_package_idThe ID of the software package which should be started. The value NULL can be used to specify that no software package should be started as part of the reservation process.
[out]errorsAn optional pointer to an mi::Sint32 to which an error code will be written. The error codes have the following meaning:
  • 0: Success.
  • -1: No nodes were available.
  • -2: There was already running cluster. Release that first.
  • -3: The connection to the cluster manager broke down.
  • -4: The selected software package is not available
  • -5: The request timed out. Please check if the cluster manager is working properly.
Returns
The reserved cluster or NULL in case of failure.
Note
Releasing the returned interface will not release the reserved cluster. Use release_cluster() to release the reserved cluster.

 set_auto_release_cluster()

virtual void mi::neuraylib::ICluster_manager_connection::set_auto_release_cluster ( bool  auto_release_enabled)
pure virtual

Sets if a reserved cluster should be auto-released, if this connection is closed / lost for example because of a network outage or a crash of the client process.

If set, then any reserved cluster will be released by the VCA manager when the connection is closed from its point of view. The default is that auto-release is not enabled.

Parameters
auto_release_enabledTrue, if auto-release should be enabled, false otherwise.

 set_cluster_notification_callback()

virtual void mi::neuraylib::ICluster_manager_connection::set_cluster_notification_callback ( ICluster_notification_callback callback)
pure virtual

Sets a callback to be called in case of certain events.

If there was a previously installed callback, it will be released.

Note
This method must not be called from within such a callback.
Parameters
callbackThe new callback object.