Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TAO_RT_ORB_H
00013 #define TAO_RT_ORB_H
00014 #include "ace/pre.h"
00015
00016 #include "tao/orbconf.h"
00017
00018 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "tao/RTCORBA/RTCORBA_includeC.h"
00025 #include "tao/RTCORBA/RT_ORBInitializer.h"
00026 #include "tao/LocalObject.h"
00027 #include "ace/Hash_Map_Manager_T.h"
00028
00029 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
00030 # include "ace/Null_Mutex.h"
00031 #endif
00032
00033 #if defined(_MSC_VER)
00034 #pragma warning(push)
00035 #pragma warning(disable:4250)
00036 #endif
00037
00038 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00039
00040
00041 class TAO_RT_Mutex;
00042 class TAO_Thread_Pool_Manager;
00043
00044
00045
00046
00047
00048
00049
00050 class TAO_RTCORBA_Export TAO_Named_RT_Mutex_Manager
00051 {
00052
00053 public:
00054
00055 TAO_Named_RT_Mutex_Manager (void);
00056
00057
00058 ~TAO_Named_RT_Mutex_Manager (void);
00059
00060 RTCORBA::Mutex_ptr create_mutex (void);
00061
00062 void destroy_mutex (RTCORBA::Mutex_ptr the_mutex);
00063
00064 RTCORBA::Mutex_ptr create_named_mutex (const char *name,
00065 CORBA::Boolean_out created_flag);
00066
00067 RTCORBA::Mutex_ptr open_named_mutex (const char * name);
00068
00069 private:
00070
00071 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
00072
00073 ACE_Hash_Map_Manager_Ex<
00074 ACE_CString,
00075 RTCORBA::Mutex_var,
00076 ACE_Hash<ACE_CString>,
00077 ACE_Equal_To<ACE_CString>,
00078 ACE_Null_Mutex> map_;
00079
00080 TAO_SYNCH_MUTEX lock_;
00081 #endif
00082 };
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 class TAO_RTCORBA_Export TAO_RT_ORB
00094 : public RTCORBA::RTORB,
00095 public ::CORBA::LocalObject
00096 {
00097 public:
00098
00099
00100 TAO_RT_ORB (TAO_ORB_Core *orb_core,
00101 TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan lifespan,
00102 ACE_Time_Value const &dynamic_thread_time);
00103
00104
00105
00106
00107
00108
00109
00110 virtual RTCORBA::Mutex_ptr create_mutex (void);
00111
00112
00113
00114
00115
00116
00117 virtual void destroy_mutex (RTCORBA::Mutex_ptr the_mutex);
00118
00119
00120
00121
00122
00123
00124 virtual RTCORBA::Mutex_ptr create_named_mutex (const char *name,
00125 CORBA::Boolean_out created_flag);
00126
00127
00128 virtual RTCORBA::Mutex_ptr open_named_mutex (const char * name);
00129
00130
00131
00132
00133
00134 RTCORBA::TCPProtocolProperties_ptr
00135 create_tcp_protocol_properties (CORBA::Long send_buffer_size,
00136 CORBA::Long recv_buffer_size,
00137 CORBA::Boolean keep_alive,
00138 CORBA::Boolean dont_route,
00139 CORBA::Boolean no_delay,
00140 CORBA::Boolean enable_network_priority);
00141
00142 RTCORBA::UnixDomainProtocolProperties_ptr
00143 create_unix_domain_protocol_properties (CORBA::Long send_buffer_size,
00144 CORBA::Long recv_buffer_size);
00145
00146 RTCORBA::SharedMemoryProtocolProperties_ptr
00147 create_shared_memory_protocol_properties (CORBA::Long send_buffer_size,
00148 CORBA::Long recv_buffer_size,
00149 CORBA::Boolean keep_alive,
00150 CORBA::Boolean dont_route,
00151 CORBA::Boolean no_delay,
00152 CORBA::Long preallocate_buffer_size,
00153 const char *mmap_filename,
00154 const char *mmap_lockname);
00155
00156 RTCORBA::UserDatagramProtocolProperties_ptr
00157 create_user_datagram_protocol_properties (CORBA::Long send_buffer_size,
00158 CORBA::Long recv_buffer_size,
00159 CORBA::Boolean enable_network_priority);
00160
00161 RTCORBA::StreamControlProtocolProperties_ptr
00162 create_stream_control_protocol_properties (CORBA::Long send_buffer_size,
00163 CORBA::Long recv_buffer_size,
00164 CORBA::Boolean keep_alive,
00165 CORBA::Boolean dont_route,
00166 CORBA::Boolean no_delay,
00167 CORBA::Boolean enable_network_priority);
00168
00169
00170 virtual RTCORBA::ThreadpoolId
00171 create_threadpool (CORBA::ULong stacksize,
00172 CORBA::ULong static_threads,
00173 CORBA::ULong dynamic_threads,
00174 RTCORBA::Priority default_priority,
00175 CORBA::Boolean allow_request_buffering,
00176 CORBA::ULong max_buffered_requests,
00177 CORBA::ULong max_request_buffer_size);
00178
00179
00180
00181
00182
00183 virtual RTCORBA::ThreadpoolId
00184 create_threadpool_with_lanes (CORBA::ULong stacksize,
00185 const RTCORBA::ThreadpoolLanes & lanes,
00186 CORBA::Boolean allow_borrowing,
00187 CORBA::Boolean allow_request_buffering,
00188 CORBA::ULong max_buffered_requests,
00189 CORBA::ULong max_request_buffer_size);
00190
00191
00192 virtual void destroy_threadpool (RTCORBA::ThreadpoolId threadpool);
00193
00194
00195 virtual RTCORBA::PriorityModelPolicy_ptr
00196 create_priority_model_policy (RTCORBA::PriorityModel priority_model,
00197 RTCORBA::Priority server_priority);
00198
00199
00200 virtual RTCORBA::ThreadpoolPolicy_ptr
00201 create_threadpool_policy (RTCORBA::ThreadpoolId threadpool);
00202
00203
00204
00205
00206
00207 virtual RTCORBA::PriorityBandedConnectionPolicy_ptr
00208 create_priority_banded_connection_policy (const RTCORBA::PriorityBands &
00209 priority_bands);
00210
00211
00212
00213
00214
00215
00216 virtual RTCORBA::PrivateConnectionPolicy_ptr
00217 create_private_connection_policy (void);
00218
00219
00220
00221
00222
00223 virtual RTCORBA::ServerProtocolPolicy_ptr
00224 create_server_protocol_policy (const RTCORBA::ProtocolList & protocols);
00225
00226
00227
00228
00229
00230 virtual RTCORBA::ClientProtocolPolicy_ptr
00231 create_client_protocol_policy (const RTCORBA::ProtocolList & protocols);
00232
00233
00234 TAO_ORB_Core *orb_core (void) const;
00235
00236
00237 TAO_Thread_Pool_Manager &tp_manager (void) const;
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254 static int modify_thread_scheduling_policy (CORBA::ORB_ptr orb);
00255
00256 protected:
00257
00258
00259
00260 virtual ~TAO_RT_ORB (void);
00261
00262 protected:
00263
00264
00265 TAO_ORB_Core * const orb_core_;
00266
00267
00268 TAO_Named_RT_Mutex_Manager mutex_mgr_;
00269
00270
00271 TAO_Thread_Pool_Manager *tp_manager_;
00272
00273
00274 TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan lifespan_;
00275
00276
00277 ACE_Time_Value const dynamic_thread_time_;
00278 };
00279
00280 TAO_END_VERSIONED_NAMESPACE_DECL
00281
00282 #if defined(_MSC_VER)
00283 #pragma warning(pop)
00284 #endif
00285
00286 #endif
00287
00288 #include "ace/post.h"
00289 #endif