#include <ColCOWS_Node.hh>
Inheritance diagram for ColCOWS::Node:
The Node class is the front end of ColCOWS library, the one appearing in the user source code. It manages the local CORBA object references and the workspace descriptions, local and remote. The class provides the user with methods for controlling the workspace life-cycle (activation/deactivation, connection/disconnection) and for exploring the references of the local and remote workspaces.
TestClient.cc, TestClient2.cc, TestClient2_MPI.cc, TestServer.cc, and TestServer_MPI.cc.
Definition at line 73 of file ColCOWS_Node.hh.
Public Member Functions | |
Node () | |
constructor | |
virtual | ~Node () |
destructor | |
virtual void | printself (std::ostream &stream, int indent=0) const |
print self | |
void | activate () |
activate this node | |
void | deactivate () |
deactivate this node | |
bool | isActivated () const |
test if the collective node is activated | |
unsigned long | connect (const std::string &ws_id, const std::string &ws_kind) |
connect a remote workspace identified with an ID and a Kind on the local NameService | |
unsigned long | connect (const std::string &ws_id, const std::string &ws_kind, const std::string &nameservice_str) |
connect a remote workspace identified with an ID and a Kind on another NameService | |
void | disconnect (unsigned long num_connection) |
disconnect a remote workspace | |
void | disconnectAll () |
disconnect a remote workspace | |
bool | isConnected (std::string ws_id, std::string ws_kind) const |
test if a workspace named 'ws_id' of kind 'ws_kind' is connected and return its connection number | |
bool | isConnected (unsigned long num_connection) const |
test if a workspace with num_connection is connected and return its connection number | |
unsigned long | getNumConnection (std::string ws_id, std::string ws_kind) |
test if a workspace named 'ws_id' of kind 'ws_kind' is connected and return its connection number | |
void | getNumConnectionVec (std::vector< unsigned long > &num_connection_vec, std::string ws_id="", std::string ws_kind="") |
get a vector of connection numbers according to id or kind critera | |
unsigned long | getRemoteNbNodes (unsigned long num_connection, std::string node_kind="") |
get size of a remote workspace | |
std::string | getRemoteWorkspaceID (unsigned long num_connection) |
get id of a remote workspace | |
std::string | getRemoteWorkspaceKind (unsigned long num_connection) |
get kind of a remote workspace | |
WorkspaceDesc * | getRemoteWorkspace (unsigned int num_connection) |
get a remote remote workspace description | |
unsigned long | getLocalNbNodes (std::string node_kind="") const |
get size of the local workspace | |
std::string | getLocalWorkspaceID () const |
get id of the local workspace | |
std::string | getLocalWorkspaceKind () const |
get kind of the local workspace | |
WorkspaceDesc * | getLocalWorkspace () |
get the local workspace description | |
unsigned int | addEventHandler (EventHandler *event_handler) |
add an event handler in the manager | |
void | removeEventHandler (unsigned int key) |
remove an event handler from the manager | |
void | removeEventHandler (EventHandler *event_handler) |
remove an event handler from the manager | |
bool | waitActivation (bool use_timeout=true) |
wait end of activation | |
bool | waitDeactivation (bool use_timeout=true) |
wait end of deactivation | |
unsigned long | waitConnection (std::string ws_id, std::string ws_kind, bool use_timeout=true) |
wait the connection of a remote workspace | |
unsigned long | waitAllDisconnection (bool use_timeout=true) |
wait the disconnection of all the remote workspace | |
unsigned long | waitDisconnection (std::string ws_id, std::string ws_kind, bool use_timeout=true) |
wait the disconnection of a remote workspace | |
EventHandlerManager * | getEventHandlerManager () |
get a pointer on the associated event handler | |
void | setEventHandlerManager (EventHandlerManager *event_handler_manager) |
associate an event handler with the workspace | |
RemoteWorkspaceManager * | getRemoteWorkspaceManager () |
get a remote remote workspace manager | |
CORBA::ORB * | getORB () const |
get the ORB pointer | |
void | setORB (CORBA::ORB *orbp) |
set the ORB pointer | |
Static Public Member Functions | |
static Node * | New (std::string ws_id, std::string ws_kind, std::string node_kind, unsigned long num_node, unsigned long max_descendant, unsigned long nb_nodes, unsigned long num_father, CORBA::ORB *orbp) |
create a new node, full details | |
static Node * | NewHierachical (std::string ws_id, std::string ws_kind, unsigned long num_node, unsigned long nb_nodes, unsigned long base, CORBA::ORB *orbp) |
create a new node, in hierarchy | |
static Node * | NewNode (std::string ws_id, std::string ws_kind, std::string node_kind, unsigned long num_node, unsigned long nb_nodes, CORBA::ORB *orbp) |
create a new node, generical | |
static Node * | NewProxy (std::string ws_id, std::string ws_kind, unsigned long nb_nodes, CORBA::ORB *orbp) |
create a new node, as proxy | |
static Node * | NewPort (std::string ws_id, std::string ws_kind, unsigned long num_node, unsigned long nb_nodes, CORBA::ORB *orbp) |
create a new node, as node | |
Protected Member Functions | |
void | onActivation (const IdlWorkspaceDesc &ws_desc) |
treatment on the activation of the workspace | |
void | onDeactivation (const IdlWorkspaceDesc &ws_desc) |
treatment on the deactivation of the workspace | |
void | onConnection (unsigned long num_connection, const IdlWorkspaceDesc &ws_desc, bool initiator) |
treatment on the connection of a remote workspace | |
void | onDisconnection (unsigned long num_connection) |
treatment on the disconnection of a remote workspace | |
Static Protected Member Functions | |
static unsigned long | calculNumFather (unsigned long min, unsigned long max, unsigned long num_child, unsigned long base) |
static unsigned long | calculMaxDescend (unsigned long min, unsigned long max, unsigned long num_child, unsigned long base) |
Protected Attributes | |
CORBA::ORB * | _orbp |
Pointer on the ORB. | |
EventHandlerManager * | _event_handler_manager |
event handler | |
NodeServant * | _node_servant |
Implementation of CORBA interface. | |
WorkspaceDesc * | _local_workspace |
local workspace description | |
RemoteWorkspaceManager * | _remote_workspace_manager |
remote workspace manager | |
bool | _fully_activated |
boolean indicates the user activation treatements are terminated | |
pthread_mutex_t | _event_mut |
event mutex | |
pthread_cond_t | _event_cond |
event condition variable | |
Friends | |
class | NodeServant |
|
activate this node Do not ensure the workspace is activated after the return nor the "onActivation" treatments are done. Must call "waitActivation"
Definition at line 639 of file ColCOWS_Node.cc. References _node_servant, ColCOWS::NodeServant::activate(), and ColCOWS::NodeDesc::setActivated(). |
|
connect a remote workspace identified with an ID and a Kind on another NameService Ensure the workspace is connected and the "onConnection" treatments are done * Definition at line 454 of file ColCOWS_Node.cc. References _node_servant, and ColCOWS::NodeServant::connect(). |
|
connect a remote workspace identified with an ID and a Kind on the local NameService Ensure the workspace is connected and the "onConnection" treatments are done *
Definition at line 159 of file ColCOWS_Node.hh. |
|
deactivate this node Ensure the workspace is deactivated and the "onDeactivation" treatments are done *
Definition at line 657 of file ColCOWS_Node.cc. References _node_servant, ColCOWS::NodeServant::deactivate(), and ColCOWS::NodeDesc::setActivated(). |
|
disconnect a remote workspace Ensure the workspace is disconnected and the "onDisonnection" treatments are done * Definition at line 472 of file ColCOWS_Node.cc. References _node_servant, ColCOWS::NodeServant::disconnect(), and isConnected(). |
|
disconnect a remote workspace Ensure all the connection are closed and all the "onDisonnection" treatments are done *
Definition at line 492 of file ColCOWS_Node.cc. References _node_servant, and ColCOWS::NodeServant::disconnectAll(). |
|
wait end of activation Ensure local onActivation treatments are done *
Definition at line 776 of file ColCOWS_Node.cc. References _event_cond, _event_mut, _fully_activated, ColCOWS::WAITING_RETRY, and ColCOWS::WAITING_TIMEOUT. |
|
wait the disconnection of all the remote workspace Ensure local onDisconnection treatments are done * Definition at line 908 of file ColCOWS_Node.cc. References _event_cond, _event_mut, _remote_workspace_manager, ColCOWS::WAITING_RETRY, and ColCOWS::WAITING_TIMEOUT. |
|
wait the connection of a remote workspace Ensure local onConnection treatments are done * Definition at line 861 of file ColCOWS_Node.cc. References _event_cond, _event_mut, isConnected(), ColCOWS::NOT_CONNECTED, ColCOWS::WAITING_RETRY, and ColCOWS::WAITING_TIMEOUT. |
|
wait end of deactivation Ensure local onDeactivation treatments are done *
Definition at line 819 of file ColCOWS_Node.cc. References _event_cond, _event_mut, _fully_activated, ColCOWS::WAITING_RETRY, and ColCOWS::WAITING_TIMEOUT. |
|
wait the disconnection of a remote workspace Ensure local onDisconnection treatments are done * Definition at line 950 of file ColCOWS_Node.cc. References _event_cond, _event_mut, isConnected(), ColCOWS::NOT_CONNECTED, ColCOWS::WAITING_RETRY, and ColCOWS::WAITING_TIMEOUT. |