diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/LoadBalancing')
12 files changed, 63 insertions, 65 deletions
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.cpp index 7dbe9cefca5..af98cb7e372 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.cpp @@ -29,8 +29,8 @@ TAO_LB_LoadBalancer::~TAO_LB_LoadBalancer (void) LoadBalancing::ReplicaProxy_ptr TAO_LB_LoadBalancer::connect (LoadBalancing::ReplicaControl_ptr control, - CORBA::Object_ptr replica, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Object_ptr replica + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::NilControl, LoadBalancing::ReplicaProxy::NilReplica, CORBA::SystemException)) @@ -47,7 +47,7 @@ TAO_LB_LoadBalancer::connect (LoadBalancing::ReplicaControl_ptr control, PortableServer::ServantBase_var proxy_servant = proxy; - proxy->connect (this, control, replica, ACE_TRY_ENV); + proxy->connect (this, control, replica TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (LoadBalancing::ReplicaProxy::_nil ()); if (this->strategy_->insert (proxy) == -1) @@ -56,21 +56,21 @@ TAO_LB_LoadBalancer::connect (LoadBalancing::ReplicaControl_ptr control, LoadBalancing::ReplicaProxy::_nil ()); } - return proxy->_this (ACE_TRY_ENV); + return proxy->_this (TAO_ENV_SINGLE_ARG_PARAMETER); } CORBA::Object_ptr -TAO_LB_LoadBalancer::group_identity (CORBA::Environment &) +TAO_LB_LoadBalancer::group_identity (TAO_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { return CORBA::Object::_duplicate (this->group_identity_.in ()); } void -TAO_LB_LoadBalancer::load_changed (TAO_LB_ReplicaProxy *proxy, - CORBA::Environment &ACE_TRY_ENV) +TAO_LB_LoadBalancer::load_changed (TAO_LB_ReplicaProxy *proxy + TAO_ENV_ARG_DECL) { - this->strategy_->load_changed (proxy, ACE_TRY_ENV); + this->strategy_->load_changed (proxy TAO_ENV_ARG_PARAMETER); } int @@ -84,14 +84,14 @@ TAO_LB_LoadBalancer::init (const char * repository_id, // for a ServantLocator. PortableServer::RequestProcessingPolicy_var request = root_poa->create_request_processing_policy ( - PortableServer::USE_SERVANT_MANAGER, - ACE_TRY_ENV); + PortableServer::USE_SERVANT_MANAGER + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::ServantRetentionPolicy_var retention = root_poa->create_servant_retention_policy ( - PortableServer::NON_RETAIN, - ACE_TRY_ENV); + PortableServer::NON_RETAIN + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Create the PolicyList. @@ -107,28 +107,28 @@ TAO_LB_LoadBalancer::init (const char * repository_id, // Create the child POA with the ServantManager (ReplicaLocator) // above policies. PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_TRY_ENV); + root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; this->poa_ = root_poa->create_POA ("TAO_LB_ReplicaLocator_POA", poa_manager.in (), - policy_list, - ACE_TRY_ENV); + policy_list + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Activate the child POA. - poa_manager->activate (ACE_TRY_ENV); + poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - request->destroy (ACE_TRY_ENV); + request->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - retention->destroy (ACE_TRY_ENV); + retention->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Now set the ReplicaLocator as the child POA's Servant // Manager. - this->poa_->set_servant_manager (&this->locator_, - ACE_TRY_ENV); + this->poa_->set_servant_manager (&this->locator_ + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // @@ What ObjectId should be used? @@ -137,8 +137,8 @@ TAO_LB_LoadBalancer::init (const char * repository_id, this->group_identity_ = this->poa_->create_reference_with_id (oid.in (), - repository_id, - ACE_TRY_ENV); + repository_id + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.h index 1b711b531e6..a410c01cdec 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.h @@ -58,18 +58,18 @@ public: // that should let us keep the average load (and other similar // things) pre-computed. // - void load_changed (TAO_LB_ReplicaProxy *proxy, - CORBA::Environment &ACE_TRY_ENV); + void load_changed (TAO_LB_ReplicaProxy *proxy + TAO_ENV_ARG_DECL); // The load for <proxy> has changed, the LoadBalancer can use this // opportunity to determine if the load on one of the services is // too high. - void disconnect (TAO_LB_ReplicaProxy *proxy, - CORBA::Environment &ACE_TRY_ENV) + void disconnect (TAO_LB_ReplicaProxy *proxy + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Disconnect proxy from the Load Balancer. - CORBA::Object_ptr replica (CORBA::Environment &ACE_TRY_ENV) + CORBA::Object_ptr replica (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Return a reference to the Replica to which client requests should // be redirected next. @@ -77,12 +77,12 @@ public: // = See the descriptions in LoadBalancing.idl virtual LoadBalancing::ReplicaProxy_ptr connect ( LoadBalancing::ReplicaControl_ptr control, - CORBA::Object_ptr replica, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Object_ptr replica + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::NilControl, LoadBalancing::ReplicaProxy::NilReplica, CORBA::SystemException)); - virtual CORBA::Object_ptr group_identity (CORBA::Environment &ACE_TRY_ENV) + virtual CORBA::Object_ptr group_identity (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); private: diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i index 884b8ab95ab..f667e95a552 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancer_i.i @@ -4,8 +4,8 @@ ACE_INLINE void -TAO_LB_LoadBalancer::disconnect (TAO_LB_ReplicaProxy *proxy, - CORBA::Environment &) +TAO_LB_LoadBalancer::disconnect (TAO_LB_ReplicaProxy *proxy + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ Ossama, what is the we cannot raise that exception here! @@ -22,8 +22,8 @@ TAO_LB_LoadBalancer::disconnect (TAO_LB_ReplicaProxy *proxy, ACE_INLINE CORBA::Object_ptr -TAO_LB_LoadBalancer::replica (CORBA::Environment &ACE_TRY_ENV) +TAO_LB_LoadBalancer::replica (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - return this->strategy_->replica (ACE_TRY_ENV); + return this->strategy_->replica (TAO_ENV_SINGLE_ARG_PARAMETER); } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_Strategy.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_Strategy.cpp index a64cf50f4b7..f0b9d4f00f7 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_Strategy.cpp @@ -17,8 +17,8 @@ TAO_LB_LoadBalancing_Strategy::~TAO_LB_LoadBalancing_Strategy (void) } void -TAO_LB_LoadBalancing_Strategy::load_changed (TAO_LB_ReplicaProxy *, - CORBA::Environment &) +TAO_LB_LoadBalancing_Strategy::load_changed (TAO_LB_ReplicaProxy * + TAO_ENV_ARG_DECL_NOT_USED) { } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_Strategy.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_Strategy.h index a13fe85e1e7..946325788d9 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_Strategy.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancing_Strategy.h @@ -47,7 +47,7 @@ public: // @@ The name of the method should be more meaningful, what about: // select_replica(), select_unloaded_replica() or something like // that? - virtual CORBA::Object_ptr replica (CORBA::Environment &ACE_TRY_ENV) + virtual CORBA::Object_ptr replica (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) = 0; // Return the object reference to the Replica to which requests should // be redirected. @@ -59,8 +59,8 @@ public: virtual int remove (TAO_LB_ReplicaProxy *) = 0; // Remove ReplicaProxy servant from the set of replica proxies. - virtual void load_changed (TAO_LB_ReplicaProxy *proxy, - CORBA::Environment &ACE_TRY_ENV); + virtual void load_changed (TAO_LB_ReplicaProxy *proxy + TAO_ENV_ARG_DECL); // The load on one proxy has changed. // @@ Ossama: see my comments on LoadBalancing_i about changing the // signature of this method. diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp index 696af20d676..06d74819fb2 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp @@ -36,7 +36,7 @@ TAO_LB_Minimum_Dispersion_Strategy::~TAO_LB_Minimum_Dispersion_Strategy (void) } CORBA::Object_ptr -TAO_LB_Minimum_Dispersion_Strategy::replica (CORBA::Environment &ACE_TRY_ENV) +TAO_LB_Minimum_Dispersion_Strategy::replica (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { for ( ; ; ) @@ -84,7 +84,7 @@ TAO_LB_Minimum_Dispersion_Strategy::replica (CORBA::Environment &ACE_TRY_ENV) ACE_TRY { CORBA::Boolean non_existent = - object->_non_existent (ACE_TRY_ENV); + object->_non_existent (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (!non_existent) { @@ -129,8 +129,8 @@ TAO_LB_Minimum_Dispersion_Strategy::remove (TAO_LB_ReplicaProxy *proxy) } void -TAO_LB_Minimum_Dispersion_Strategy::load_changed (TAO_LB_ReplicaProxy *proxy, - CORBA::Environment &ACE_TRY_ENV) +TAO_LB_Minimum_Dispersion_Strategy::load_changed (TAO_LB_ReplicaProxy *proxy + TAO_ENV_ARG_DECL) { int send_load_advisory = 0; @@ -185,7 +185,7 @@ TAO_LB_Minimum_Dispersion_Strategy::load_changed (TAO_LB_ReplicaProxy *proxy, // dispersion we tolerate before starting to send advisories. if (send_load_advisory == 2) { - proxy->control_->high_load_advisory (ACE_TRY_ENV); + proxy->control_->high_load_advisory (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; return; // We may not throw an exception, so explicitly return. @@ -199,7 +199,7 @@ TAO_LB_Minimum_Dispersion_Strategy::load_changed (TAO_LB_ReplicaProxy *proxy, // construction time... if (send_load_advisory == 1) { - proxy->control_->nominal_load_advisory (ACE_TRY_ENV); + proxy->control_->nominal_load_advisory (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.h index fcf0b686ae3..df4e679543c 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.h @@ -56,12 +56,12 @@ public: // Destructor // = The TAO_LB_LoadBalancing_Strategy methods - virtual CORBA::Object_ptr replica (CORBA_Environment &ACE_TRY_ENV) + virtual CORBA::Object_ptr replica (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); virtual int insert (TAO_LB_ReplicaProxy *); virtual int remove (TAO_LB_ReplicaProxy *); - virtual void load_changed (TAO_LB_ReplicaProxy *, - CORBA::Environment &ACE_TRY_ENV); + virtual void load_changed (TAO_LB_ReplicaProxy * + TAO_ENV_ARG_DECL); private: TAO_LB_ReplicaProxySet proxies_; diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaLocator.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaLocator.cpp index 03686e655bc..66a03582d03 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaLocator.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaLocator.cpp @@ -23,13 +23,11 @@ TAO_LB_ReplicaLocator::preinvoke ( ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::ForwardRequest)) { - TAO_ENV_ARG_DEFN; - if (this->load_balancer_ == 0) ACE_THROW_RETURN (CORBA::INTERNAL (), 0); CORBA::Object_var replica = - this->load_balancer_->replica (ACE_TRY_ENV); + this->load_balancer_->replica (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); // Throw a forward exception to force the client to redirect its diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp index 8dc15cbde74..bfc9d025ba7 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.cpp @@ -22,8 +22,8 @@ TAO_LB_ReplicaProxy::TAO_LB_ReplicaProxy (void) } void -TAO_LB_ReplicaProxy::current_load (CORBA::Float load, - CORBA::Environment &ACE_TRY_ENV) +TAO_LB_ReplicaProxy::current_load (CORBA::Float load + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // @@ Ossama: this is the point were the load dampening should @@ -35,11 +35,11 @@ TAO_LB_ReplicaProxy::current_load (CORBA::Float load, this->current_load_ = load; // ACE_DEBUG ((LM_DEBUG, "Load[%x] = %f\n", long(this), load)); - this->balancer_->load_changed (this, ACE_TRY_ENV); + this->balancer_->load_changed (this TAO_ENV_ARG_PARAMETER); } void -TAO_LB_ReplicaProxy::disconnect (CORBA::Environment &ACE_TRY_ENV) +TAO_LB_ReplicaProxy::disconnect (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::NotConnected, CORBA::SystemException)) { @@ -49,7 +49,7 @@ TAO_LB_ReplicaProxy::disconnect (CORBA::Environment &ACE_TRY_ENV) if (this->connected_) { - this->balancer_->disconnect (this, ACE_TRY_ENV); + this->balancer_->disconnect (this TAO_ENV_ARG_PARAMETER); ACE_CHECK; this->connected_ = 0; @@ -63,8 +63,8 @@ TAO_LB_ReplicaProxy::disconnect (CORBA::Environment &ACE_TRY_ENV) void TAO_LB_ReplicaProxy::connect (TAO_LB_LoadBalancer *balancer, LoadBalancing::ReplicaControl_ptr control, - CORBA::Object_ptr replica, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Object_ptr replica + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::NilControl, LoadBalancing::ReplicaProxy::NilReplica, CORBA::SystemException)) diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h index a4f60a41a06..9eb629ea29f 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/ReplicaProxy.h @@ -54,8 +54,8 @@ public: CORBA::Object_ptr replica (void); // Return a reference to the Replica. - virtual void current_load (CORBA::Float load, - CORBA::Environment &ACE_TRY_ENV) + virtual void current_load (CORBA::Float load + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Send the value of the current load on the Object being load // balanced, where the definition of "load" is load balancing @@ -69,7 +69,7 @@ public: // without affecting the client, or detect rapid raises in load and // react proactively to those... - virtual void disconnect (CORBA::Environment &ACE_TRY_ENV) + virtual void disconnect (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::NotConnected, CORBA::SystemException)); // Send a request to disconnect from the LoadBalancer. @@ -92,8 +92,8 @@ private: void connect (TAO_LB_LoadBalancer *balancer, LoadBalancing::ReplicaControl_ptr control, - CORBA::Object_ptr replica, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Object_ptr replica + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((LoadBalancing::ReplicaProxy::NilControl, LoadBalancing::ReplicaProxy::NilReplica, CORBA::SystemException)); diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp index 9c0c198c5d0..4da47b060d7 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp @@ -39,7 +39,7 @@ TAO_LB_Round_Robin_Strategy::~TAO_LB_Round_Robin_Strategy (void) } CORBA::Object_ptr -TAO_LB_Round_Robin_Strategy::replica (CORBA::Environment &ACE_TRY_ENV) +TAO_LB_Round_Robin_Strategy::replica (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.h index 523ff488d9e..93887fc6ac0 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.h @@ -60,7 +60,7 @@ public: // Destructor // = The Load_Balancing_Strategy methods - virtual CORBA::Object_ptr replica (CORBA_Environment &ACE_TRY_ENV) + virtual CORBA::Object_ptr replica (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); virtual int insert (TAO_LB_ReplicaProxy *); virtual int remove (TAO_LB_ReplicaProxy *); |