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

# TAO_Notify_Buffering_Strategy Class Reference

Base Strategy to enqueue and dequeue items from a Message Queue. More...

`#include <Buffering_Strategy.h>`

Collaboration diagram for TAO_Notify_Buffering_Strategy:

[legend]
List of all members.

## Public Methods
| TAO_Notify_Buffering_Strategy (TAO_Notify_Message_Queue &msg_queue, TAO_Notify_AdminProperties_var &admin_properties, CORBA::Long batch_size)
| Constuctor.
| ~TAO_Notify_Buffering_Strategy ()
| Destructor.
void | update_qos_properties (const TAO_Notify_QoSProperties &qos_properties)
int | enqueue (TAO_Notify_Method_Request &method_request)
int | dequeue (TAO_Notify_Method_Request *&method_request, const ACE_Time_Value *abstime)
void | shutdown (void)
| Shutdown.
void | batch_size (CORBA::Long batch_size)
| Set the new batch size.
CORBA::Long | batch_size (void)
| Obtain our batch size.
void | max_local_queue_length (CORBA::Long length)
| Set the max local queue length.
## Protected Methods
int | queue (TAO_Notify_Method_Request &method_request)
| Apply the Order Policy and queue. return -1 on error.
int | discard (void)
| Discard as per the Discard Policy.
## Protected Attributes
TAO_Notify_Message_Queue & | msg_queue_
| = Data Members The local Message Queue
TAO_Notify_AdminProperties_var | admin_properties_
| Reference to the properties per event channel.
ACE_SYNCH_MUTEX & | global_queue_lock_
| The shared global lock used by all the queues.
ACE_SYNCH_CONDITION & | global_queue_not_full_condition_
| The shared Condition for global queue not full.
CORBA::Long & | global_queue_length_
| The global queue length - queue length accross all the queues.
const TAO_Notify_Property_Long & | max_global_queue_length_
| The maximum events that can be queued overall.
CORBA::Long | max_local_queue_length_
| The maximum queue length for the local queue.
TAO_Notify_Property_Short | order_policy_
| Order of events in internal buffers.
TAO_Notify_Property_Short | discard_policy_
| Policy to discard when buffers are full.
int | use_discarding_
| Flag that we should use discarding(1) or blocking (0).
ACE_Time_Value | blocking_time_
ACE_SYNCH_CONDITION | local_queue_not_full_condition_
| Condition that the local queue is not full.
CORBA::Long | batch_size_
| The batch size that we want to monitor for dequeuing.
ACE_SYNCH_CONDITION | batch_size_reached_condition_
| Condition that batch size reached.
int | shutdown_
| Flag to shutdown.

## Detailed Description

Base Strategy to enqueue and dequeue items from a Message Queue.

## Constructor & Destructor Documentation

TAO_Notify_Buffering_Strategy::TAO_Notify_Buffering_Strategy | ( | TAO_Notify_Message_Queue & | msg_queue,
|  | TAO_Notify_AdminProperties_var & | admin_properties,
|  | CORBA::Long | batch_size
| ) |

| Constuctor.

TAO_Notify_Buffering_Strategy::~TAO_Notify_Buffering_Strategy | ( |  | ) |

| Destructor.

## Member Function Documentation

CORBA::Long TAO_Notify_Buffering_Strategy::batch_size | ( | void |  | ) |

| Obtain our batch size.

void TAO_Notify_Buffering_Strategy::batch_size | ( | CORBA::Long | batch_size | ) |

| Set the new batch size.

int TAO_Notify_Buffering_Strategy::dequeue | ( | TAO_Notify_Method_Request *& | method_request,
|  | const ACE_Time_Value * | abstime
| ) |

| Dequeue batch. This method will block for <abstime> if non-zero or else blocks till an item is available. Return -1 on error or if nothing is available, else the number of items actually dequeued (1).

int TAO_Notify_Buffering_Strategy::discard | ( | void |  | ) | `[protected]`

| Discard as per the Discard Policy.

int TAO_Notify_Buffering_Strategy::enqueue | ( | TAO_Notify_Method_Request & | method_request | ) |

| Enqueue according the enqueing strategy. Return -1 on error else the number of items in the queue.

void TAO_Notify_Buffering_Strategy::max_local_queue_length | ( | CORBA::Long | length | ) |

| Set the max local queue length.

int TAO_Notify_Buffering_Strategy::queue | ( | TAO_Notify_Method_Request & | method_request | ) | `[protected]`

| Apply the Order Policy and queue. return -1 on error.

void TAO_Notify_Buffering_Strategy::shutdown | ( | void |  | ) |

| Shutdown.

void TAO_Notify_Buffering_Strategy::update_qos_properties | ( | const TAO_Notify_QoSProperties & | qos_properties | ) |

| Update state with the following QoS Properties: Order Policy Discard Policy MaxEventsPerConsumer TAO_Notify_Extensions::BlockingPolicy

## Member Data Documentation

TAO_Notify_AdminProperties_var TAO_Notify_Buffering_Strategy::admin_properties_`[protected]`

| Reference to the properties per event channel.

CORBA::Long TAO_Notify_Buffering_Strategy::batch_size_`[protected]`

| The batch size that we want to monitor for dequeuing.

ACE_SYNCH_CONDITION TAO_Notify_Buffering_Strategy::batch_size_reached_condition_`[protected]`

| Condition that batch size reached.

ACE_Time_Value TAO_Notify_Buffering_Strategy::blocking_time_`[protected]`

| The blocking timeout will be used in place of discarding This is a TAO specific extension.

TAO_Notify_Property_Short TAO_Notify_Buffering_Strategy::discard_policy_`[protected]`

| Policy to discard when buffers are full.

CORBA::Long& TAO_Notify_Buffering_Strategy::global_queue_length_`[protected]`

| The global queue length - queue length accross all the queues.

ACE_SYNCH_MUTEX& TAO_Notify_Buffering_Strategy::global_queue_lock_`[protected]`

| The shared global lock used by all the queues.

ACE_SYNCH_CONDITION& TAO_Notify_Buffering_Strategy::global_queue_not_full_condition_`[protected]`

| The shared Condition for global queue not full.

ACE_SYNCH_CONDITION TAO_Notify_Buffering_Strategy::local_queue_not_full_condition_`[protected]`

| Condition that the local queue is not full.

const TAO_Notify_Property_Long& TAO_Notify_Buffering_Strategy::max_global_queue_length_`[protected]`

| The maximum events that can be queued overall.

CORBA::Long TAO_Notify_Buffering_Strategy::max_local_queue_length_`[protected]`

| The maximum queue length for the local queue.

TAO_Notify_Message_Queue& TAO_Notify_Buffering_Strategy::msg_queue_`[protected]`

| = Data Members The local Message Queue

TAO_Notify_Property_Short TAO_Notify_Buffering_Strategy::order_policy_`[protected]`

| Order of events in internal buffers.

int TAO_Notify_Buffering_Strategy::shutdown_`[protected]`

| Flag to shutdown.

int TAO_Notify_Buffering_Strategy::use_discarding_`[protected]`

| Flag that we should use discarding(1) or blocking (0).

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

- Buffering_Strategy.h
- Buffering_Strategy.cpp