Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TAO_ESF_DELAYED_CHANGES_H
00013 #define TAO_ESF_DELAYED_CHANGES_H
00014
00015 #include "orbsvcs/ESF/ESF_Proxy_Collection.h"
00016
00017 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00018 # pragma once
00019 #endif
00020
00021 #include "orbsvcs/ESF/ESF_Busy_Lock.h"
00022 #include "tao/Basic_Types.h"
00023 #include "ace/Containers.h"
00024
00025 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00026 class ACE_Command_Base;
00027 ACE_END_VERSIONED_NAMESPACE_DECL
00028
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030
00031 template<class Target,class Object> class TAO_ESF_Connected_Command;
00032 template<class Target,class Object> class TAO_ESF_Disconnected_Command;
00033 template<class Target,class Object> class TAO_ESF_Reconnected_Command;
00034 template<class Target> class TAO_ESF_Shutdown_Command;
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 template<class PROXY, class COLLECTION, class ITERATOR, ACE_SYNCH_DECL>
00088 class TAO_ESF_Delayed_Changes : public TAO_ESF_Proxy_Collection<PROXY>
00089 {
00090 public:
00091 TAO_ESF_Delayed_Changes (void);
00092 TAO_ESF_Delayed_Changes (const COLLECTION &collection);
00093
00094 int busy (void);
00095 int idle (void);
00096 int execute_delayed_operations (void);
00097
00098 void connected_i (PROXY *proxy);
00099 void reconnected_i (PROXY *proxy);
00100 void disconnected_i (PROXY *proxy);
00101 void shutdown_i (void);
00102
00103 typedef TAO_ESF_Connected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> Connected_Command;
00104 typedef TAO_ESF_Reconnected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> Reconnected_Command;
00105 typedef TAO_ESF_Disconnected_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE>,PROXY> Disconnected_Command;
00106 typedef TAO_ESF_Shutdown_Command<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE> > Shutdown_Command;
00107
00108
00109 virtual void for_each (TAO_ESF_Worker<PROXY> *worker);
00110 virtual void connected (PROXY *proxy);
00111 virtual void reconnected (PROXY *proxy);
00112 virtual void disconnected (PROXY *proxy);
00113 virtual void shutdown (void);
00114
00115 private:
00116 COLLECTION collection_;
00117
00118 typedef TAO_ESF_Busy_Lock_Adapter<TAO_ESF_Delayed_Changes<PROXY,COLLECTION,ITERATOR,ACE_SYNCH_USE> > Busy_Lock;
00119
00120 Busy_Lock lock_;
00121
00122 ACE_SYNCH_MUTEX_T busy_lock_;
00123
00124 ACE_SYNCH_CONDITION_T busy_cond_;
00125
00126 CORBA::ULong busy_count_;
00127
00128 CORBA::ULong write_delay_count_;
00129
00130
00131 CORBA::ULong busy_hwm_;
00132 CORBA::ULong max_write_delay_;
00133
00134 ACE_Unbounded_Queue<ACE_Command_Base*> command_queue_;
00135 };
00136
00137
00138
00139 TAO_END_VERSIONED_NAMESPACE_DECL
00140
00141 #if defined (__ACE_INLINE__)
00142 #include "orbsvcs/ESF/ESF_Delayed_Changes.inl"
00143 #endif
00144
00145 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00146 #include "orbsvcs/ESF/ESF_Delayed_Changes.cpp"
00147 #endif
00148
00149 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00150 #pragma implementation ("ESF_Delayed_Changes.cpp")
00151 #endif
00152
00153 #endif