RTCORBA::RTORB implementation. More...
#include <RT_ORB.h>
Public Member Functions | |
TAO_RT_ORB (TAO_ORB_Core *orb_core, TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan lifespan, ACE_Time_Value const &dynamic_thread_time) | |
Constructor. | |
virtual RTCORBA::Mutex_ptr | create_mutex (void) |
virtual void | destroy_mutex (RTCORBA::Mutex_ptr the_mutex) |
virtual RTCORBA::Mutex_ptr | create_named_mutex (const char *name, CORBA::Boolean_out created_flag) |
virtual RTCORBA::Mutex_ptr | open_named_mutex (const char *name) |
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) |
RTCORBA::UnixDomainProtocolProperties_ptr | create_unix_domain_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size) |
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) |
RTCORBA::UserDatagramProtocolProperties_ptr | create_user_datagram_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean enable_network_priority) |
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) |
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) |
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) |
virtual void | destroy_threadpool (RTCORBA::ThreadpoolId threadpool) |
Free the resources associated with the specified threadpool. | |
virtual RTCORBA::PriorityModelPolicy_ptr | create_priority_model_policy (RTCORBA::PriorityModel priority_model, RTCORBA::Priority server_priority) |
Create a priority model policy for use when configuring a POA. | |
virtual RTCORBA::ThreadpoolPolicy_ptr | create_threadpool_policy (RTCORBA::ThreadpoolId threadpool) |
Create a ThreadpoolPolicy instance for POA creation. | |
virtual RTCORBA::PriorityBandedConnectionPolicy_ptr | create_priority_banded_connection_policy (const RTCORBA::PriorityBands &priority_bands) |
virtual RTCORBA::PrivateConnectionPolicy_ptr | create_private_connection_policy (void) |
virtual RTCORBA::ServerProtocolPolicy_ptr | create_server_protocol_policy (const RTCORBA::ProtocolList &protocols) |
virtual RTCORBA::ClientProtocolPolicy_ptr | create_client_protocol_policy (const RTCORBA::ProtocolList &protocols) |
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 | |
static 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. | |
TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan | lifespan_ |
Dynamic thread lifespan policy. | |
ACE_Time_Value const | dynamic_thread_time_ |
Dynamic thread run time. |
RTCORBA::RTORB implementation.
Creates and destroys RT CORBA objects, i.e., policies, threadpools, mutexes.
Definition at line 93 of file RT_ORB.h.
TAO_RT_ORB::TAO_RT_ORB | ( | TAO_ORB_Core * | orb_core, | |
TAO_RT_ORBInitializer::TAO_RTCORBA_DT_LifeSpan | lifespan, | |||
ACE_Time_Value const & | dynamic_thread_time | |||
) |
Constructor.
Definition at line 23 of file RT_ORB.cpp.
: orb_core_ (orb_core), mutex_mgr_ (), tp_manager_ (0), lifespan_ (lifespan), dynamic_thread_time_ (dynamic_thread_time) { TAO_Thread_Lane_Resources_Manager *thread_lane_resources_manager = &this->orb_core_->thread_lane_resources_manager (); TAO_RT_Thread_Lane_Resources_Manager *rt_thread_lane_resources_manager = dynamic_cast <TAO_RT_Thread_Lane_Resources_Manager *> (thread_lane_resources_manager); if (!rt_thread_lane_resources_manager) throw CORBA::INTERNAL (); this->tp_manager_ = &rt_thread_lane_resources_manager->tp_manager (); }
TAO_RT_ORB::~TAO_RT_ORB | ( | void | ) | [protected, virtual] |
Protected destructor to enforce proper memory management of this reference counted object.
Definition at line 45 of file RT_ORB.cpp.
{ }
RTCORBA::ClientProtocolPolicy_ptr TAO_RT_ORB::create_client_protocol_policy | ( | const RTCORBA::ProtocolList & | protocols | ) | [virtual] |
Create a ClientProtocolPolicy instance to select and configure communication protocols on the client side.
Definition at line 426 of file RT_ORB.cpp.
{ TAO_ClientProtocolPolicy *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_ClientProtocolPolicy (protocols), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::Mutex_ptr TAO_RT_ORB::create_mutex | ( | void | ) | [virtual] |
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.
Definition at line 50 of file RT_ORB.cpp.
{ return this->mutex_mgr_.create_mutex (); }
RTCORBA::Mutex_ptr TAO_RT_ORB::create_named_mutex | ( | const char * | name, | |
CORBA::Boolean_out | created_flag | |||
) | [virtual] |
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 63 of file RT_ORB.cpp.
{ return this->mutex_mgr_.create_named_mutex (name, created_flag); }
RTCORBA::PriorityBandedConnectionPolicy_ptr TAO_RT_ORB::create_priority_banded_connection_policy | ( | const RTCORBA::PriorityBands & | priority_bands | ) | [virtual] |
Create a PriorityBandedConnectionPolicy instance for use on either the client or server side
Definition at line 389 of file RT_ORB.cpp.
{ TAO_PriorityBandedConnectionPolicy *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_PriorityBandedConnectionPolicy (priority_bands), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::PriorityModelPolicy_ptr TAO_RT_ORB::create_priority_model_policy | ( | RTCORBA::PriorityModel | priority_model, | |
RTCORBA::Priority | server_priority | |||
) | [virtual] |
Create a priority model policy for use when configuring a POA.
Definition at line 364 of file RT_ORB.cpp.
{ TAO_PriorityModelPolicy *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_PriorityModelPolicy (priority_model, server_priority), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::PrivateConnectionPolicy_ptr TAO_RT_ORB::create_private_connection_policy | ( | void | ) | [virtual] |
Create a PrivateConnectionPolicy instance to use on client to request a private (non-multiplexed) transport connection to the server.
Definition at line 402 of file RT_ORB.cpp.
{ TAO_PrivateConnectionPolicy *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_PrivateConnectionPolicy (), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::ServerProtocolPolicy_ptr TAO_RT_ORB::create_server_protocol_policy | ( | const RTCORBA::ProtocolList & | protocols | ) | [virtual] |
Create a ServerProtocolPolicy instance to select and configure communication protocols on the server side.
Definition at line 414 of file RT_ORB.cpp.
{ TAO_ServerProtocolPolicy *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_ServerProtocolPolicy (protocols), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::SharedMemoryProtocolProperties_ptr TAO_RT_ORB::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 | |||
) |
Definition at line 249 of file RT_ORB.cpp.
{ TAO_SharedMemory_Protocol_Properties *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_SharedMemory_Protocol_Properties (send_buffer_size, recv_buffer_size, keep_alive, dont_route, no_delay, preallocate_buffer_size, mmap_filename, mmap_lockname), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::StreamControlProtocolProperties_ptr TAO_RT_ORB::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 | |||
) |
Definition at line 294 of file RT_ORB.cpp.
{ TAO_StreamControl_Protocol_Properties *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_StreamControl_Protocol_Properties ( send_buffer_size, recv_buffer_size, keep_alive, dont_route, no_delay, enable_network_priority), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::TCPProtocolProperties_ptr TAO_RT_ORB::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 | |||
) |
Create and return a TCPProtocolProperties instance with the specified parameters.
Definition at line 210 of file RT_ORB.cpp.
{ TAO_TCP_Protocol_Properties *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_TCP_Protocol_Properties (send_buffer_size, recv_buffer_size, keep_alive, dont_route, no_delay, enable_network_priority), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::ThreadpoolId TAO_RT_ORB::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 | |||
) | [virtual] |
Create a RTCORBA threadpool to manage a set of threads without lanes.
Definition at line 319 of file RT_ORB.cpp.
{ return this->tp_manager_->create_threadpool (stacksize, static_threads, dynamic_threads, default_priority, allow_request_buffering, max_buffered_requests, max_request_buffer_size, this->lifespan_, this->dynamic_thread_time_); }
RTCORBA::ThreadpoolPolicy_ptr TAO_RT_ORB::create_threadpool_policy | ( | RTCORBA::ThreadpoolId | threadpool | ) | [virtual] |
Create a ThreadpoolPolicy instance for POA creation.
Definition at line 377 of file RT_ORB.cpp.
{ TAO_ThreadpoolPolicy *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_ThreadpoolPolicy (threadpool), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::ThreadpoolId TAO_RT_ORB::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 | |||
) | [virtual] |
Create a threadpool and separate it into subsets based on priorities.
Definition at line 340 of file RT_ORB.cpp.
{ return this->tp_manager_->create_threadpool_with_lanes (stacksize, lanes, allow_borrowing, allow_request_buffering, max_buffered_requests, max_request_buffer_size, this->lifespan_, this->dynamic_thread_time_); }
RTCORBA::UnixDomainProtocolProperties_ptr TAO_RT_ORB::create_unix_domain_protocol_properties | ( | CORBA::Long | send_buffer_size, | |
CORBA::Long | recv_buffer_size | |||
) |
Definition at line 233 of file RT_ORB.cpp.
{ TAO_UnixDomain_Protocol_Properties *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_UnixDomain_Protocol_Properties ( send_buffer_size, recv_buffer_size), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
RTCORBA::UserDatagramProtocolProperties_ptr TAO_RT_ORB::create_user_datagram_protocol_properties | ( | CORBA::Long | send_buffer_size, | |
CORBA::Long | recv_buffer_size, | |||
CORBA::Boolean | enable_network_priority | |||
) |
Definition at line 276 of file RT_ORB.cpp.
{ TAO_UserDatagram_Protocol_Properties *tmp = 0; ACE_NEW_THROW_EX (tmp, TAO_UserDatagram_Protocol_Properties ( send_buffer_size, recv_buffer_size, enable_network_priority), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); return tmp; }
void TAO_RT_ORB::destroy_mutex | ( | RTCORBA::Mutex_ptr | the_mutex | ) | [virtual] |
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 56 of file RT_ORB.cpp.
{ this->mutex_mgr_.destroy_mutex (mutex); }
void TAO_RT_ORB::destroy_threadpool | ( | RTCORBA::ThreadpoolId | threadpool | ) | [virtual] |
Free the resources associated with the specified threadpool.
Definition at line 358 of file RT_ORB.cpp.
{ this->tp_manager_->destroy_threadpool (threadpool); }
int TAO_RT_ORB::modify_thread_scheduling_policy | ( | CORBA::ORB_ptr | orb | ) | [static] |
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 451 of file RT_ORB.cpp.
{ // // 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. // #if defined (linux) int const sched_policy = orb->orb_core ()->orb_params ()->ace_sched_policy (); int const minimum_priority = ACE_Sched_Params::priority_min (sched_policy); ACE_hthread_t thread_id; ACE_Thread::self (thread_id); return ACE_Thread::setprio (thread_id, minimum_priority, sched_policy); #else /* linux */ ACE_UNUSED_ARG (orb); ACE_NOTSUP_RETURN (-1); #endif /* linux */ }
RTCORBA::Mutex_ptr TAO_RT_ORB::open_named_mutex | ( | const char * | name | ) | [virtual] |
Retrieve a previously created mutex.
Definition at line 70 of file RT_ORB.cpp.
{ return this->mutex_mgr_.open_named_mutex (name); }
TAO_ORB_Core * TAO_RT_ORB::orb_core | ( | void | ) | const |
Reference to our creating ORB Core.
Reimplemented from CORBA::Object.
Definition at line 444 of file RT_ORB.cpp.
{ return this->orb_core_; }
TAO_Thread_Pool_Manager & TAO_RT_ORB::tp_manager | ( | void | ) | const |
Get the Thread Pool Manager.
Definition at line 438 of file RT_ORB.cpp.
{ return *this->tp_manager_; }
ACE_Time_Value const TAO_RT_ORB::dynamic_thread_time_ [protected] |
TAO_Named_RT_Mutex_Manager TAO_RT_ORB::mutex_mgr_ [protected] |
TAO_ORB_Core* const TAO_RT_ORB::orb_core_ [protected] |
Reference to our creating ORB Core.
Reimplemented from CORBA::Object.
TAO_Thread_Pool_Manager* TAO_RT_ORB::tp_manager_ [protected] |