CarobNS::ControllerAndVdbState Class Reference

Holds a vdb member and its last failure. More...

#include <ControllerPool.hpp>

List of all members.

Public Member Functions

 ControllerAndVdbState (const ControllerInfo &ctrl)
 Constructs a ControllerAndVdbState object with the given controller, considering last vdb failure is now minus 60 seconds (ie.
bool isVdbUp (int now)
 Gives the state of the vdb.
 operator std::wstring ()
 Gives a string representation of this object: prints controller + state.

Public Attributes

ControllerInfo controller
 Controller.
int lastVdbFailure
 Last time the vdb has been seen failing.


Detailed Description

Holds a vdb member and its last failure.


Constructor & Destructor Documentation

CarobNS::ControllerAndVdbState::ControllerAndVdbState ( const ControllerInfo ctrl  )  [inline]

Constructs a ControllerAndVdbState object with the given controller, considering last vdb failure is now minus 60 seconds (ie.

no failure)

Parameters:
ctrl controller to refer to


Member Function Documentation

bool CarobNS::ControllerAndVdbState::isVdbUp ( int  now  )  [inline]

Gives the state of the vdb.

Returns true if the last vdb failure is older than 5 seconds (refering to given time), false if the vdb failed during the last 5 seconds

Parameters:
now the time to compare last vdb failure to
Returns:
tru is the vdb can be considered as up, false otherwise


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 17:40:20 2007 for Carob by  doxygen 1.4.7