#include <AdminProperties.h>
Inheritance diagram for TAO_Notify_AdminProperties:
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_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_AdminProperties::TAO_Notify_AdminProperties | ( | void | ) |
Constructor.
Definition at line 17 of file AdminProperties.cpp.
00018 : max_global_queue_length_ (CosNotification::MaxQueueLength, 0) 00019 , max_consumers_ (CosNotification::MaxConsumers, 0) 00020 , max_suppliers_ (CosNotification::MaxSuppliers, 0) 00021 , reject_new_events_ (CosNotification::RejectNewEvents, 0) 00022 , global_queue_length_ (0) 00023 , global_queue_not_full_ (global_queue_lock_) 00024 { 00025 }
TAO_Notify_AdminProperties::~TAO_Notify_AdminProperties | ( | ) | [virtual] |
ACE_INLINE TAO_Notify_Atomic_Property_Long & TAO_Notify_AdminProperties::consumers | ( | void | ) |
Definition at line 74 of file AdminProperties.inl.
References consumers_.
Referenced by TAO_Notify_ProxySupplier::connect(), and TAO_Notify_ProxySupplier::disconnect().
00075 { 00076 return this->consumers_; 00077 }
ACE_INLINE CORBA::Long & TAO_Notify_AdminProperties::global_queue_length | ( | void | ) |
Definition at line 56 of file AdminProperties.inl.
References global_queue_length_.
00057 { 00058 return this->global_queue_length_; 00059 }
ACE_INLINE TAO_SYNCH_MUTEX & TAO_Notify_AdminProperties::global_queue_lock | ( | void | ) |
Definition at line 62 of file AdminProperties.inl.
References global_queue_lock_.
00063 { 00064 return this->global_queue_lock_; 00065 }
ACE_INLINE TAO_SYNCH_CONDITION & TAO_Notify_AdminProperties::global_queue_not_full | ( | void | ) |
Definition at line 68 of file AdminProperties.inl.
References global_queue_not_full_.
00069 { 00070 return this->global_queue_not_full_; 00071 }
void TAO_Notify_AdminProperties::init | ( | ) |
finish initialization after values are set by topology load
Definition at line 49 of file AdminProperties.cpp.
References ACE_ASSERT, TAO_Notify_PropertySeq::add(), max_consumers_, max_global_queue_length_, max_suppliers_, and TAO_Notify_PropertyBase_T< TYPE >::value().
00050 { 00051 // This method should only be called once, (during topo load) 00052 ACE_ASSERT(this->size() == 0); 00053 00054 if (this->max_global_queue_length_.is_valid()) 00055 { 00056 CORBA::Any a; 00057 a <<= this->max_global_queue_length_.value(); 00058 this->add(this->max_global_queue_length_.name(), a); 00059 } 00060 if (this->max_consumers_.is_valid()) 00061 { 00062 CORBA::Any a; 00063 a <<= this->max_consumers_.value(); 00064 this->add(this->max_consumers_.name(), a); 00065 } 00066 if (this->max_suppliers_.is_valid()) 00067 { 00068 CORBA::Any a; 00069 a <<= this->max_suppliers_.value(); 00070 this->add(this->max_suppliers_.name(), a); 00071 } 00072 if (this->reject_new_events_.is_valid()) 00073 { 00074 CORBA::Any a; 00075 a <<= CORBA::Any::from_boolean(this->reject_new_events_.value()); 00076 this->add(this->reject_new_events_.name(), a); 00077 } 00078 }
int TAO_Notify_AdminProperties::init | ( | const CosNotification::PropertySeq & | prop_seq | ) |
Init.
Reimplemented from TAO_Notify_PropertySeq.
Definition at line 32 of file AdminProperties.cpp.
References TAO_Notify_PropertySeq::init(), max_consumers_, max_global_queue_length_, max_suppliers_, reject_new_events_, TAO_Notify_Property_Boolean::set(), and TAO_Notify_Property_T< TYPE >::set().
Referenced by TAO_Notify_EventChannel::load_attrs(), and TAO_Notify_EventChannel::set_admin().
00033 { 00034 if (TAO_Notify_PropertySeq::init (prop_seq) != 0) 00035 return -1; 00036 00037 this->max_global_queue_length_.set (*this); 00038 this->max_consumers_.set (*this); 00039 this->max_suppliers_.set (*this); 00040 this->reject_new_events_.set (*this); 00041 00042 //@@ check if unsupported property was set. 00043 // This will happen when number of successfull inits != numbers of items bound in map_. 00044 00045 return 0; 00046 }
ACE_INLINE TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_consumers | ( | void | ) |
Definition at line 26 of file AdminProperties.inl.
References max_consumers_.
00027 { 00028 return this->max_consumers_; 00029 }
ACE_INLINE const TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_consumers | ( | void | ) | const |
Definition at line 20 of file AdminProperties.inl.
References max_consumers_.
Referenced by TAO_Notify_ProxySupplier::connect().
00021 { 00022 return this->max_consumers_; 00023 }
ACE_INLINE TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_global_queue_length | ( | void | ) |
Definition at line 14 of file AdminProperties.inl.
References max_global_queue_length_.
00015 { 00016 return this->max_global_queue_length_; 00017 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE const TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_global_queue_length | ( | void | ) | const |
Definition at line 8 of file AdminProperties.inl.
References max_global_queue_length_.
00009 { 00010 return this->max_global_queue_length_; 00011 }
ACE_INLINE TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_suppliers | ( | void | ) |
Definition at line 38 of file AdminProperties.inl.
References max_suppliers_.
00039 { 00040 return this->max_suppliers_; 00041 }
ACE_INLINE const TAO_Notify_Property_Long & TAO_Notify_AdminProperties::max_suppliers | ( | void | ) | const |
Definition at line 32 of file AdminProperties.inl.
References max_suppliers_.
Referenced by TAO_Notify_ProxyConsumer::connect().
00033 { 00034 return this->max_suppliers_; 00035 }
CORBA::Boolean TAO_Notify_AdminProperties::queue_full | ( | void | ) |
Returns true if Queue is full.
Definition at line 81 of file AdminProperties.cpp.
References ACE_GUARD_RETURN, and TAO_SYNCH_MUTEX.
Referenced by TAO_Notify_ProxyPushConsumer::push(), TAO_Notify_CosEC_ProxyPushConsumer::push(), TAO_Notify_StructuredProxyPushConsumer::push_structured_event(), and TAO_Notify_SequenceProxyPushConsumer::push_structured_events().
00082 { 00083 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->global_queue_lock_, 1); 00084 00085 if (this->max_global_queue_length () == 0) 00086 return 0; 00087 else 00088 if (this->global_queue_length_ >= this->max_global_queue_length ().value ()) 00089 return 1; 00090 00091 return 0; 00092 }
ACE_INLINE TAO_Notify_Property_Boolean & TAO_Notify_AdminProperties::reject_new_events | ( | void | ) |
Definition at line 50 of file AdminProperties.inl.
References reject_new_events_.
00051 { 00052 return this->reject_new_events_; 00053 }
ACE_INLINE const TAO_Notify_Property_Boolean & TAO_Notify_AdminProperties::reject_new_events | ( | void | ) | const |
Definition at line 44 of file AdminProperties.inl.
References reject_new_events_.
00045 { 00046 return this->reject_new_events_; 00047 }
ACE_INLINE TAO_Notify_Atomic_Property_Long & TAO_Notify_AdminProperties::suppliers | ( | void | ) |
Definition at line 80 of file AdminProperties.inl.
References suppliers_.
Referenced by TAO_Notify_ProxyConsumer::connect(), and TAO_Notify_ProxyConsumer::disconnect().
00081 { 00082 return this->suppliers_; 00083 }
These are used to count the number of consumers and suppliers connected to the system.
Definition at line 120 of file AdminProperties.h.
Referenced by consumers().
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.
Referenced by global_queue_length().
Global queue lock used to serialize access to all queues.
Definition at line 113 of file AdminProperties.h.
Referenced by global_queue_lock().
The condition that the queue_length_ is not at max.
Definition at line 116 of file AdminProperties.h.
Referenced by global_queue_not_full().
The maximum number of consumers that can be connected to the channel at any given time.
Definition at line 98 of file AdminProperties.h.
Referenced by init(), and max_consumers().
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.
Referenced by init(), and max_global_queue_length().
The maximum number of suppliers that can be connected to the channel at any given time.
Definition at line 102 of file AdminProperties.h.
Referenced by init(), and max_suppliers().
Reject any new event.
Definition at line 105 of file AdminProperties.h.
Referenced by init(), and reject_new_events().