Scopira 20080306

scopira::agent::local_agent Class Reference

#include <localagent.h>

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

List of all members.


struct  kernel_area
struct  msg_t
class  process_t
struct  ps_area

Public Member Functions

 local_agent (void)
virtual ~local_agent ()
virtual void notify_stop (void)
 notifies the agent to stop
virtual void wait_stop (void)
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 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 find_services (scopira::tool::uuid &serviceid, scopira::basekit::narray< scopira::tool::uuid > &out)
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 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 send_msg_bcast (scopira::tool::uuid src, scopira::tool::uuid destserviceid, 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)

Protected Member Functions

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)
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
void la_print_status (void)
 the local_agent implementation simply does local deliverty


class scopira::agent::uptime_task

Detailed Description

A Local agent, capable of only local task executaion (on the same machine). It is multithreaded, though.

Aleksander Demko

Member Function Documentation

virtual void scopira::agent::local_agent::enqueue_network_quit ( void  ) [inline, virtual]

tell the whole cluster to quit will result in a local notify_stop

Implements scopira::agent::agent_i.

Reimplemented in scopira::agent::cluster_agent.

virtual bool scopira::agent::local_agent::failed ( void  ) const [inline, virtual]

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

Implements scopira::agent::agent_i.

Reimplemented in scopira::agent::cluster_agent.

bool scopira::agent::local_agent::la_launch_task ( int  myindex,
const scopira::basekit::narray< scopira::tool::uuid > &  taskids,
const std::string &  typestring,
short  phase 
) [protected]

called when a new process is to be isserted returns true on success (or switch to codes?)

void scopira::agent::local_agent::la_print_status ( void  ) [protected]

the local_agent implementation simply does local deliverty

called by cluster_agent::print_status

virtual void scopira::agent::local_agent::wait_stop ( void  ) [virtual]

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

Implements scopira::agent::agent_i.

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