Scopira
20080306
|
#include <localagent.h>
Public Member Functions | |
local_agent (void) | |
ctor | |
virtual | ~local_agent () |
dtor | |
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) |
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_i & | print (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 | |
machine_spec & | la_get_spec (void) |
yes, RW access | |
scopira::tool::uuid_generator & | la_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 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_i * | instance (void) |
static agent_i * | new_agent (void) |
static bool | get_cluster_server_url (std::string &serverurl) |
A Local agent, capable of only local task executaion (on the same machine). It is multithreaded, though.
|
inlinevirtual |
tell the whole cluster to quit will result in a local notify_stop
Implements scopira::agent::agent_i.
Reimplemented in scopira::agent::cluster_agent.
|
inlinevirtual |
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.
|
protected |
called when a new process is to be isserted returns true on success (or switch to codes?)
|
protected |
the local_agent implementation simply does local deliverty
called by cluster_agent::print_status
|
virtual |
block the caller until this agent_i has terminated because of a agent end message
Implements scopira::agent::agent_i.