Public Types | Public Member Functions | Protected Attributes

TAO_Notify_AdminProperties Class Reference

The AdminProperties per EventChannel. More...

#include <AdminProperties.h>

Inheritance diagram for TAO_Notify_AdminProperties:
Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_AdminProperties:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ACE_Strong_Bound_Ptr
< TAO_Notify_AdminProperties,
TAO_SYNCH_MUTEX > 
Ptr

Public Member Functions

 TAO_Notify_AdminProperties (void)
 Constructor.
virtual ~TAO_Notify_AdminProperties ()
 Destructor.
int init (const CosNotification::PropertySeq &prop_seq)
 Init.
void init ()
 finish initialization after values are set by topology load
const TAO_Notify_Property_Longmax_global_queue_length (void) const
const TAO_Notify_Property_Longmax_consumers (void) const
const TAO_Notify_Property_Longmax_suppliers (void) const
const TAO_Notify_Property_Booleanreject_new_events (void) const
TAO_Notify_Property_Longmax_global_queue_length (void)
TAO_Notify_Property_Longmax_consumers (void)
TAO_Notify_Property_Longmax_suppliers (void)
TAO_Notify_Property_Booleanreject_new_events (void)
CORBA::Longglobal_queue_length (void)
TAO_SYNCH_MUTEX & global_queue_lock (void)
TAO_SYNCH_CONDITION & global_queue_not_full (void)
TAO_Notify_Atomic_Property_Longconsumers (void)
TAO_Notify_Atomic_Property_Longsuppliers (void)
CORBA::Boolean queue_full (void)
 Returns true if Queue is full.

Protected Attributes

TAO_Notify_Property_Long max_global_queue_length_
TAO_Notify_Property_Long max_consumers_
TAO_Notify_Property_Long max_suppliers_
TAO_Notify_Property_Boolean reject_new_events_
 Reject any new event.
CORBA::Long global_queue_length_
TAO_SYNCH_MUTEX global_queue_lock_
 Global queue lock used to serialize access to all queues.
TAO_SYNCH_CONDITION global_queue_not_full_
 The condition that the queue_length_ is not at max.
TAO_Notify_Atomic_Property_Long consumers_
TAO_Notify_Atomic_Property_Long suppliers_

Detailed Description

The AdminProperties per EventChannel.

Definition at line 42 of file AdminProperties.h.


Member Typedef Documentation

Definition at line 46 of file AdminProperties.h.


Constructor & Destructor Documentation

TAO_Notify_AdminProperties::TAO_Notify_AdminProperties ( void   ) 
TAO_Notify_AdminProperties::~TAO_Notify_AdminProperties (  )  [virtual]

Destructor.

Definition at line 27 of file AdminProperties.cpp.

{
}


Member Function Documentation

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_;
}


Member Data Documentation

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.

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines