1 #include "tao/LF_Strategy_Complete.h"
2 #include "tao/LF_Follower.h"
3 #include "tao/Leader_Follower.h"
4 #include "ace/Guard_T.h"
7 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
9 TAO_LF_Strategy_Complete::~TAO_LF_Strategy_Complete ()
14 TAO_LF_Strategy_Complete::set_upcall_thread (TAO_Leader_Follower
&lf
)
16 lf
.set_upcall_thread ();
20 TAO_LF_Strategy_Complete::set_event_loop_thread (ACE_Time_Value
*tv
,
21 TAO_Leader_Follower
&lf
)
23 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX
, ace_mon
, lf
.lock (), -1);
25 return lf
.set_event_loop_thread (tv
);
29 TAO_LF_Strategy_Complete::reset_event_loop_thread (int call_reset
,
30 TAO_Leader_Follower
&lf
)
32 ACE_GUARD (TAO_SYNCH_MUTEX
, ace_mon
, lf
.lock ());
35 lf
.reset_event_loop_thread ();
37 int const result
= lf
.elect_new_leader ();
40 TAOLIB_ERROR ((LM_ERROR
,
41 ACE_TEXT ("TAO (%P|%t) - Failed to wake up ")
42 ACE_TEXT ("a follower thread\n")));
45 TAO_END_VERSIONED_NAMESPACE_DECL