Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# TAO_EC_Priority_Dispatching Class Reference

Dispatching strategy that minimizes priority inversion. More...

`#include <EC_Priority_Dispatching.h>`

Inheritance diagram for TAO_EC_Priority_Dispatching

[legend]
Collaboration diagram for TAO_EC_Priority_Dispatching:

[legend]
List of all members.

## Public Methods
| TAO_EC_Priority_Dispatching (TAO_EC_Event_Channel* ec)
| The scheduler is used to find the range of priorities and similar info.
virtual void | activate (void)
| Initialize all the data structures, activate any internal threads, etc.
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, CORBA::Environment& env)
virtual void | push_nocopy (TAO_EC_ProxyPushSupplier* proxy, RtecEventComm::PushConsumer_ptr consumer, RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info, CORBA::Environment& env)
## Private Attributes
ACE_Thread_Manager | thread_manager_
| Use our own thread manager.
int | ntasks_
| The number of active tasks.
TAO_EC_Dispatching_Task** | tasks_
| The tasks..
RtecScheduler::Scheduler_var | scheduler_
| The scheduler.

## Detailed Description

Dispatching strategy that minimizes priority inversion.

This strategy uses multiple queues, each serviced by a thread at different priority. This minimizes priority inversion because the consumers at higher priority are serviced before consumers at lower priority. It is more flexible than using the supplier thread to dispatch because it allows high-priority suppliers to push events to low-priority consumers (and vice-versa). It also isolates the supplier threads from the time spent on upcalls to the consumer objects, making the system easier to analyze and schedule.

## Constructor & Destructor Documentation

TAO_EC_Priority_Dispatching::TAO_EC_Priority_Dispatching ( | TAO_EC_Event_Channel * ec )`[inline]`

| The scheduler is used to find the range of priorities and similar info.

## Member Function Documentation

void TAO_EC_Priority_Dispatching::activate ( | void )`[virtual]`

| Initialize all the data structures, activate any internal threads, etc. Reimplemented from TAO_EC_Dispatching.

void TAO_EC_Priority_Dispatching::push ( | TAO_EC_ProxyPushSupplier * proxy,
| RtecEventComm::PushConsumer_ptr consumer,
| const RtecEventComm::EventSet & event,
| TAO_EC_QOS_Info & qos_info,
| CORBA::Environment & ACE_TRY_ENV )`[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). Reimplemented from TAO_EC_Dispatching.

void TAO_EC_Priority_Dispatching::push_nocopy ( | TAO_EC_ProxyPushSupplier * proxy,
| RtecEventComm::PushConsumer_ptr consumer,
| RtecEventComm::EventSet & event,
| TAO_EC_QOS_Info & qos_info,
| CORBA::Environment & ACE_TRY_ENV )`[virtual]`

| Reimplemented from TAO_EC_Dispatching.

void TAO_EC_Priority_Dispatching::shutdown ( | void )`[virtual]`

| Deactivate any internal threads and cleanup internal data structures, it should only return once the threads have finished their jobs. Reimplemented from TAO_EC_Dispatching.

## Member Data Documentation

int TAO_EC_Priority_Dispatching::ntasks_`[private]`

| The number of active tasks.

RtecScheduler::Scheduler_var TAO_EC_Priority_Dispatching::scheduler_`[private]`

| The scheduler.

TAO_EC_Dispatching_Task ** TAO_EC_Priority_Dispatching::tasks_`[private]`

| The tasks..

ACE_Thread_Manager TAO_EC_Priority_Dispatching::thread_manager_`[private]`

| Use our own thread manager.

The documentation for this class was generated from the following files:

- EC_Priority_Dispatching.h
- EC_Priority_Dispatching.cpp