#include <Buffering_Strategy.h>
Collaboration diagram for TAO_Notify_Buffering_Strategy:
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. |
|
Constuctor.
|
|
Destructor.
|
|
Obtain our batch size.
|
|
Set the new batch size.
|
|
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 as per the Discard Policy.
|
|
Enqueue according the enqueing strategy. Return -1 on error else the number of items in the queue. |
|
Set the max local queue length.
|
|
Apply the Order Policy and queue. return -1 on error.
|
|
Shutdown.
|
|
Update state with the following QoS Properties: Order Policy Discard Policy MaxEventsPerConsumer TAO_Notify_Extensions::BlockingPolicy |
|
Reference to the properties per event channel.
|
|
The batch size that we want to monitor for dequeuing.
|
|
Condition that batch size reached.
|
|
The blocking timeout will be used in place of discarding This is a TAO specific extension. |
|
Policy to discard when buffers are full.
|
|
The global queue length - queue length accross all the queues.
|
|
The shared global lock used by all the queues.
|
|
The shared Condition for global queue not full.
|
|
Condition that the local queue is not full.
|
|
The maximum events that can be queued overall.
|
|
The maximum queue length for the local queue.
|
|
= Data Members The local Message Queue
|
|
Order of events in internal buffers.
|
|
Flag to shutdown.
|
|
Flag that we should use discarding(1) or blocking (0).
|