#include <RT_ORB.h>
Inheritance diagram for TAO_RT_ORB:
Public Member Functions | |
TAO_RT_ORB (TAO_ORB_Core *orb_core, ACE_Time_Value const &dynamic_thread_idle_timeout) | |
Constructor. | |
virtual RTCORBA::Mutex_ptr | create_mutex () throw (CORBA::SystemException) |
virtual void | destroy_mutex (RTCORBA::Mutex_ptr the_mutex) throw (CORBA::SystemException) |
virtual RTCORBA::Mutex_ptr | create_named_mutex (const char *name, CORBA::Boolean_out created_flag) throw (CORBA::SystemException) |
virtual RTCORBA::Mutex_ptr | open_named_mutex (const char *name) throw (CORBA::SystemException, RTCORBA::RTORB::MutexNotFound ) |
Retrieve a previously created mutex. | |
RTCORBA::TCPProtocolProperties_ptr | create_tcp_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, CORBA::Boolean no_delay, CORBA::Boolean enable_network_priority) throw (CORBA::SystemException ) |
RTCORBA::UnixDomainProtocolProperties_ptr | create_unix_domain_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size) throw (CORBA::SystemException) |
RTCORBA::SharedMemoryProtocolProperties_ptr | create_shared_memory_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, CORBA::Boolean no_delay, CORBA::Long preallocate_buffer_size, const char *mmap_filename, const char *mmap_lockname) throw (CORBA::SystemException) |
RTCORBA::UserDatagramProtocolProperties_ptr | create_user_datagram_protocol_properties (CORBA::Boolean enable_network_priority) throw (CORBA::SystemException) |
RTCORBA::StreamControlProtocolProperties_ptr | create_stream_control_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, CORBA::Boolean no_delay, CORBA::Boolean enable_network_priority) throw (CORBA::SystemException) |
virtual RTCORBA::ThreadpoolId | create_threadpool (CORBA::ULong stacksize, CORBA::ULong static_threads, CORBA::ULong dynamic_threads, RTCORBA::Priority default_priority, CORBA::Boolean allow_request_buffering, CORBA::ULong max_buffered_requests, CORBA::ULong max_request_buffer_size) throw (CORBA::SystemException) |
Create a RTCORBA threadpool to manage a set of threads without lanes. | |
virtual RTCORBA::ThreadpoolId | create_threadpool_with_lanes (CORBA::ULong stacksize, const RTCORBA::ThreadpoolLanes &lanes, CORBA::Boolean allow_borrowing, CORBA::Boolean allow_request_buffering, CORBA::ULong max_buffered_requests, CORBA::ULong max_request_buffer_size) throw (CORBA::SystemException) |
virtual void | destroy_threadpool (RTCORBA::ThreadpoolId threadpool) throw (CORBA::SystemException, RTCORBA::RTORB::InvalidThreadpool) |
Free the resources associated with the specified threadpool. | |
virtual RTCORBA::PriorityModelPolicy_ptr | create_priority_model_policy (RTCORBA::PriorityModel priority_model, RTCORBA::Priority server_priority) throw (CORBA::SystemException) |
Create a priority model policy for use when configuring a POA. | |
virtual RTCORBA::ThreadpoolPolicy_ptr | create_threadpool_policy (RTCORBA::ThreadpoolId threadpool) throw (CORBA::SystemException) |
Create a ThreadpoolPolicy instance for POA creation. | |
virtual RTCORBA::PriorityBandedConnectionPolicy_ptr | create_priority_banded_connection_policy (const RTCORBA::PriorityBands &priority_bands) throw (CORBA::SystemException) |
virtual RTCORBA::PrivateConnectionPolicy_ptr | create_private_connection_policy () throw (CORBA::SystemException) |
virtual RTCORBA::ServerProtocolPolicy_ptr | create_server_protocol_policy (const RTCORBA::ProtocolList &protocols) throw (CORBA::SystemException) |
virtual RTCORBA::ClientProtocolPolicy_ptr | create_client_protocol_policy (const RTCORBA::ProtocolList &protocols) throw (CORBA::SystemException) |
TAO_ORB_Core * | orb_core (void) const |
Reference to our creating ORB Core. | |
TAO_Thread_Pool_Manager & | tp_manager (void) const |
Get the Thread Pool Manager. | |
Static Public Member Functions | |
int | modify_thread_scheduling_policy (CORBA::ORB_ptr orb) |
Protected Member Functions | |
virtual | ~TAO_RT_ORB (void) |
Protected Attributes | |
TAO_ORB_Core *const | orb_core_ |
Reference to our creating ORB Core. | |
TAO_Named_RT_Mutex_Manager | mutex_mgr_ |
mutex_mgr_ manages the names associated with named mutexes. | |
TAO_Thread_Pool_Manager * | tp_manager_ |
Thread Pool Manager. | |
ACE_Time_Value const | dynamic_thread_idle_timeout_ |
Dynamic thread idle timeout. |
Creates and destroys RT CORBA objects, i.e., policies, threadpools, mutexes.
Definition at line 105 of file RT_ORB.h.
|
Constructor.
Definition at line 22 of file RT_ORB.cpp. References TAO_ORB_Core::thread_lane_resources_manager(), TAO_RT_Thread_Lane_Resources_Manager::tp_manager(), and tp_manager_.
00024 : orb_core_ (orb_core), 00025 mutex_mgr_ (), 00026 tp_manager_ (0), 00027 dynamic_thread_idle_timeout_ (dynamic_thread_idle_timeout) 00028 { 00029 TAO_Thread_Lane_Resources_Manager *thread_lane_resources_manager = 00030 &this->orb_core_->thread_lane_resources_manager (); 00031 00032 TAO_RT_Thread_Lane_Resources_Manager *rt_thread_lane_resources_manager = 00033 dynamic_cast <TAO_RT_Thread_Lane_Resources_Manager *> (thread_lane_resources_manager); 00034 00035 this->tp_manager_ = 00036 &rt_thread_lane_resources_manager->tp_manager (); 00037 } |
|
Protected destructor to enforce proper memory management of this reference counted object. Definition at line 39 of file RT_ORB.cpp.
00040 { 00041 } |
|
Create a ClientProtocolPolicy instance to select and configure communication protocols on the client side. Definition at line 485 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00488 { 00489 TAO_ClientProtocolPolicy *tmp = 0; 00490 ACE_NEW_THROW_EX (tmp, 00491 TAO_ClientProtocolPolicy (protocols), 00492 CORBA::NO_MEMORY (TAO::VMCID, 00493 CORBA::COMPLETED_NO)); 00494 ACE_CHECK_RETURN (RTCORBA::ClientProtocolPolicy::_nil ()); 00495 00496 return tmp; 00497 } |
|
Create a new mutex. Mutexes returned by this method are the same as those used internally by the ORB, so that consistant priority inheritance/piority ceiling semantics can be guaranteed. Implements RTCORBA::RTORB. Definition at line 44 of file RT_ORB.cpp. References ACE_ENV_SINGLE_ARG_PARAMETER.
00046 { 00047 return this->mutex_mgr_.create_mutex (ACE_ENV_SINGLE_ARG_PARAMETER); 00048 } |
|
Create a mutex and assign a name to it. If the mutex already exists, it is returned and the created_flag is set to 0. Definition at line 61 of file RT_ORB.cpp. References ACE_ENV_ARG_PARAMETER.
00065 { 00066 return this->mutex_mgr_.create_named_mutex (name, 00067 created_flag 00068 ACE_ENV_ARG_PARAMETER); 00069 } |
|
Create a PriorityBandedConnectionPolicy instance for use on either the client or server side Definition at line 440 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00444 { 00445 TAO_PriorityBandedConnectionPolicy *tmp = 0; 00446 ACE_NEW_THROW_EX (tmp, 00447 TAO_PriorityBandedConnectionPolicy (priority_bands), 00448 CORBA::NO_MEMORY (TAO::VMCID, 00449 CORBA::COMPLETED_NO)); 00450 ACE_CHECK_RETURN (RTCORBA::PriorityBandedConnectionPolicy::_nil ()); 00451 00452 return tmp; 00453 } |
|
Create a priority model policy for use when configuring a POA.
Definition at line 409 of file RT_ORB.cpp. References ACE_CHECK_RETURN, ACE_NEW_THROW_EX, and RTCORBA::Priority.
00413 { 00414 TAO_PriorityModelPolicy *tmp = 0; 00415 ACE_NEW_THROW_EX (tmp, 00416 TAO_PriorityModelPolicy (priority_model, server_priority), 00417 CORBA::NO_MEMORY (TAO::VMCID, 00418 CORBA::COMPLETED_NO)); 00419 ACE_CHECK_RETURN (RTCORBA::PriorityModelPolicy::_nil ()); 00420 00421 return tmp; 00422 } |
|
Create a PrivateConnectionPolicy instance to use on client to request a private (non-multiplexed) transport connection to the server. Implements RTCORBA::RTORB. Definition at line 456 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00458 { 00459 TAO_PrivateConnectionPolicy *tmp = 0; 00460 ACE_NEW_THROW_EX (tmp, 00461 TAO_PrivateConnectionPolicy (), 00462 CORBA::NO_MEMORY (TAO::VMCID, 00463 CORBA::COMPLETED_NO)); 00464 ACE_CHECK_RETURN (RTCORBA::PrivateConnectionPolicy::_nil ()); 00465 00466 return tmp; 00467 } |
|
Create a ServerProtocolPolicy instance to select and configure communication protocols on the server side. Definition at line 470 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00473 { 00474 TAO_ServerProtocolPolicy *tmp = 0; 00475 ACE_NEW_THROW_EX (tmp, 00476 TAO_ServerProtocolPolicy (protocols), 00477 CORBA::NO_MEMORY (TAO::VMCID, 00478 CORBA::COMPLETED_NO)); 00479 ACE_CHECK_RETURN (RTCORBA::ServerProtocolPolicy::_nil ()); 00480 00481 return tmp; 00482 } |
|
Definition at line 283 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00294 { 00295 TAO_SharedMemory_Protocol_Properties *tmp = 0; 00296 ACE_NEW_THROW_EX (tmp, 00297 TAO_SharedMemory_Protocol_Properties (send_buffer_size, 00298 recv_buffer_size, 00299 keep_alive, 00300 dont_route, 00301 no_delay, 00302 preallocate_buffer_size, 00303 mmap_filename, 00304 mmap_lockname), 00305 CORBA::NO_MEMORY (TAO::VMCID, 00306 CORBA::COMPLETED_NO)); 00307 ACE_CHECK_RETURN (RTCORBA::SharedMemoryProtocolProperties::_nil ()); 00308 00309 return tmp; 00310 } |
|
Definition at line 330 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00339 { 00340 TAO_StreamControl_Protocol_Properties *tmp = 0; 00341 ACE_NEW_THROW_EX (tmp, 00342 TAO_StreamControl_Protocol_Properties ( 00343 send_buffer_size, 00344 recv_buffer_size, 00345 keep_alive, 00346 dont_route, 00347 no_delay, 00348 enable_network_priority), 00349 CORBA::NO_MEMORY (TAO::VMCID, 00350 CORBA::COMPLETED_NO)); 00351 ACE_CHECK_RETURN (RTCORBA::StreamControlProtocolProperties::_nil ()); 00352 00353 return tmp; 00354 } |
|
Create and return a TCPProtocolProperties instance with the specified parameters. Definition at line 239 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00247 { 00248 TAO_TCP_Protocol_Properties *tmp = 0; 00249 ACE_NEW_THROW_EX (tmp, 00250 TAO_TCP_Protocol_Properties (send_buffer_size, 00251 recv_buffer_size, 00252 keep_alive, 00253 dont_route, 00254 no_delay, 00255 enable_network_priority), 00256 CORBA::NO_MEMORY (TAO::VMCID, 00257 CORBA::COMPLETED_NO)); 00258 ACE_CHECK_RETURN (RTCORBA::TCPProtocolProperties::_nil ()); 00259 00260 return tmp; 00261 } |
|
Create a RTCORBA threadpool to manage a set of threads without lanes.
Definition at line 357 of file RT_ORB.cpp. References ACE_ENV_ARG_PARAMETER, and RTCORBA::Priority.
00366 { 00367 return this->tp_manager_->create_threadpool (stacksize, 00368 static_threads, 00369 dynamic_threads, 00370 default_priority, 00371 allow_request_buffering, 00372 max_buffered_requests, 00373 max_request_buffer_size, 00374 this->dynamic_thread_idle_timeout_ 00375 ACE_ENV_ARG_PARAMETER); 00376 } |
|
Create a ThreadpoolPolicy instance for POA creation.
Definition at line 425 of file RT_ORB.cpp. References ACE_CHECK_RETURN, ACE_NEW_THROW_EX, and RTCORBA::ThreadpoolId.
00428 { 00429 TAO_ThreadpoolPolicy *tmp = 0; 00430 ACE_NEW_THROW_EX (tmp, 00431 TAO_ThreadpoolPolicy (threadpool), 00432 CORBA::NO_MEMORY (TAO::VMCID, 00433 CORBA::COMPLETED_NO)); 00434 ACE_CHECK_RETURN (RTCORBA::ThreadpoolPolicy::_nil ()); 00435 00436 return tmp; 00437 } |
|
Create a threadpool and separate it into subsets based on priorities. Definition at line 379 of file RT_ORB.cpp. References ACE_ENV_ARG_PARAMETER.
00387 { 00388 return this->tp_manager_->create_threadpool_with_lanes (stacksize, 00389 lanes, 00390 allow_borrowing, 00391 allow_request_buffering, 00392 max_buffered_requests, 00393 max_request_buffer_size, 00394 this->dynamic_thread_idle_timeout_ 00395 ACE_ENV_ARG_PARAMETER); 00396 } |
|
Definition at line 264 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00269 { 00270 TAO_UnixDomain_Protocol_Properties *tmp = 0; 00271 ACE_NEW_THROW_EX (tmp, 00272 TAO_UnixDomain_Protocol_Properties ( 00273 send_buffer_size, 00274 recv_buffer_size), 00275 CORBA::NO_MEMORY (TAO::VMCID, 00276 CORBA::COMPLETED_NO)); 00277 ACE_CHECK_RETURN (RTCORBA::UnixDomainProtocolProperties::_nil ()); 00278 00279 return tmp; 00280 } |
|
Definition at line 313 of file RT_ORB.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00317 { 00318 TAO_UserDatagram_Protocol_Properties *tmp = 0; 00319 ACE_NEW_THROW_EX (tmp, 00320 TAO_UserDatagram_Protocol_Properties ( 00321 enable_network_priority), 00322 CORBA::NO_MEMORY (TAO::VMCID, 00323 CORBA::COMPLETED_NO)); 00324 ACE_CHECK_RETURN (RTCORBA::UserDatagramProtocolProperties::_nil ()); 00325 00326 return tmp; 00327 } |
|
Destroy a mutex. Currently this is a no-op since RTCORBA::Mutex instances are destroyed as soon as their reference counts go to 0. Definition at line 51 of file RT_ORB.cpp. References ACE_ENV_ARG_PARAMETER, and RTCORBA::Mutex_ptr.
00054 { 00055 this->mutex_mgr_.destroy_mutex (mutex 00056 ACE_ENV_ARG_PARAMETER); 00057 } |
|
Free the resources associated with the specified threadpool.
Definition at line 399 of file RT_ORB.cpp. References ACE_ENV_ARG_PARAMETER, and RTCORBA::ThreadpoolId.
00403 { 00404 this->tp_manager_->destroy_threadpool (threadpool 00405 ACE_ENV_ARG_PARAMETER); 00406 } |
|
This method changes the scheduling policy of the calling thread to match the scheduling policy specified in the svc.conf file. The priority of the calling thread will be set to the minimum priority supported by that scheduling policy. This method make sense on those platform (e.g., Linux) where PTHREAD_SCOPE_SYSTEM is the only scheduling scope supported. On other platforms, this method is a no-op since the only way to get the real-time threading behavior is to setup the PTHREAD_SCOPE_SYSTEM scheduling scope when a thread is being created. On such platforms, one can set the correct scheduling scope and policy when creating the thread, thus not needing to use this method. Definition at line 513 of file RT_ORB.cpp. References ACE_hthread_t, ACE_NOTSUP_RETURN, ACE_Sched_Params::priority_min(), ACE_Thread::self(), and ACE_Thread::setprio().
00514 { 00515 // 00516 // This method changes the scheduling policy of the calling thread 00517 // to match the scheduling policy specified in the svc.conf file. 00518 // The priority of the calling thread will be set to the minimum 00519 // priority supported by that scheduling policy. 00520 // 00521 // This method make sense on those platform (e.g., Linux) where 00522 // PTHREAD_SCOPE_SYSTEM is the only scheduling scope supported. On 00523 // other platforms, this method is a no-op since the only way to get 00524 // the real-time threading behavior is to setup the 00525 // PTHREAD_SCOPE_SYSTEM scheduling scope when a thread is being 00526 // created. On such platforms, one can set the correct scheduling 00527 // scope and policy when creating the thread, thus not needing to 00528 // use this method. 00529 // 00530 00531 #if defined (linux) 00532 00533 int sched_policy = 00534 orb->orb_core ()->orb_params ()->ace_sched_policy (); 00535 00536 int minimum_priority = 00537 ACE_Sched_Params::priority_min (sched_policy); 00538 00539 ACE_hthread_t thread_id; 00540 ACE_Thread::self (thread_id); 00541 00542 return ACE_Thread::setprio (thread_id, 00543 minimum_priority, 00544 sched_policy); 00545 00546 #else /* linux */ 00547 00548 ACE_UNUSED_ARG (orb); 00549 ACE_NOTSUP_RETURN (-1); 00550 00551 #endif /* linux */ 00552 00553 } |
|
Retrieve a previously created mutex.
Implements RTCORBA::RTORB. Definition at line 72 of file RT_ORB.cpp. References ACE_ENV_ARG_PARAMETER.
00076 { 00077 return this->mutex_mgr_.open_named_mutex (name 00078 ACE_ENV_ARG_PARAMETER); 00079 } |
|
Reference to our creating ORB Core.
Reimplemented from CORBA::Object. Definition at line 506 of file RT_ORB.cpp.
00507 { 00508 return this->orb_core_; 00509 } |
|
Get the Thread Pool Manager.
Definition at line 500 of file RT_ORB.cpp. References tp_manager_.
00501 { 00502 return *this->tp_manager_; 00503 } |
|
Dynamic thread idle timeout.
|
|
mutex_mgr_ manages the names associated with named mutexes.
|
|
Reference to our creating ORB Core.
Reimplemented from CORBA::Object. |
|
Thread Pool Manager.
Definition at line 322 of file RT_ORB.h. Referenced by TAO_RT_ORB(), and tp_manager(). |