diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-12-08 21:59:30 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-12-08 21:59:30 +0000 |
commit | b11770b30f8b58d20fe2d61846bfa3fc5354ee7e (patch) | |
tree | 6939cf1ed0a80ce8a3224d33f3d23c0e1b9a517f /TAO/orbsvcs/tests/LoadBalancing | |
parent | 8fd5b8293423d91c699711bce0f3551cb8c20a69 (diff) | |
download | ATCD-b11770b30f8b58d20fe2d61846bfa3fc5354ee7e.tar.gz |
Merged corba-env-clean branch.
Diffstat (limited to 'TAO/orbsvcs/tests/LoadBalancing')
-rw-r--r-- | TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.cpp | 28 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.h | 10 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.h | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/LoadBalancing/client.cpp | 24 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/LoadBalancing/server.cpp | 34 |
6 files changed, 53 insertions, 53 deletions
diff --git a/TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.cpp b/TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.cpp index 22c9c9361c3..7f641e692a6 100644 --- a/TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.cpp +++ b/TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.cpp @@ -17,8 +17,8 @@ Hash_ReplicaControl::Hash_ReplicaControl (void) void Hash_ReplicaControl::init (CORBA::ORB_ptr orb, - LoadBalancing::LoadBalancer_ptr balancer, - CORBA::Environment &ACE_TRY_ENV) + LoadBalancing::LoadBalancer_ptr balancer + TAO_ENV_ARG_DECL) { ACE_DEBUG ((LM_DEBUG, "Hash_ReplicaControl::init\n")); @@ -28,21 +28,21 @@ Hash_ReplicaControl::init (CORBA::ORB_ptr orb, reactor->schedule_timer (&this->adapter_, 0, interval, restart); LoadBalancing::ReplicaControl_var control = - this->_this (ACE_TRY_ENV); + this->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; CORBA::Object_var replica = - this->replica_._this (ACE_TRY_ENV); + this->replica_._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->group_ = - balancer->group_identity (ACE_TRY_ENV); + balancer->group_identity (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->proxy_ = balancer->connect (control.in (), - replica.in (), - ACE_TRY_ENV); + replica.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } @@ -66,8 +66,8 @@ Hash_ReplicaControl::handle_timeout (const ACE_Time_Value &, ACE_TRY_NEW_ENV { - this->proxy_->current_load (this->current_load_, - ACE_TRY_ENV); + this->proxy_->current_load (this->current_load_ + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Current_Load = %f\n", this->current_load_)); } @@ -86,7 +86,7 @@ Hash_ReplicaControl::request_received (void) void -Hash_ReplicaControl::request_rejected (CORBA::Environment &ACE_TRY_ENV) +Hash_ReplicaControl::request_rejected (TAO_ENV_SINGLE_ARG_DECL) { // @@ Ossama: notice how we reject a single request. Maybe the // advisory should include how many are we supposed to shed? @@ -97,8 +97,8 @@ Hash_ReplicaControl::request_rejected (CORBA::Environment &ACE_TRY_ENV) } void -Hash_ReplicaControl::high_load_advisory (CORBA::Environment & - /* ACE_TRY_ENV */) +Hash_ReplicaControl::high_load_advisory (TAO_ENV_SINGLE_ARG_DECL_NOT_USED + /* TAO_ENV_SINGLE_ARG_PARAMETER */) ACE_THROW_SPEC ((CORBA::SystemException)) { // Notify the replica that it should reject all requests. @@ -107,8 +107,8 @@ Hash_ReplicaControl::high_load_advisory (CORBA::Environment & } void -Hash_ReplicaControl::nominal_load_advisory (CORBA::Environment & - /* ACE_TRY_ENV */) +Hash_ReplicaControl::nominal_load_advisory (TAO_ENV_SINGLE_ARG_DECL_NOT_USED + /* TAO_ENV_SINGLE_ARG_PARAMETER */) ACE_THROW_SPEC ((CORBA::SystemException)) { // Notify the replica that it should once again accept requests. diff --git a/TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.h b/TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.h index 912e5e550f6..bda5d30bf60 100644 --- a/TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.h +++ b/TAO/orbsvcs/tests/LoadBalancing/Hash_ReplicaControl.h @@ -34,8 +34,8 @@ public: // Constructor. void init (CORBA::ORB_ptr the_orb, - LoadBalancing::LoadBalancer_ptr balancer, - CORBA::Environment &ACE_TRY_ENV); + LoadBalancing::LoadBalancer_ptr balancer + TAO_ENV_ARG_DECL); int handle_timeout (const ACE_Time_Value ¤t_time, const void *arg); @@ -44,13 +44,13 @@ public: void request_received (void); // A request has been received - void request_rejected (CORBA::Environment &ACE_TRY_ENV); + void request_rejected (TAO_ENV_SINGLE_ARG_DECL); // A request has been rejected, take appropriate action - virtual void high_load_advisory (CORBA::Environment &ACE_TRY_ENV) + virtual void high_load_advisory (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void nominal_load_advisory (CORBA::Environment &ACE_TRY_ENV) + virtual void nominal_load_advisory (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); CORBA::Object_ptr replica (void); diff --git a/TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.cpp b/TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.cpp index ecc7970f126..57a4af6f05c 100644 --- a/TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.cpp +++ b/TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.cpp @@ -14,13 +14,13 @@ Hash_Replica_Impl::Hash_Replica_Impl (Hash_ReplicaControl *control) } CORBA::ULong -Hash_Replica_Impl::do_hash (const char *str, - CORBA::Environment &ACE_TRY_ENV) +Hash_Replica_Impl::do_hash (const char *str + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { if (this->reject_requests_) { - this->control_->request_rejected (ACE_TRY_ENV); + this->control_->request_rejected (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); return 0; } diff --git a/TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.h b/TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.h index fd7dff9fc35..7fec1f0db51 100644 --- a/TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.h +++ b/TAO/orbsvcs/tests/LoadBalancing/Hash_Replica_i.h @@ -27,8 +27,8 @@ public: Hash_Replica_Impl (Hash_ReplicaControl *control); // Constructor - virtual CORBA::ULong do_hash (const char * str, - CORBA::Environment &ACE_TRY_ENV) + virtual CORBA::ULong do_hash (const char * str + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Perform a simple hashing operation on the input string <str> and // return the hashed string <hash_str>. diff --git a/TAO/orbsvcs/tests/LoadBalancing/client.cpp b/TAO/orbsvcs/tests/LoadBalancing/client.cpp index d4c936ef07c..38cde7ddf4c 100644 --- a/TAO/orbsvcs/tests/LoadBalancing/client.cpp +++ b/TAO/orbsvcs/tests/LoadBalancing/client.cpp @@ -11,18 +11,18 @@ static void run_test (int iterations, int timeout, - Hash_Replica_ptr hasher, - CORBA::Environment &ACE_TRY_ENV); + Hash_Replica_ptr hasher + TAO_ENV_ARG_DECL); int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize ORB. CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; const char *ior = "file://test.ior"; @@ -61,12 +61,12 @@ main (int argc, char *argv[]) } CORBA::Object_var obj = - orb->string_to_object (ior, ACE_TRY_ENV); + orb->string_to_object (ior TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; Hash_Replica_var hasher = - Hash_Replica::_unchecked_narrow (obj.in (), - ACE_TRY_ENV); + Hash_Replica::_unchecked_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (hasher.in ())) @@ -74,10 +74,10 @@ main (int argc, char *argv[]) ACE_TEXT ("Invalid replica IOR.\n")), -1); - run_test (iterations, timeout, hasher.in (), ACE_TRY_ENV); + run_test (iterations, timeout, hasher.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -92,8 +92,8 @@ main (int argc, char *argv[]) void run_test (int iterations, int timeout, - Hash_Replica_ptr hasher, - CORBA::Environment &ACE_TRY_ENV) + Hash_Replica_ptr hasher + TAO_ENV_ARG_DECL) { ACE_Time_Value tv (0, timeout * 1000); ACE_Throughput_Stats stats; @@ -103,7 +103,7 @@ run_test (int iterations, { ACE_UINT64 call_start = ACE_OS::gethrtime (); - hasher->do_hash ("This is a silly test", ACE_TRY_ENV); + hasher->do_hash ("This is a silly test" TAO_ENV_ARG_PARAMETER); ACE_CHECK; ACE_UINT64 end = ACE_OS::gethrtime (); diff --git a/TAO/orbsvcs/tests/LoadBalancing/server.cpp b/TAO/orbsvcs/tests/LoadBalancing/server.cpp index 1526a5e1343..45087ff4c62 100644 --- a/TAO/orbsvcs/tests/LoadBalancing/server.cpp +++ b/TAO/orbsvcs/tests/LoadBalancing/server.cpp @@ -9,12 +9,12 @@ int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize ORB. CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; const char *balancer_ior = "file://test.ior"; @@ -43,7 +43,7 @@ main (int argc, char *argv[]) } CORBA::Object_var poa_object = - orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (poa_object.in ())) @@ -52,23 +52,23 @@ main (int argc, char *argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (poa_object.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_TRY_ENV); + root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - poa_manager->activate (ACE_TRY_ENV); + poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj = - orb->string_to_object (balancer_ior, ACE_TRY_ENV); + orb->string_to_object (balancer_ior TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; LoadBalancing::LoadBalancer_var load_balancer = - LoadBalancing::LoadBalancer::_narrow (obj.in (), - ACE_TRY_ENV); + LoadBalancing::LoadBalancer::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (load_balancer.in ())) @@ -77,11 +77,11 @@ main (int argc, char *argv[]) -1); CORBA::Object_var group = - load_balancer->group_identity (ACE_TRY_ENV); + load_balancer->group_identity (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::String_var str = - orb->object_to_string (group.in (), ACE_TRY_ENV); + orb->object_to_string (group.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; FILE *ior = ACE_OS::fopen (ior_output, "w"); @@ -90,27 +90,27 @@ main (int argc, char *argv[]) Hash_ReplicaControl control; control.init (orb.in (), - load_balancer.in (), - ACE_TRY_ENV); + load_balancer.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; #ifndef ACE_WIN32 - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; #else while (1) { ACE_Time_Value tv (1, 0); - orb->run (tv, ACE_TRY_ENV); + orb->run (tv TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; control.handle_timeout (tv, 0); } #endif - root_poa->destroy (1, 1, ACE_TRY_ENV); + root_poa->destroy (1, 1 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY |