14 #ifndef __INCLUDED_SCOPIRA_AGENT_LOCALAGENT_H__ 15 #define __INCLUDED_SCOPIRA_AGENT_LOCALAGENT_H__ 22 #include <scopira/tool/thread.h> 23 #include <scopira/tool/output.h> 24 #include <scopira/tool/time.h> 25 #include <scopira/agent/context.h> 73 friend class scopira::agent::uptime_task;
81 virtual void notify_stop(
void);
82 virtual void wait_stop(
void);
88 virtual bool failed(
void)
const {
return false; }
96 virtual int universe_size(
void);
101 virtual void launch_slaves(
scopira::tool::uuid masterid,
int numtotalps,
const std::type_info &t,
136 void la_print_status(
void);
139 static void* worker_func(
void *data);
153 : pm_src(src), pm_buf(buf) { }
156 typedef std::list<msg_t> msglist_t;
188 std::set<scopira::tool::uuid> pm_services;
198 msglist_t pm_msgqueue;
204 state_area(
void) : pm_mode(ps_empty_c), pm_killreq(
false), pm_canmove(
false),
205 pm_onmsg(
false), pm_ontime(0), pm_reactor(0) { }
211 : pm_id(
id), pm_special(specialstate?ps_empty_c:
false),
212 pm_index(0) { pm_peers.
resize(1); pm_peers[0]=id; pm_state.pm_data.pm_mode = specialstate; }
214 : pm_id(peers[myindex]), pm_index(myindex), pm_peers(peers) { }
217 void load_services(
const std::type_info &nfo);
220 typedef std::map<scopira::tool::uuid, scopira::tool::count_ptr<process_t> > psmap_t;
221 typedef std::vector<scopira::tool::count_ptr<scopira::tool::thread> > threadlist_t;
227 threadlist_t pm_threads;
231 kernel_area(
void) : pm_alive(
true) { }
251 void set_min_threads(
void);
253 void kill_all_local_tasks(
void);
machine_spec & la_get_spec(void)
yes, RW access
Definition: localagent.h:120
virtual void la_dead_task(scopira::tool::uuid taskid)
la calls this after a local task is terminated
Definition: localagent.h:132
virtual bool failed(void) const
Definition: localagent.h:88
Definition: archiveflow.h:20
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)
Definition: localagent.h:130
scopira::tool::uuid_generator & la_get_generator(void)
get the generator
Definition: localagent.h:122
void set_auto_detect(void)
set all the value sby autodetecting
virtual void set_agenterror_reactor(agenterror_reactor_i *r)
sets the agenterror handler... there can only be one, eh
Definition: localagent.h:89
machine_spec(void)
zero initing
virtual void enqueue_network_quit(void)
Definition: localagent.h:84
Definition: localagent.h:191
Definition: localagent.h:70
Definition: localagent.h:43
Definition: context.h:132
void resize(size_t len)
Definition: narray.h:877