Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / LF_Strategy.h
blobc0515a43bdbed8c37f4781fc8501adfb1871494d
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file LF_Strategy.h
7 * @author Carlos O'Ryan <coryan@uci.edu>
8 */
9 //=============================================================================
11 #ifndef TAO_LF_STRATEGY_H
12 #define TAO_LF_STRATEGY_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "tao/TAO_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include /**/ "tao/Versioned_Namespace.h"
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
25 class ACE_Time_Value;
26 ACE_END_VERSIONED_NAMESPACE_DECL
28 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
30 class TAO_Leader_Follower;
32 /**
33 * @brief Strategize Leader/Follower manipulations in the ORB event
34 * loop.
36 * The ORB event loop must participate in the Leader/Followers
37 * protocol, but only if that concurrency model is configured,
38 * otherwise performance suffers.
40 * This class strategizes the ORB behavior in this respect.
42 class TAO_Export TAO_LF_Strategy
44 public:
45 /// Destructor
46 virtual ~TAO_LF_Strategy ();
48 /// The current thread will handle an upcall
49 /**
50 * Threads that handle requests can block for long periods of time,
51 * causing deadlocks if they don't elect a new leader before
52 * starting the upcall the system can become non-responsive or
53 * dead-lock.
55 virtual void set_upcall_thread (TAO_Leader_Follower &) = 0;
57 /// The current thread is entering the reactor event loop
58 /**
59 * Threads that block in the reactor event loop become "server"
60 * threads for the Leader/Follower set. They must be flagged
61 * specially because they do not wait for one specific event, but
62 * for any event whatsoever.
64 virtual int set_event_loop_thread (ACE_Time_Value *max_wait_time,
65 TAO_Leader_Follower &) = 0;
67 /// The current thread is leaving the event loop
68 /**
69 * When the thread leaves the event loop a new leader must be
70 * elected.
72 virtual void reset_event_loop_thread (int call_reset,
73 TAO_Leader_Follower &) = 0;
76 TAO_END_VERSIONED_NAMESPACE_DECL
78 #include /**/ "ace/post.h"
80 #endif /* TAO_LF_STRATEGY_H */