Scopira  20080306
scopira::agent::cluster_agent Class Reference

#include <clusteragent.h>

Inheritance diagram for scopira::agent::cluster_agent:
scopira::agent::local_agent scopira::agent::agent_i scopira::tool::object

Public Types

enum  { default_port_c = 5555 }
 default port used by the master
 

Public Member Functions

 cluster_agent (void)
 ctor
 
virtual ~cluster_agent ()
 dtor
 
virtual void notify_stop (void)
 notifies the agent to stop
 
virtual void enqueue_network_quit (void)
 
virtual bool failed (void) const
 
virtual void set_agenterror_reactor (agenterror_reactor_i *r)
 sets the agenterror handler... there can only be one, eh
 
virtual int find_services (scopira::tool::uuid &serviceid, scopira::basekit::narray< scopira::tool::uuid > &out)
 
virtual void reg_context (scopira::tool::uuid &ctxid, taskmsg_reactor_i *reac)
 register a content
 
virtual void unreg_context (scopira::tool::uuid ctxid)
 unregister a content
 
virtual int universe_size (void)
 
virtual scopira::tool::uuid get_agent_id (void)
 
virtual scopira::tool::uuid launch_task (const std::type_info &t, scopira::tool::uuid where)
 
virtual scopira::tool::uuid launch_group (int numps, const std::type_info &t)
 
virtual void launch_slaves (scopira::tool::uuid masterid, int numtotalps, const std::type_info &t, scopira::basekit::narray< scopira::tool::uuid > &peers)
 
virtual void kill_task (scopira::tool::uuid ps)
 
virtual bool wait_task (scopira::tool::uuid ps, int msec)
 
virtual bool is_alive_task (scopira::tool::uuid ps)
 
virtual void send_msg_bcast (scopira::tool::uuid src, scopira::tool::uuid destserviceid, scopira::tool::bufferflow *buf)
 
const node_specspec (void) const
 
- Public Member Functions inherited from scopira::agent::local_agent
 local_agent (void)
 ctor
 
virtual ~local_agent ()
 dtor
 
virtual void wait_stop (void)
 
virtual bool is_killed_task (scopira::tool::uuid ps)
 
virtual bool wait_msg (const uuid_query &srcq, scopira::tool::uuid &foundsrc, scopira::tool::uuid dest, int timeout)
 
virtual void send_msg (scopira::tool::uuid src, scopira::tool::uuid dest, scopira::tool::bufferflow *buf)
 
virtual void recv_msg (const uuid_query &srcq, scopira::tool::uuid &foundsrc, scopira::tool::uuid dest, scopira::tool::count_ptr< scopira::tool::bufferflow > &buf)
 
- Public Member Functions inherited from scopira::agent::agent_i
virtual ~agent_i ()
 dtor
 
- Public Member Functions inherited from scopira::tool::object
virtual ~object ()
 
int add_ref (void) const
 
bool sub_ref (void) const
 
void auto_ref (void) const
 
int current_ref (void) const
 
virtual scopira::tool::oflow_iprint (scopira::tool::oflow_i &o) const
 
virtual bool load (scopira::tool::iobjflow_i &in)
 
virtual void save (scopira::tool::oobjflow_i &out) const
 
bool is_alive_object (void) const
 
bool is_dead_object (void) const
 

Protected Member Functions

virtual void la_send_msg (scopira::tool::uuid src, scopira::tool::uuid dest, scopira::tool::bufferflow *buf)
 la calls this as a last resort (after trying local delivery)
 
virtual void la_dead_task (scopira::tool::uuid taskid)
 la calls this after a local task is terminated
 
- Protected Member Functions inherited from scopira::agent::local_agent
machine_specla_get_spec (void)
 yes, RW access
 
scopira::tool::uuid_generatorla_get_generator (void)
 get the generator
 
bool la_launch_task (int myindex, const scopira::basekit::narray< scopira::tool::uuid > &taskids, const std::string &typestring, short phase)
 
scopira::tool::uuid la_launch_proxy (agent_task_i *at)
 will be assigned new, random uuid and returned
 
void la_update_slave_master (scopira::tool::uuid master, scopira::basekit::narray< scopira::tool::uuid > &peers)
 
void la_print_status (void)
 the local_agent implementation simply does local deliverty More...
 
- Protected Member Functions inherited from scopira::agent::agent_i
 agent_i (void)
 ctor
 
- Protected Member Functions inherited from scopira::tool::object
 object (void)
 
 object (bool neverusecounter)
 

Friends

class scopira::agent::uptime_task
 

Additional Inherited Members

- Static Public Member Functions inherited from scopira::agent::agent_i
static agent_iinstance (void)
 
static agent_inew_agent (void)
 
static bool get_cluster_server_url (std::string &serverurl)
 

Detailed Description

A network-aware agent that likes to work in stable and powerful clusters.

Author
Aleksander Demko

Member Function Documentation

◆ enqueue_network_quit()

virtual void scopira::agent::cluster_agent::enqueue_network_quit ( void  )
virtual

block the caller until this agent_i has terminated because of a agent end message

Reimplemented from scopira::agent::local_agent.

◆ failed()

virtual bool scopira::agent::cluster_agent::failed ( void  ) const
virtual

has this agent successfully booted up? if not, you shouldnt use it and probably just nuke it.

Reimplemented from scopira::agent::local_agent.


The documentation for this class was generated from the following file: