/usr/include/ace/TMCast/FaultDetector.hpp is in libace-tmcast-dev 6.0.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | // $Id: FaultDetector.hpp 91626 2010-09-07 10:59:20Z johnnyw $
// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
#include "Protocol.hpp"
namespace ACE_TMCast
{
class FaultDetector
{
public:
FaultDetector ()
: alone_ (true), silence_period_ (-1)
{
}
public:
class Failed {};
void
insync ()
{
if (alone_)
alone_ = false;
silence_period_ = 0;
}
void
outsync ()
{
if (!alone_ && ++silence_period_ >= Protocol::FATAL_SILENCE_FRAME)
{
// cerr << "Silence period has been passed." << endl;
// cerr << "Decalring the node failed." << endl;
throw Failed ();
}
}
private:
bool alone_; // true if we haven't heard from any members yet.
short silence_period_;
};
}
|