code::Heartbeat Class Reference

List of all members.

Detailed Description

A singleton object that is used to write out heart beat messages on a timer by ErrorLog.

Users of algorithms can request heart-beat messages to be written out by specifying --heartbeat=$HOME/heartbeat/refmerger.lb,60 for example. The 60 signifies that hearbeats are to be written out every 60 seconds.

Algorithm writers can add new information to the current XML message that is to be written out using the addInfo() method.

Author:
Lakshman
Version:
Id
code_Heartbeat.h,v 1.2 2009/06/02 20:17:39 lakshman Exp


Public Member Functions

void writeMessage ()
 Force a write of heartbeat message to LB.
XML::ElementcurrentElement ()
 Get current element in order to modify it, such as to add more information.

Static Public Member Functions

static Heartbeatinstance ()
template<class T>
static void addInfo (const std::string &attr_name, const T &value)
 Add/modify this attribute of the current element.
static void createInstance (const std::string &param)
 parameter should be of the form $HOME/heartbeat/refmerger.lb,60 The 60 signifies that hearbeats are to be written out every 60 seconds and the LB name indicates where the heartbeats are to be written out.


Member Function Documentation

template<class T>
static void code::Heartbeat::addInfo ( const std::string &  attr_name,
const T &  value 
) [inline, static]

Add/modify this attribute of the current element.

Takes string, size_t, int and double.

static void code::Heartbeat::createInstance ( const std::string &  param  )  [static]

parameter should be of the form $HOME/heartbeat/refmerger.lb,60 The 60 signifies that hearbeats are to be written out every 60 seconds and the LB name indicates where the heartbeats are to be written out.

XML::Element& code::Heartbeat::currentElement (  )  [inline]

Get current element in order to modify it, such as to add more information.

See also:
addInfo

static Heartbeat& code::Heartbeat::instance (  )  [inline, static]

void code::Heartbeat::writeMessage (  ) 

Force a write of heartbeat message to LB.


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7