Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Wait_On_Leader_Follower.h
blob23b854d39b172bab7e2b57544ce1ab1ee963050e
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Wait_On_Leader_Follower.h
7 * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
8 */
9 //=============================================================================
11 #ifndef TAO_WAIT_ON_LEADER_FOLLOWER_H
12 #define TAO_WAIT_ON_LEADER_FOLLOWER_H
14 #include /**/ "ace/pre.h"
16 #include "tao/Wait_Strategy.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
24 /**
25 * @class TAO_Wait_On_Leader_Follower
27 * @brief Wait according to the Leader-Follower model. Leader does the
28 * event loop of the Reactor and the Followers wait on the
29 * condition variable.
31 * This implementation is to work with the Muxed Transport
32 * Mechanism. Here the state variables such as <Condition
33 * Variable> etc cannot be kept in the Wait Strategy, since the
34 * Wait Strategy is per Transport object and here the Transport
35 * is Muxed and hence there are multiple threads running in the
36 * same Transport context.
38 class TAO_Wait_On_Leader_Follower : public TAO_Wait_Strategy
40 public:
41 /// Constructor.
42 explicit TAO_Wait_On_Leader_Follower (TAO_Transport *transport);
44 /// Destructor.
45 ~TAO_Wait_On_Leader_Follower () override = default;
47 /*! @copydoc TAO_Wait_Strategy::sending_request() */
48 int sending_request (TAO_ORB_Core *orb_core, TAO_Message_Semantics msg_semantics) override;
50 /*! @copydoc TAO_Wait_Strategy::wait() */
51 int wait (ACE_Time_Value *max_wait_time, TAO_Synch_Reply_Dispatcher &rd) override;
53 /*! @copydoc TAO_Wait_Strategy::register_handler() */
54 int register_handler () override;
56 /*! @copydoc TAO_Wait_Strategy::non_blocking() */
57 bool non_blocking () const override;
59 /*! @copydoc TAO_Wait_Strategy::can_process_upcalls() */
60 bool can_process_upcalls () const override;
63 TAO_END_VERSIONED_NAMESPACE_DECL
65 #include /**/ "ace/post.h"
67 #endif /* TAO_WAIT_ON_LEADER_FOLLOWER_H */