Scopira  20080306
scopira::agent::agent_loop Class Reference

#include <loop.h>

Public Member Functions

 agent_loop (void)
 
 agent_loop (int &argc, char **&argv)
 
 ~agent_loop ()
 
bool failed (void) const
 
void set_wait_for_quit (void)
 

Detailed Description

Constructs the Scopira/agent worker.

You can do this AFTER you set up any other loop-types.

Config params that this loop accepts: clusterurl=scopira://host:port/ (the Scopira agent URL) clustermaster=1 (Make me the master)

Author
Aleksander Demko

Constructor & Destructor Documentation

◆ agent_loop() [1/2]

scopira::agent::agent_loop::agent_loop ( void  )

Starts the agent server in a seperate thread.

Author
Aleksander Demko

◆ agent_loop() [2/2]

scopira::agent::agent_loop::agent_loop ( int &  argc,
char **&  argv 
)

Starts the agent server in a seperate thread.

Author
Aleksander Demko

◆ ~agent_loop()

scopira::agent::agent_loop::~agent_loop ( )

Kills/stops the server (see set_wait_for_quit()) for more information).

Author
Aleksander Demko

Member Function Documentation

◆ failed()

bool scopira::agent::agent_loop::failed ( void  ) const
inline

Is the agent in a failed state?

Author
Aleksander Demko

References scopira::agent::agent_i::failed(), and set_wait_for_quit().

◆ set_wait_for_quit()

void scopira::agent::agent_loop::set_wait_for_quit ( void  )

Tells the agent loop to block its destruction until it has received a kill command in the network.

By default, the agent_loop is not in server mode.

Author
Aleksander Demko

Referenced by failed().


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