NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
inode_manager.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // Copyright 1986, 2014 NVIDIA Corporation. All rights reserved.
3 //*****************************************************************************
6 //*****************************************************************************
7 
8 #ifndef MI_NEURAYLIB_INODE_MANAGER_H
9 #define MI_NEURAYLIB_INODE_MANAGER_H
10 
12 
13 namespace mi {
14 
15 class IString;
16 class IMap;
17 
18 namespace neuraylib {
19 
80 
85 class IWorker_node_descriptor : public
87  mi::base::Interface_declare<0x29a6d6a5,0xfaa9,0x48dc,0x87,0xc5,0xee,0xa5,0x83,0x2c,0xe9,0xb3>
88 {
89 public:
91  virtual const IString* get_address() const = 0;
92 
94  virtual bool is_in_cluster() const = 0;
95 
113  virtual const IMap* get_properties() const = 0;
114 };
115 
117 class ICluster_descriptor : public
118  mi::base::Interface_declare<0xf83a075b,0xf3d1,0x46a9,0xb6,0x75,0x91,0x10,0x1c,0xa3,0x5a,0x9f>
119 {
120 public:
128  virtual const IString* get_multicast_address() const = 0;
129 
136  virtual Float64 get_timeout() const = 0;
137 
143  virtual const IMap* get_properties() const = 0;
144 
146  virtual Size get_number_of_worker_nodes() const = 0;
147 
157  virtual const IWorker_node_descriptor* get_worker_node( Size index) const = 0;
158 
160  virtual Size get_number_of_client_nodes() const = 0;
161 };
162 
173  mi::base::Interface_declare<0x36a1317b,0xfbc1,0x4ef5,0xbf,0x38,0x57,0x1a,0xca,0x6d,0x22,0x9f>
174 {
175 public:
184  virtual void property_callback(
185  const ICluster_descriptor* cluster_descriptor, const char* changed_property_name) = 0;
186 };
187 
198  mi::base::Interface_declare<0x3c14c356,0xde2c,0x4991,0x9a,0x7f,0x50,0x53,0x5d,0x2a,0x9f,0x5a>
199 {
200 public:
209  virtual void property_callback(
210  const IWorker_node_descriptor* worker_descriptor, const char* changed_property_name) = 0;
211 };
212 
222 class IClient_node_callback : public
223  mi::base::Interface_declare<0x441ca19c,0xa7d7,0x46fa,0x92,0xc3,0x14,0xe0,0x4b,0x66,0x13,0x55>
224 {
225 public:
233  virtual void membership_callback( const char* address, bool flag) = 0;
234 };
235 
245 class IWorker_node_callback : public
246  mi::base::Interface_declare<0xd5472198,0xf755,0x4db8,0x82,0x49,0x74,0xf7,0x95,0xb5,0x58,0xee>
247 {
248 public:
256  virtual void membership_callback( IWorker_node_descriptor* worker_descriptor, bool flag) = 0;
257 };
258 
268 class IHead_node_callback : public
269  mi::base::Interface_declare<0xf07bba0e,0x249f,0x4c6d,0x97,0x57,0x48,0xa7,0xf8,0xe7,0xe6,0x5a>
270 {
271 public:
278  virtual void head_node_callback( IWorker_node_descriptor* worker_descriptor) = 0;
279 };
280 
289 class INode_manager_cluster : public
290  mi::base::Interface_declare<0x0a58b727,0x0ed4,0x4ecf,0x90,0x9a,0x30,0x7c,0x65,0xd4,0x47,0xe8>
291 {
292 public:
294  virtual const ICluster_descriptor* get_cluster_descriptor() const = 0;
295 
300  {
304  CLUSTER_FORCE_32_BIT = 0xffffffffU
305  };
306 
308  virtual Cluster_status get_cluster_status() const = 0;
309 
318  virtual void set_timeout( Float64 timeout) = 0;
319 
333  virtual Sint32 set_cluster_property( const char* name, const char* value) = 0;
334 
348  virtual Sint32 remove_cluster_property( const char* name) = 0;
349 
359  virtual Sint32 shutdown_worker_program() = 0;
360 
369  virtual Sint32 restart_worker_program() = 0;
370 
375  virtual void shutdown() = 0;
376 
388  virtual IWorker_node_descriptor* get_head_node() = 0;
389 
399 
406 
415  virtual void add_cluster_property_callback( ICluster_property_callback* callback) = 0;
416 
423 
432  virtual void add_worker_node_callback( IWorker_node_callback* callback) = 0;
433 
439  virtual void remove_worker_node_callback( IWorker_node_callback* callback) = 0;
440 
449  virtual void add_client_node_callback( IClient_node_callback* callback) = 0;
450 
456  virtual void remove_client_node_callback( IClient_node_callback* callback) = 0;
457 
465  virtual void add_head_node_callback( IHead_node_callback* callback) = 0;
466 
472  virtual void remove_head_node_callback( IHead_node_callback* callback) = 0;
473 };
474 
476 
478 class ICluster_filter : public
479  mi::base::Interface_declare<0x63a3ced9,0x9ae6,0x4c3a,0x80,0xc2,0x80,0x6b,0x27,0xff,0x40,0xd1>
480 {
481 public:
486  virtual bool is_eligible( const ICluster_descriptor* cluster_descriptor) = 0;
487 };
488 
490 class IWorker_node_filter : public
491  mi::base::Interface_declare<0x9af36fa0,0xbe40,0x4fe4,0x89,0x03,0x37,0x7e,0x12,0xaf,0xcb,0xc8>
492 {
493 public:
499  virtual bool is_eligible( const IWorker_node_descriptor* worker_node_descriptor) = 0;
500 };
501 
506 class INode_manager_client : public
507  mi::base::Interface_declare<0xe8feacc5,0x1f7c,0x4abc,0x8a,0x23,0x50,0x3c,0x56,0xf4,0xa6,0x63>
508 {
509 public:
520  virtual Sint32 start( const char* listen_address,
521  bool tcp = false,
522  const char* cluster_interface = NULL) = 0;
523 
527  virtual Sint32 shutdown() = 0;
528 
532  virtual const IString* get_listen_address() const = 0;
533 
546  virtual Sint32 set_multicast_base_address( const char* base_address) = 0;
547 
558  virtual const IString* get_multicast_base_address() const = 0;
559 
561  virtual Size get_number_of_worker_nodes() const = 0;
562 
572  virtual const IWorker_node_descriptor* get_worker_node( Size index) const = 0;
573 
635  Size min_number_of_requested_worker_nodes,
636  Size max_number_of_requested_worker_nodes,
637  ICluster_filter* cluster_filter,
638  IWorker_node_filter* worker_node_filter,
639  const char* program_name,
640  const char* argument_string,
641  Uint32 child_process_timeout = 0) = 0;
642 
644  virtual Size get_number_of_clusters() const = 0;
645 
655  virtual const ICluster_descriptor* get_cluster(Size index) const = 0;
656 };
657 
660 class IChild_process_resolver : public
661  mi::base::Interface_declare<0xbd1ab5cb,0x2794,0x4cd8,0x99,0xa9,0x30,0x36,0x32,0x8a,0xca,0xff>
662 {
663 public:
677  virtual const IString* resolve_process(
678  const char* program_name, const char* program_arguments) = 0;
679 };
680 
685 class INode_manager_worker : public
686  mi::base::Interface_declare<0xeb232bd5,0x0abf,0x4872,0xab,0x18,0x92,0x49,0x31,0x36,0xf9,0x91>
687 {
688 public:
706  virtual Sint32 start( const char* listen_address,
707  bool tcp = false,
708  const char* cluster_interface = NULL) = 0;
709 
713  virtual Sint32 shutdown() = 0;
714 
718  virtual const IString* get_listen_address() const = 0;
719 
732  virtual Sint32 set_multicast_base_address( const char* base_address) = 0;
733 
744  virtual const IString* get_multicast_base_address() const = 0;
745 
757  virtual Sint32 set_property( const char* name, const char* value) = 0;
758 
766  virtual const IString* get_property( const char* name) const = 0;
767 
779  virtual Sint32 remove_property( const char* name) = 0;
780 
789  virtual void set_child_process_resolver( IChild_process_resolver* child_process_resolver) = 0;
790 
797 };
798 
800 class INode_manager_factory : public
801  mi::base::Interface_declare<0xd54aaa9c,0x4798,0x4405,0xa4,0x58,0xd8,0x63,0x44,0xb4,0xb1,0xdd>
802 {
803 public:
805  virtual INode_manager_client* create_client() = 0;
806 
808  virtual INode_manager_worker* create_worker() = 0;
809 };
810  // end group mi_neuray_node_manager
812 
813 } // namespace neuraylib
814 
815 } // namespace mi
816 
817 #endif // MI_NEURAYLIB_INODE_MANAGER_H