summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/AdminProperties.cpp
diff options
context:
space:
mode:
authorpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-10-27 06:12:33 +0000
committerpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-10-27 06:12:33 +0000
commit8e1a1b526f8328bb95a7391c7a91f758f17424d6 (patch)
treea41933d575c62d7a0065ee6cf2cf860b6cfd9c4e /TAO/orbsvcs/orbsvcs/Notify/AdminProperties.cpp
parent5abe58867a946df8662a9ebc3946881dc14e012f (diff)
downloadATCD-8e1a1b526f8328bb95a7391c7a91f758f17424d6.tar.gz
ChangeLogTag:Sun Oct 27 01:04:09 2002 Pradeep Gore <pradeep@oomworks.com>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/AdminProperties.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/AdminProperties.cpp66
1 files changed, 66 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/AdminProperties.cpp b/TAO/orbsvcs/orbsvcs/Notify/AdminProperties.cpp
new file mode 100644
index 00000000000..0320fccfb30
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/AdminProperties.cpp
@@ -0,0 +1,66 @@
+// $Id$
+
+#include "AdminProperties.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "AdminProperties.inl"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(Notify, TAO_NS_AdminProperties, "$id$")
+
+#include "orbsvcs/CosNotificationC.h"
+
+TAO_NS_AdminProperties::TAO_NS_AdminProperties (void)
+ : max_queue_length_ (CosNotification::MaxQueueLength, 0),
+ max_consumers_ (CosNotification::MaxSuppliers, 0),
+ max_suppliers_ (CosNotification::MaxConsumers, 0),
+ reject_new_events_ (CosNotification::RejectNewEvents, 0)
+{
+}
+
+TAO_NS_AdminProperties::~TAO_NS_AdminProperties ()
+{
+}
+
+int
+TAO_NS_AdminProperties::init (const CosNotification::PropertySeq& prop_seq)
+{
+ if (TAO_NS_PropertySeq::init (prop_seq) != 0)
+ return -1;
+
+ this->max_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;
+}
+
+CORBA::Boolean
+TAO_NS_AdminProperties::queue_full (void)
+{
+ if (this->max_queue_length () == 0)
+ return 0;
+ else
+ if (this->queue_length ().value () > this->max_queue_length ().value ())
+ return 1;
+
+ return 0;
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Atomic_Op<TAO_SYNCH_MUTEX,int>;
+template class ACE_Atomic_Op_Ex<TAO_SYNCH_MUTEX,int>;
+template class TAO_Notify_Signal_Property<TAO_SYNCH_MUTEX,int>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Atomic_Op<TAO_SYNCH_MUTEX,int>
+#pragma instantiate ACE_Atomic_Op_Ex<TAO_SYNCH_MUTEX,int>
+#pragma instantiate TAO_Notify_Signal_Property<TAO_SYNCH_MUTEX,int>
+
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */