diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-04 00:34:22 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-04 00:34:22 +0000 |
commit | b95f9ec14f3b646c2a73250aeb103ee69b4128fa (patch) | |
tree | ab50e40e9262b532976506d49cdf5e66435a3654 /TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h | |
parent | 35bca0cfbdf77d1df281719b4e1d968f3471c0a5 (diff) | |
download | ATCD-b95f9ec14f3b646c2a73250aeb103ee69b4128fa.tar.gz |
ChangeLogTag:Wed Mar 3 18:28:51 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h | 87 |
1 files changed, 25 insertions, 62 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h index 14ddaa8a074..4b04d79581c 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ConsumerAdmin.h @@ -23,7 +23,6 @@ // http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz // http://www.cs.wustl.edu/~schmidt/JSAC-98.ps.gz // -// // ============================================================================ #ifndef TAO_EC_CONSUMERADMIN_H @@ -36,14 +35,11 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "orbsvcs/RtecEventChannelAdminS.h" -#include "orbsvcs/Event/EC_Busy_Lock.h" -#include "orbsvcs/Event/EC_Filter.h" +#include "EC_ProxyPushSupplier_Set.h" class TAO_EC_Event_Channel; class TAO_EC_ProxyPushSupplier; class TAO_EC_ProxyPushConsumer; -template<class Target,class Object> class TAO_EC_Connected_Command; -template<class Target,class Object> class TAO_EC_Disconnected_Command; class TAO_EC_ConsumerAdmin : public POA_RtecEventChannelAdmin::ConsumerAdmin { @@ -55,7 +51,9 @@ class TAO_EC_ConsumerAdmin : public POA_RtecEventChannelAdmin::ConsumerAdmin // ProxyPushSupplier objects. // // = MEMORY MANAGMENT - // It does not assume ownership of the TAO_EC_Event_Channel object + // It does not assume ownership of the TAO_EC_Event_Channel + // object; but it *does* assume ownership of the + // TAO_EC_ProxyPushSupplier_Set object. // // = LOCKING // No provisions for locking, access must be serialized @@ -64,30 +62,31 @@ class TAO_EC_ConsumerAdmin : public POA_RtecEventChannelAdmin::ConsumerAdmin // = TODO // public: - TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel* event_channel); - // constructor... + TAO_EC_ConsumerAdmin (TAO_EC_Event_Channel* event_channel, + TAO_EC_ProxyPushSupplier_Set* supplier_set = 0); + // constructor. If <supplier_set> is nil then it builds one using + // the <event_channel> argument. + // In any case it assumes ownership. virtual ~TAO_EC_ConsumerAdmin (void); // destructor... - typedef ACE_Unbounded_Set<TAO_EC_ProxyPushSupplier*> SupplierSet; - typedef ACE_Unbounded_Set_Iterator<TAO_EC_ProxyPushSupplier*> SupplierSetIterator; - - virtual int busy (void) = 0; - virtual int idle (void) = 0; - // Before using the iterators the clients should invoke this - // methods, that ensures that no changes to the underlying data - // structure will occur. - - void busy_hwm (CORBA::ULong hwm); - CORBA::ULong busy_hwm (void) const; - // This attribute is used to control the maximum number of threads - // that can be running on the + typedef TAO_EC_ProxyPushSupplier_Set::SupplierSet SupplierSet; + typedef TAO_EC_ProxyPushSupplier_Set::SupplierSetIterator SupplierSetIterator; SupplierSetIterator begin (void); SupplierSetIterator end (void); // Iterators over the set of ProxyPushSuppliers + typedef TAO_EC_ProxyPushSupplier_Set::Busy_Lock Busy_Lock; + Busy_Lock& busy_lock (void); + + void busy_hwm (CORBA::ULong hwm); + CORBA::ULong busy_hwm (void) const; + void max_write_delay (CORBA::ULong hwm); + CORBA::ULong max_write_delay (void) const; + // Delegate on the EC_ProxyPushSupplier.... + void set_default_POA (PortableServer::POA_ptr poa); // Set this servant's default POA @@ -102,9 +101,9 @@ public: // disconnected from it. virtual void connected (TAO_EC_ProxyPushSupplier*, - CORBA::Environment&) = 0; + CORBA::Environment&); virtual void disconnected (TAO_EC_ProxyPushSupplier*, - CORBA::Environment&) = 0; + CORBA::Environment&); // Used to inform the EC that a Supplier has connected or // disconnected from it. @@ -112,51 +111,15 @@ public: virtual RtecEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier (CORBA::Environment &); - typedef TAO_EC_Busy_Lock_Adapter<TAO_EC_ConsumerAdmin> Busy_Lock; - Busy_Lock& busy_lock (void); - // This object is an adapter to the busy/idle protocol. - -protected: - virtual void connected_i (TAO_EC_ProxyPushSupplier* supplier, - CORBA::Environment &env); - // The implementation of connected(), without locking. - // It does not increase the reference count on the supplier - - virtual void disconnected_i (TAO_EC_ProxyPushSupplier* supplier, - CORBA::Environment &env); - // The implementation of disconnected(), without locking. - // It decreases the reference count on the supplier if the operation - // is successful. - - typedef TAO_EC_Connected_Command<TAO_EC_ConsumerAdmin,TAO_EC_ProxyPushSupplier> Connected_Command; - typedef TAO_EC_Connected_Command<TAO_EC_ConsumerAdmin,TAO_EC_ProxyPushSupplier> Disconnected_Command; - - friend class TAO_EC_Connected_Command<TAO_EC_ConsumerAdmin,TAO_EC_ProxyPushSupplier>; - friend class TAO_EC_Disconnected_Command<TAO_EC_ConsumerAdmin,TAO_EC_ProxyPushSupplier>; - // This two classes call the connected_i() and disconnected_i() - // methods, that's ok because they do while this class is holding - // its lock. - - virtual void execute_delayed_operations (void); - // Dervied classes that implement delayed disconnects and connects - // must override this method. - - SupplierSet all_suppliers_; - // The set of all the ProxyPushSupplier objects bound to this - // ConsumerAdmin. - - TAO_EC_Busy_Lock_Adapter<TAO_EC_ConsumerAdmin> busy_lock_; - // The busy lock object - private: TAO_EC_Event_Channel *event_channel_; // The Event Channel we belong to + TAO_EC_ProxyPushSupplier_Set* supplier_set_; + // The implementation for the supplier set container. + PortableServer::POA_var default_POA_; // Store the default POA. - - CORBA::ULong busy_hwm_; - // How many threads can simultaneously iterate over the set. }; #if defined (__ACE_INLINE__) |