TAO_CosNotification 4.0.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all 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:
Collaboration graph
[legend]

Classes

class  Tracker
 This interface allows tracking of the queue size. More...
 

Public Member Functions

 TAO_Notify_Buffering_Strategy (TAO_Notify_Message_Queue &msg_queue, const TAO_Notify_AdminProperties::Ptr &admin_properties)
 
 ~TAO_Notify_Buffering_Strategy ()
 
void update_qos_properties (const TAO_Notify_QoSProperties &qos_properties)
 
int enqueue (TAO_Notify_Method_Request_Queueable *method_request)
 
int dequeue (TAO_Notify_Method_Request_Queueable *&method_request, const ACE_Time_Value *abstime)
 
void shutdown ()
 Shutdown.
 
ACE_Time_Value oldest_event ()
 Provide the time value of the oldest event in the queue.
 
void set_tracker (Tracker *tracker)
 Set the tracker object. This strategy does not own the tracker.
 

Private Member Functions

int queue (TAO_Notify_Method_Request_Queueable *method_request)
 Apply the Order Policy and queue. return -1 on error.
 
bool discard (TAO_Notify_Method_Request_Queueable *method_request)
 Discard as per the Discard Policy.
 

Private Attributes

TAO_Notify_Message_Queuemsg_queue_
 = Data Members
 
TAO_Notify_AdminProperties::Ptr admin_properties_
 Reference to the properties per event channel.
 
TAO_SYNCH_MUTEXglobal_queue_lock_
 The shared global lock used by all the queues.
 
CORBA::Longglobal_queue_length_
 The global queue length - queue length accross all the queues.
 
const TAO_Notify_Property_Longmax_queue_length_
 The maximum events that can be queued overall.
 
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.
 
TAO_Notify_Property_Long max_events_per_consumer_
 
TAO_Notify_Property_Time blocking_policy_
 
TAO_SYNCH_CONDITIONglobal_not_full_
 
TAO_SYNCH_CONDITION local_not_full_
 
TAO_SYNCH_CONDITION local_not_empty_
 Condition that batch size reached.
 
bool shutdown_
 Flag to shutdown.
 
Trackertracker_
 Optional queue tracker.
 

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_Buffering_Strategy ( TAO_Notify_Message_Queue & msg_queue,
const TAO_Notify_AdminProperties::Ptr & admin_properties )

◆ ~TAO_Notify_Buffering_Strategy()

TAO_Notify_Buffering_Strategy::~TAO_Notify_Buffering_Strategy ( )

Member Function Documentation

◆ dequeue()

int TAO_Notify_Buffering_Strategy::dequeue ( TAO_Notify_Method_Request_Queueable *& 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).

◆ discard()

bool TAO_Notify_Buffering_Strategy::discard ( TAO_Notify_Method_Request_Queueable * method_request)
private

Discard as per the Discard Policy.

◆ enqueue()

int TAO_Notify_Buffering_Strategy::enqueue ( TAO_Notify_Method_Request_Queueable * method_request)

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

◆ oldest_event()

ACE_Time_Value TAO_Notify_Buffering_Strategy::oldest_event ( )

Provide the time value of the oldest event in the queue.

◆ queue()

int TAO_Notify_Buffering_Strategy::queue ( TAO_Notify_Method_Request_Queueable * method_request)
private

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

◆ set_tracker()

void TAO_Notify_Buffering_Strategy::set_tracker ( TAO_Notify_Buffering_Strategy::Tracker * tracker)

Set the tracker object. This strategy does not own the tracker.

◆ shutdown()

void TAO_Notify_Buffering_Strategy::shutdown ( )

Shutdown.

◆ update_qos_properties()

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

Member Data Documentation

◆ admin_properties_

TAO_Notify_AdminProperties::Ptr TAO_Notify_Buffering_Strategy::admin_properties_
private

Reference to the properties per event channel.

◆ blocking_policy_

TAO_Notify_Property_Time TAO_Notify_Buffering_Strategy::blocking_policy_
private

◆ discard_policy_

TAO_Notify_Property_Short TAO_Notify_Buffering_Strategy::discard_policy_
private

Policy to discard when buffers are full.

◆ global_not_full_

TAO_SYNCH_CONDITION& TAO_Notify_Buffering_Strategy::global_not_full_
private

◆ global_queue_length_

CORBA::Long& TAO_Notify_Buffering_Strategy::global_queue_length_
private

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

◆ global_queue_lock_

TAO_SYNCH_MUTEX& TAO_Notify_Buffering_Strategy::global_queue_lock_
private

The shared global lock used by all the queues.

◆ local_not_empty_

TAO_SYNCH_CONDITION TAO_Notify_Buffering_Strategy::local_not_empty_
private

Condition that batch size reached.

◆ local_not_full_

TAO_SYNCH_CONDITION TAO_Notify_Buffering_Strategy::local_not_full_
private

◆ max_events_per_consumer_

TAO_Notify_Property_Long TAO_Notify_Buffering_Strategy::max_events_per_consumer_
private

◆ max_queue_length_

const TAO_Notify_Property_Long& TAO_Notify_Buffering_Strategy::max_queue_length_
private

The maximum events that can be queued overall.

◆ msg_queue_

TAO_Notify_Message_Queue& TAO_Notify_Buffering_Strategy::msg_queue_
private

= Data Members

The local Message Queue

◆ order_policy_

TAO_Notify_Property_Short TAO_Notify_Buffering_Strategy::order_policy_
private

Order of events in internal buffers.

◆ shutdown_

bool TAO_Notify_Buffering_Strategy::shutdown_
private

Flag to shutdown.

◆ tracker_

Tracker* TAO_Notify_Buffering_Strategy::tracker_
private

Optional queue tracker.


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