summaryrefslogtreecommitdiff
path: root/TAO/tao/Leader_Follower.h
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-01-26 02:34:55 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-01-26 02:34:55 +0000
commit00814bd49c0a4ddac4f53924aca723a1f7aff590 (patch)
treecec94f491276648b74ffd67bed6670573a891a4a /TAO/tao/Leader_Follower.h
parent058614abbaf5b468773deedd5165036401f136f4 (diff)
downloadATCD-00814bd49c0a4ddac4f53924aca723a1f7aff590.tar.gz
Change:Tue Jan 25 20:33:28 2000 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Leader_Follower.h')
-rw-r--r--TAO/tao/Leader_Follower.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/TAO/tao/Leader_Follower.h b/TAO/tao/Leader_Follower.h
index b88839fc1cf..6d6f37d8637 100644
--- a/TAO/tao/Leader_Follower.h
+++ b/TAO/tao/Leader_Follower.h
@@ -33,7 +33,7 @@ public:
~TAO_Leader_Follower (void);
// Destructor
- void set_server_thread (void);
+ int set_server_thread (ACE_Time_Value *max_wait_time);
// The current thread has become a server thread (i.e. called
// ORB::run), update any flags and counters.
@@ -102,6 +102,9 @@ private:
TAO_ORB_Core_TSS_Resources *get_tss_resources (void) const;
// Shortcut to obtain the TSS resources of the orb core.
+ int wait_for_client_leader_to_complete (ACE_Time_Value *max_wait_time);
+ // Wait for the client leader to complete.
+
private:
TAO_ORB_Core *orb_core_;
// The orb core
@@ -127,6 +130,9 @@ private:
ACE_Reactor *reactor_;
// The reactor
+
+ int client_thread_is_leader_;
+ // Is a client thread the current leader?
};
class TAO_Export TAO_LF_Client_Thread_Helper
@@ -157,6 +163,31 @@ private:
// Reference to leader/followers object.
};
+class TAO_Export TAO_LF_Server_Thread_Helper
+{
+public:
+ TAO_LF_Server_Thread_Helper (TAO_Leader_Follower &leader_follower);
+ // Constructor
+
+ ~TAO_LF_Server_Thread_Helper (void);
+ // Destructor
+
+ int set_server_thread (ACE_Time_Value *max_wait_time);
+ // Calls <set_server_thread> on the leader/followers object.
+
+ int reset_server_thread (void);
+ // Calls <reset_server_thread> and <elect_new_leader> on the
+ // leader/followers object.
+
+private:
+ TAO_Leader_Follower &leader_follower_;
+ // Reference to leader/followers object.
+
+ int auto_reset_;
+ // Remembers whether we have to call the reset method in the
+ // destructor.
+};
+
#if defined (__ACE_INLINE__)
# include "tao/Leader_Follower.i"
#endif /* __ACE_INLINE__ */