#include <LF_Follower.h>
Inheritance diagram for TAO_LF_Follower:
Public Member Functions | |
TAO_LF_Follower (TAO_Leader_Follower &leader_follower) | |
Constructor. | |
~TAO_LF_Follower (void) | |
Destructor. | |
TAO_Leader_Follower & | leader_follower (void) |
Access the leader follower that owns this follower. | |
int | wait (ACE_Time_Value *tv) |
Wait until on the underlying condition variable. | |
int | signal (void) |
Signal the underlying condition variable. | |
Private Attributes | |
TAO_Leader_Follower & | leader_follower_ |
The Leader/Follower set this Follower belongs to. | |
ACE_SYNCH_CONDITION | condition_ |
Condition variable used to. |
Definition at line 45 of file LF_Follower.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_LF_Follower::TAO_LF_Follower | ( | TAO_Leader_Follower & | leader_follower | ) |
Constructor.
Definition at line 16 of file LF_Follower.cpp.
00017 : leader_follower_ (leader_follower) 00018 , condition_ (leader_follower.lock ()) 00019 { 00020 }
TAO_LF_Follower::~TAO_LF_Follower | ( | void | ) |
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_Leader_Follower & TAO_LF_Follower::leader_follower | ( | void | ) |
Access the leader follower that owns this follower.
Definition at line 8 of file LF_Follower.inl.
References leader_follower_.
00009 { 00010 return this->leader_follower_; 00011 }
int TAO_LF_Follower::signal | ( | void | ) |
Signal the underlying condition variable.
Definition at line 27 of file LF_Follower.cpp.
References condition_.
Referenced by TAO_Leader_Follower::elect_new_leader_i(), and TAO_LF_Event::state_changed().
00028 { 00029 // We *must* remove ourselves from the list of followers, otherwise 00030 // we could get signalled twice: to wake up as a follower and as the 00031 // next leader. 00032 // The follower may not be there if the reply is received while 00033 // the consumer is not yet waiting for it (i.e. it send the 00034 // request but has not blocked to receive the reply yet). 00035 // Ignore errors. 00036 (void) this->leader_follower_.remove_follower (this); 00037 00038 return this->condition_.signal (); 00039 }
ACE_INLINE int TAO_LF_Follower::wait | ( | ACE_Time_Value * | tv | ) |
Wait until on the underlying condition variable.
Definition at line 14 of file LF_Follower.inl.
References condition_.
00015 { 00016 return this->condition_.wait (tv); 00017 }
The Leader/Follower set this Follower belongs to.
Definition at line 66 of file LF_Follower.h.
Referenced by leader_follower().