Represent a thread blocked, as a follower, in the Leader/Followers set. More...
#include <LF_Follower.h>
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. |
Represent a thread blocked, as a follower, in the Leader/Followers set.
Definition at line 45 of file LF_Follower.h.
TAO_LF_Follower::TAO_LF_Follower | ( | TAO_Leader_Follower & | leader_follower | ) |
Constructor.
Definition at line 16 of file LF_Follower.cpp.
: leader_follower_ (leader_follower) , condition_ (leader_follower.lock ()) { }
TAO_LF_Follower::~TAO_LF_Follower | ( | void | ) |
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.
{ return this->leader_follower_; }
int TAO_LF_Follower::signal | ( | void | ) |
Signal the underlying condition variable.
Definition at line 27 of file LF_Follower.cpp.
{ // We *must* remove ourselves from the list of followers, otherwise // we could get signalled twice: to wake up as a follower and as the // next leader. // The follower may not be there if the reply is received while // the consumer is not yet waiting for it (i.e. it send the // request but has not blocked to receive the reply yet). // Ignore errors. (void) this->leader_follower_.remove_follower (this); return this->condition_.signal (); }
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.
{ return this->condition_.wait (tv); }
ACE_SYNCH_CONDITION TAO_LF_Follower::condition_ [private] |
Condition variable used to.
Definition at line 69 of file LF_Follower.h.
The Leader/Follower set this Follower belongs to.
Definition at line 66 of file LF_Follower.h.