The AdminProperties per EventChannel. More...
#include <AdminProperties.h>
The AdminProperties per EventChannel.
Definition at line 42 of file AdminProperties.h.
typedef ACE_Strong_Bound_Ptr<TAO_Notify_AdminProperties, TAO_SYNCH_MUTEX> TAO_Notify_AdminProperties::Ptr |
Definition at line 46 of file AdminProperties.h.
TAO_Notify_AdminProperties::TAO_Notify_AdminProperties | ( | void | ) |
Constructor.
Definition at line 17 of file AdminProperties.cpp.
: max_global_queue_length_ (CosNotification::MaxQueueLength, 0) , max_consumers_ (CosNotification::MaxConsumers, 0) , max_suppliers_ (CosNotification::MaxSuppliers, 0) , reject_new_events_ (CosNotification::RejectNewEvents, 0) , global_queue_length_ (0) , global_queue_not_full_ (global_queue_lock_) { }
TAO_Notify_AdminProperties::~TAO_Notify_AdminProperties | ( | ) | [virtual] |
TAO_Notify_Atomic_Property_Long & TAO_Notify_AdminProperties::consumers | ( | void | ) |
Definition at line 74 of file AdminProperties.inl.
{ return this->consumers_; }
CORBA::Long & TAO_Notify_AdminProperties::global_queue_length | ( | void | ) |
Definition at line 56 of file AdminProperties.inl.
{ return this->global_queue_length_; }
TAO_SYNCH_MUTEX & TAO_Notify_AdminProperties::global_queue_lock | ( | void | ) |
Definition at line 62 of file AdminProperties.inl.
{ return this->global_queue_lock_; }
TAO_SYNCH_CONDITION & TAO_Notify_AdminProperties::global_queue_not_full | ( | void | ) |
Definition at line 68 of file AdminProperties.inl.
{ return this->global_queue_not_full_; }
int TAO_Notify_AdminProperties::init | ( | const CosNotification::PropertySeq & | prop_seq | ) |
Init.
Reimplemented from TAO_Notify_PropertySeq.
Definition at line 32 of file AdminProperties.cpp.
{ if (TAO_Notify_PropertySeq::init (prop_seq) != 0) return -1; this->max_global_queue_length_.set (*this); this->max_consumers_.set (*this); this->max_suppliers_.set (*this); this->reject_new_events_.set (*this); //@@ check if unsupported property was set. // This will happen when number of successfull inits != numbers of items bound in map_. return 0; }
void TAO_Notify_AdminProperties::init | ( | void | ) |
finish initialization after values are set by topology load
Definition at line 49 of file AdminProperties.cpp.
{ // This method should only be called once, (during topo load) ACE_ASSERT(this->size() == 0); if (this->max_global_queue_length_.is_valid()) { CORBA::Any a; a <<= this->max_global_queue_length_.value(); this->add(this->max_global_queue_length_.name(), a); } if (this->max_consumers_.is_valid()) { CORBA::Any a; a <<= this->max_consumers_.value(); this->add(this->max_consumers_.name(), a); } if (this->max_suppliers_.is_valid()) { CORBA::Any a; a <<= this->max_suppliers_.value(); this->add(this->max_suppliers_.name(), a); } if (this->reject_new_events_.is_valid()) { CORBA::Any a; a <<= CORBA::Any::from_boolean(this->reject_new_events_.value()); this->add(this->reject_new_events_.name(), a); } }
const TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_consumers | ( | void | ) | const |
Definition at line 20 of file AdminProperties.inl.
{ return this->max_consumers_; }
TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_consumers | ( | void | ) |
Definition at line 26 of file AdminProperties.inl.
{ return this->max_consumers_; }
const TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_global_queue_length | ( | void | ) | const |
Definition at line 8 of file AdminProperties.inl.
{ return this->max_global_queue_length_; }
TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_global_queue_length | ( | void | ) |
Definition at line 14 of file AdminProperties.inl.
{ return this->max_global_queue_length_; }
TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_suppliers | ( | void | ) |
Definition at line 38 of file AdminProperties.inl.
{ return this->max_suppliers_; }
const TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_suppliers | ( | void | ) | const |
Definition at line 32 of file AdminProperties.inl.
{ return this->max_suppliers_; }
CORBA::Boolean TAO_Notify_AdminProperties::queue_full | ( | void | ) |
Returns true if Queue is full.
Definition at line 81 of file AdminProperties.cpp.
{ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->global_queue_lock_, 1); if (this->max_global_queue_length () == 0) return 0; else if (this->global_queue_length_ >= this->max_global_queue_length ().value ()) return 1; return 0; }
TAO_Notify_Property_Boolean & TAO_Notify_AdminProperties::reject_new_events | ( | void | ) |
Definition at line 50 of file AdminProperties.inl.
{ return this->reject_new_events_; }
const TAO_Notify_Property_Boolean & TAO_Notify_AdminProperties::reject_new_events | ( | void | ) | const |
Definition at line 44 of file AdminProperties.inl.
{ return this->reject_new_events_; }
TAO_Notify_Atomic_Property_Long & TAO_Notify_AdminProperties::suppliers | ( | void | ) |
Definition at line 80 of file AdminProperties.inl.
{ return this->suppliers_; }
These are used to count the number of consumers and suppliers connected to the system.
Definition at line 120 of file AdminProperties.h.
This is used to count the queue length across all buffers in the Notify Service to enforce the "MaxQueueLength" property.
Definition at line 110 of file AdminProperties.h.
TAO_SYNCH_MUTEX TAO_Notify_AdminProperties::global_queue_lock_ [protected] |
Global queue lock used to serialize access to all queues.
Definition at line 113 of file AdminProperties.h.
TAO_SYNCH_CONDITION TAO_Notify_AdminProperties::global_queue_not_full_ [protected] |
The condition that the queue_length_ is not at max.
Definition at line 116 of file AdminProperties.h.
The maximum number of consumers that can be connected to the channel at any given time.
Definition at line 98 of file AdminProperties.h.
The maximum number of events that will be queued by the channel before the channel begins discarding events or rejecting new events upon receipt of each new event.
Definition at line 94 of file AdminProperties.h.
The maximum number of suppliers that can be connected to the channel at any given time.
Definition at line 102 of file AdminProperties.h.
Reject any new event.
Definition at line 105 of file AdminProperties.h.
Definition at line 121 of file AdminProperties.h.