Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / protocols / ace / TMCast / FaultDetector.hpp
blob845e829336d5925a2740eb6b85912f212a76e354
1 // author : Boris Kolpackov <boris@dre.vanderbilt.edu>
3 #include "Protocol.hpp"
5 namespace ACE_TMCast
7 class FaultDetector
9 public:
10 FaultDetector ()
11 : alone_ (true), silence_period_ (-1)
15 public:
16 class Failed {};
19 void
20 insync ()
22 if (alone_)
23 alone_ = false;
25 silence_period_ = 0;
28 void
29 outsync ()
31 if (!alone_ && ++silence_period_ >= Protocol::FATAL_SILENCE_FRAME)
33 // cerr << "Silence period has been passed." << endl;
34 // cerr << "Decalring the node failed." << endl;
35 throw Failed ();
39 private:
40 bool alone_; // true if we haven't heard from any members yet.
41 short silence_period_;