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/LocalObject.h"
00026 #include "ace/Hash_Map_Manager_T.h"
00027
00028 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
00029 # include "ace/Null_Mutex.h"
00030 #endif
00031
00032 #if defined(_MSC_VER)
00033 #pragma warning(push)
00034 #pragma warning(disable:4250)
00035 #endif
00036
00037 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00038
00039
00040 class TAO_RT_Mutex;
00041 class TAO_Thread_Pool_Manager;
00042
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 TAO_Local_RefCounted_Object
00096 {
00097 public:
00098
00099
00100 TAO_RT_ORB (TAO_ORB_Core *orb_core, ACE_Time_Value const &dynamic_thread_idle_timeout);
00101
00102
00103
00104
00105
00106
00107
00108 virtual RTCORBA::Mutex_ptr create_mutex (void);
00109
00110
00111
00112
00113
00114
00115 virtual void destroy_mutex (RTCORBA::Mutex_ptr the_mutex);
00116
00117
00118
00119
00120
00121
00122 virtual RTCORBA::Mutex_ptr create_named_mutex (const char *name,
00123 CORBA::Boolean_out created_flag);
00124
00125
00126 virtual RTCORBA::Mutex_ptr open_named_mutex (const char * name);
00127
00128
00129
00130
00131
00132 RTCORBA::TCPProtocolProperties_ptr
00133 create_tcp_protocol_properties (CORBA::Long send_buffer_size,
00134 CORBA::Long recv_buffer_size,
00135 CORBA::Boolean keep_alive,
00136 CORBA::Boolean dont_route,
00137 CORBA::Boolean no_delay,
00138 CORBA::Boolean enable_network_priority);
00139
00140 RTCORBA::UnixDomainProtocolProperties_ptr
00141 create_unix_domain_protocol_properties (CORBA::Long send_buffer_size,
00142 CORBA::Long recv_buffer_size);
00143
00144 RTCORBA::SharedMemoryProtocolProperties_ptr
00145 create_shared_memory_protocol_properties (CORBA::Long send_buffer_size,
00146 CORBA::Long recv_buffer_size,
00147 CORBA::Boolean keep_alive,
00148 CORBA::Boolean dont_route,
00149 CORBA::Boolean no_delay,
00150 CORBA::Long preallocate_buffer_size,
00151 const char *mmap_filename,
00152 const char *mmap_lockname);
00153
00154 RTCORBA::UserDatagramProtocolProperties_ptr
00155 create_user_datagram_protocol_properties (CORBA::Long send_buffer_size,
00156 CORBA::Long recv_buffer_size,
00157 CORBA::Boolean enable_network_priority);
00158
00159 RTCORBA::StreamControlProtocolProperties_ptr
00160 create_stream_control_protocol_properties (CORBA::Long send_buffer_size,
00161 CORBA::Long recv_buffer_size,
00162 CORBA::Boolean keep_alive,
00163 CORBA::Boolean dont_route,
00164 CORBA::Boolean no_delay,
00165 CORBA::Boolean enable_network_priority);
00166
00167
00168 virtual RTCORBA::ThreadpoolId
00169 create_threadpool (CORBA::ULong stacksize,
00170 CORBA::ULong static_threads,
00171 CORBA::ULong dynamic_threads,
00172 RTCORBA::Priority default_priority,
00173 CORBA::Boolean allow_request_buffering,
00174 CORBA::ULong max_buffered_requests,
00175 CORBA::ULong max_request_buffer_size);
00176
00177
00178
00179
00180
00181 virtual RTCORBA::ThreadpoolId
00182 create_threadpool_with_lanes (CORBA::ULong stacksize,
00183 const RTCORBA::ThreadpoolLanes & lanes,
00184 CORBA::Boolean allow_borrowing,
00185 CORBA::Boolean allow_request_buffering,
00186 CORBA::ULong max_buffered_requests,
00187 CORBA::ULong max_request_buffer_size);
00188
00189
00190 virtual void destroy_threadpool (RTCORBA::ThreadpoolId threadpool);
00191
00192
00193 virtual RTCORBA::PriorityModelPolicy_ptr
00194 create_priority_model_policy (RTCORBA::PriorityModel priority_model,
00195 RTCORBA::Priority server_priority);
00196
00197
00198 virtual RTCORBA::ThreadpoolPolicy_ptr
00199 create_threadpool_policy (RTCORBA::ThreadpoolId threadpool);
00200
00201
00202
00203
00204
00205 virtual RTCORBA::PriorityBandedConnectionPolicy_ptr
00206 create_priority_banded_connection_policy (const RTCORBA::PriorityBands &
00207 priority_bands);
00208
00209
00210
00211
00212
00213
00214 virtual RTCORBA::PrivateConnectionPolicy_ptr
00215 create_private_connection_policy (void);
00216
00217
00218
00219
00220
00221 virtual RTCORBA::ServerProtocolPolicy_ptr
00222 create_server_protocol_policy (const RTCORBA::ProtocolList & protocols);
00223
00224
00225
00226
00227
00228 virtual RTCORBA::ClientProtocolPolicy_ptr
00229 create_client_protocol_policy (const RTCORBA::ProtocolList & protocols);
00230
00231
00232 TAO_ORB_Core *orb_core (void) const;
00233
00234
00235 TAO_Thread_Pool_Manager &tp_manager (void) const;
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252 static int modify_thread_scheduling_policy (CORBA::ORB_ptr orb);
00253
00254 protected:
00255
00256
00257
00258 virtual ~TAO_RT_ORB (void);
00259
00260 protected:
00261
00262
00263 TAO_ORB_Core * const orb_core_;
00264
00265
00266 TAO_Named_RT_Mutex_Manager mutex_mgr_;
00267
00268
00269 TAO_Thread_Pool_Manager *tp_manager_;
00270
00271
00272 ACE_Time_Value const dynamic_thread_idle_timeout_;
00273 };
00274
00275 TAO_END_VERSIONED_NAMESPACE_DECL
00276
00277 #if defined(_MSC_VER)
00278 #pragma warning(pop)
00279 #endif
00280
00281 #endif
00282
00283 #include "ace/post.h"
00284 #endif