TAO_RTEvent
2.0.8
|
Dispatching strategy that isolates deliveries to a consumer from any other. More...
#include <EC_TPC_Dispatching.h>
Public Member Functions | |
TAO_EC_TPC_Dispatching (int nthreads, int thread_creation_flags, int thread_priority, int force_activate, TAO_EC_Queue_Full_Service_Object *so) | |
~TAO_EC_TPC_Dispatching () | |
virtual void | activate (void) |
virtual void | shutdown (void) |
virtual void | push (TAO_EC_ProxyPushSupplier *proxy, RtecEventComm::PushConsumer_ptr consumer, const RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) |
virtual void | push_nocopy (TAO_EC_ProxyPushSupplier *proxy, RtecEventComm::PushConsumer_ptr consumer, RtecEventComm::EventSet &event, TAO_EC_QOS_Info &qos_info) |
int | add_consumer (RtecEventComm::PushConsumer_ptr consumer) |
int | remove_consumer (RtecEventComm::PushConsumer_ptr consumer) |
Private Types | |
typedef ACE_Hash_Map_Manager_Ex < RtecEventComm::PushConsumer_ptr, TAO_EC_Dispatching_Task *, ACE_Pointer_Hash < RtecEventComm::PushConsumer_ptr > , ACE_Equal_To < RtecEventComm::PushConsumer_ptr > , ACE_Null_Mutex > | MAPTYPE |
Private Attributes | |
ACE_Thread_Manager | thread_manager_ |
int | nthreads_ |
The number of active tasks. | |
int | thread_creation_flags_ |
int | thread_priority_ |
The priority of the dispatching threads. | |
int | force_activate_ |
MAPTYPE | consumer_task_map_ |
TAO_SYNCH_MUTEX | lock_ |
TAO_EC_Queue_Full_Service_Object * | queue_full_service_object_ |
Dispatching strategy that isolates deliveries to a consumer from any other.
This strategy uses a thread per consumer, and was specifically designed to isolate the effects of an ill-behaved consumer from affecting other consumers.
typedef ACE_Hash_Map_Manager_Ex<RtecEventComm::PushConsumer_ptr,TAO_EC_Dispatching_Task*,ACE_Pointer_Hash<RtecEventComm::PushConsumer_ptr>,ACE_Equal_To<RtecEventComm::PushConsumer_ptr>,ACE_Null_Mutex> TAO_EC_TPC_Dispatching::MAPTYPE [private] |
TAO_EC_TPC_Dispatching::TAO_EC_TPC_Dispatching | ( | int | nthreads, |
int | thread_creation_flags, | ||
int | thread_priority, | ||
int | force_activate, | ||
TAO_EC_Queue_Full_Service_Object * | so | ||
) |
TAO_EC_TPC_Dispatching::~TAO_EC_TPC_Dispatching | ( | ) |
void TAO_EC_TPC_Dispatching::activate | ( | void | ) | [virtual] |
Initialize all the data structures, activate any internal threads, etc.
Implements TAO_EC_Dispatching.
int TAO_EC_TPC_Dispatching::add_consumer | ( | RtecEventComm::PushConsumer_ptr | consumer | ) |
void TAO_EC_TPC_Dispatching::push | ( | TAO_EC_ProxyPushSupplier * | proxy, |
RtecEventComm::PushConsumer_ptr | consumer, | ||
const RtecEventComm::EventSet & | event, | ||
TAO_EC_QOS_Info & | qos_info | ||
) | [virtual] |
The consumer represented by proxy should receive event. It can use the information in qos_info to determine the event priority (among other things).
Implements TAO_EC_Dispatching.
void TAO_EC_TPC_Dispatching::push_nocopy | ( | TAO_EC_ProxyPushSupplier * | proxy, |
RtecEventComm::PushConsumer_ptr | consumer, | ||
RtecEventComm::EventSet & | event, | ||
TAO_EC_QOS_Info & | qos_info | ||
) | [virtual] |
Implements TAO_EC_Dispatching.
int TAO_EC_TPC_Dispatching::remove_consumer | ( | RtecEventComm::PushConsumer_ptr | consumer | ) |
void TAO_EC_TPC_Dispatching::shutdown | ( | void | ) | [virtual] |
Deactivate any internal threads and cleanup internal data structures, it should only return once the threads have finished their jobs.
Implements TAO_EC_Dispatching.
int TAO_EC_TPC_Dispatching::force_activate_ [private] |
If activation at the requested priority fails then we fallback on the defaults for thread activation.
TAO_SYNCH_MUTEX TAO_EC_TPC_Dispatching::lock_ [private] |
int TAO_EC_TPC_Dispatching::nthreads_ [private] |
The number of active tasks.
int TAO_EC_TPC_Dispatching::thread_creation_flags_ [private] |
The flags (THR_BOUND, THR_NEW_LWP, etc.) used to create the dispatching threads.
int TAO_EC_TPC_Dispatching::thread_priority_ [private] |
The priority of the dispatching threads.