diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-06-15 17:53:07 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-06-15 17:53:07 +0000 |
commit | e8a2cda1978375db57a21de0e0696561dabd1966 (patch) | |
tree | 06022b19e8e340bdfc41612df6a2c776e5efe827 | |
parent | 3b6972ef3ebab19df4796beded53fb56b467c53f (diff) | |
download | ATCD-e8a2cda1978375db57a21de0e0696561dabd1966.tar.gz |
*** empty log message ***
14 files changed, 142 insertions, 152 deletions
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp b/TAO/orbsvcs/orbsvcs/LB_Minimum_Dispersion.cpp index 3c2cf672211..3b90fbf127d 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.cpp +++ b/TAO/orbsvcs/orbsvcs/LB_Minimum_Dispersion.cpp @@ -1,12 +1,10 @@ // -*- C++ -*- -// $Id$ - -#include "Minimum_Dispersion.h" +#include "LB_Minimum_Dispersion.h" #include "ReplicaProxy.h" ACE_RCSID (LoadBalancing, - Minimum_Dispersion, + LB_Minimum_Dispersion, "$Id$") diff --git a/TAO/orbsvcs/orbsvcs/Minimum_Dispersion.h b/TAO/orbsvcs/orbsvcs/LB_Minimum_Dispersion.h index fcf0b686ae3..66182c259c7 100644 --- a/TAO/orbsvcs/orbsvcs/Minimum_Dispersion.h +++ b/TAO/orbsvcs/orbsvcs/LB_Minimum_Dispersion.h @@ -1,34 +1,31 @@ // -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO_LoadBalancing -// -// = FILENAME -// Minimum_Dispersion_Strategy.h -// -// = AUTHOR -// Carlos O'Ryan <coryan@uci.edu> -// -// ============================================================================ - -#ifndef MINIMUM_DISPERSION_H -#define MINIMUM_DISPERSION_H +//============================================================================= +/** + * @file Minimum_Dispersion_Strategy.h + * + * $Id$ + * + * @author Carlos O'Ryan <coryan@uci.edu> + */ +//============================================================================= + + +#ifndef LB_MINIMUM_DISPERSION_H +#define LB_MINIMUM_DISPERSION_H #include "ace/pre.h" -#include "LoadBalancing_Strategy.h" -#include "orbsvcs/LoadBalancingS.h" -#include "ace/Containers.h" -#include "ace/Synch.h" +#include "LB_Balancing_Strategy.h" # if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once # endif /* ACE_LACKS_PRAGMA_ONCE */ +#include "orbsvcs/LoadBalancingS.h" +#include "ace/Containers.h" +#include "ace/Synch.h" + // @@ Ossama: my class names suck too, any idea on what would be a // good name for this strategy? It basically tries to keep all the // loads "close to the average", if one server is much higher than @@ -40,20 +37,21 @@ class TAO_LB_ReplicaProxy; typedef ACE_Unbounded_Set<TAO_LB_ReplicaProxy *> TAO_LB_ReplicaProxySet; typedef ACE_Unbounded_Set_Iterator<TAO_LB_ReplicaProxy *> TAO_LB_ReplicaProxySetIterator; -class TAO_LoadBalancing_Export TAO_LB_Minimum_Dispersion_Strategy : public TAO_LB_LoadBalancing_Strategy +/** + * @class TAO_LB_Minimum_Dispersion_Strategy + * + * @brief Minimum Dispersion load balancing strategy + */ +class TAO_LoadBalancing_Export TAO_LB_Minimum_Dispersion_Strategy + : public TAO_LB_LoadBalancing_Strategy { - // = TITLE - // Minimum Dispersion load balancing strategy - - // = DESCRIPTION - // - public: + + /// Constructor. TAO_LB_Minimum_Dispersion_Strategy (void); - // Constructor. + /// Destructor ~TAO_LB_Minimum_Dispersion_Strategy (void); - // Destructor // = The TAO_LB_LoadBalancing_Strategy methods virtual CORBA::Object_ptr replica (CORBA_Environment &ACE_TRY_ENV) @@ -64,14 +62,16 @@ public: CORBA::Environment &ACE_TRY_ENV); private: + + /// Set containing the ReplicaProxy servants. TAO_LB_ReplicaProxySet proxies_; - // Set containing the ReplicaProxy servants. + /// Lock used to ensure atomic access to state retained by this + /// class. TAO_SYNCH_MUTEX lock_; - // Lock used to ensure atomic access to state retained by this - // class. + }; #include "ace/post.h" -#endif /* MINIMUM_DISPERSION_H */ +#endif /* LB_MINIMUM_DISPERSION_H */ diff --git a/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor.cpp index 99604af4fa7..de5f397c1e5 100644 --- a/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor.cpp +++ b/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor.cpp @@ -43,7 +43,7 @@ TAO_LB_RPMS_Monitor::current_load (CORBA::Environment &ACE_TRY_ENV) // maximize throughput in a multithreaded server replica by // preventing two allocations from being added to the critical path // of the client request. - // + // // This optimization won't make a difference on single-threaded // server replicas. diff --git a/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor_Interceptor.h b/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor_Interceptor.h index cb0a7ccb247..d0658c73e7e 100644 --- a/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor_Interceptor.h +++ b/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor_Interceptor.h @@ -122,7 +122,7 @@ public: /// This template is actually instantiated in /// `tao/Object_Ref_Table.cpp'. - typedef ACE_Hash_Map_Manager_Ex<const char *, CORBA::Object_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> Table; + typedef ACE_Hash_Map_Manager_Ex<const char *, CORBA::Object_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> Table; private: @@ -145,7 +145,7 @@ private: LoadBalancing::ReplicationManager_var lb_; - + }; diff --git a/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor_Interceptor.inl b/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor_Interceptor.inl index 4cd431f4f15..21309dccfb0 100644 --- a/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor_Interceptor.inl +++ b/TAO/orbsvcs/orbsvcs/LB_RPMS_Monitor_Interceptor.inl @@ -13,7 +13,7 @@ TAO_LB_RPMS_Monitor_Interceptor::current_load (void) const CORBA::Float load = ACE_static_cast (CORBA::Float, this->request_count_) / elapsed_time.msec (); - + this->request_count_ = 0; this->interval_start_ = ACE_OS::gettimeofday (); diff --git a/TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.cpp b/TAO/orbsvcs/orbsvcs/LB_Round_Robin_Strategy.cpp index d7bdf95d580..904e43bd080 100644 --- a/TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/LB_Round_Robin_Strategy.cpp @@ -1,13 +1,10 @@ // -*- C++ -*- -// $Id$ - - -#include "Round_Robin_Strategy.h" +#include "LB_Round_Robin_Strategy.h" #include "ReplicaProxy.h" ACE_RCSID (LoadBalancing, - Round_Robin_Strategy, + LB_Round_Robin_Strategy, "$Id$") diff --git a/TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.h b/TAO/orbsvcs/orbsvcs/LB_Round_Robin_Strategy.h index 523ff488d9e..cefe3a6a5c1 100644 --- a/TAO/orbsvcs/orbsvcs/Round_Robin_Strategy.h +++ b/TAO/orbsvcs/orbsvcs/LB_Round_Robin_Strategy.h @@ -1,34 +1,30 @@ // -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO_LoadBalancing -// -// = FILENAME -// Round_Robin_Strategy.h -// -// = AUTHOR -// Ossama Othman <ossama@uci.edu> -// -// ============================================================================ - -#ifndef ROUND_ROBIN_STRATEGY_H -#define ROUND_ROBIN_STRATEGY_H +//============================================================================= +/** + * @file LB_Round_Robin_Strategy.h + * + * $Id$ + * + * @author Ossama Othman <ossama@uci.edu> + */ +//============================================================================= + + +#ifndef LB_ROUND_ROBIN_STRATEGY_H +#define LB_ROUND_ROBIN_STRATEGY_H #include "ace/pre.h" -#include "LoadBalancing_Strategy.h" -#include "orbsvcs/LoadBalancingS.h" -#include "ace/Containers.h" -#include "ace/Synch.h" +#include "LB_Balancing_Strategy.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +#include "orbsvcs/LoadBalancingS.h" +#include "ace/Synch.h" + // Forward declarations class TAO_LB_ReplicaProxy; @@ -42,10 +38,14 @@ class TAO_LB_ReplicaProxy; typedef ACE_Unbounded_Set<TAO_LB_ReplicaProxy *> TAO_LB_ReplicaProxySet; typedef ACE_Unbounded_Set_Iterator<TAO_LB_ReplicaProxy *> TAO_LB_ReplicaProxySetIterator; -class TAO_LoadBalancing_Export TAO_LB_Round_Robin_Strategy : public TAO_LB_LoadBalancing_Strategy +/** + * @class TAO_LB_Round_Robin_Strategy + * + * @brief Round Robin load balancing strategy + */ +class TAO_LoadBalancing_Export TAO_LB_Round_Robin_Strategy + : public TAO_LB_Balancing_Strategy { - // = TITLE - // Round Robin load balancing strategy // = DESCRIPTION // Simple load balancing strategy that causes requests to be @@ -53,11 +53,11 @@ class TAO_LoadBalancing_Export TAO_LB_Round_Robin_Strategy : public TAO_LB_LoadB // fashion. public: + /// Constructor. TAO_LB_Round_Robin_Strategy (void); - // Constructor. + /// Destructor ~TAO_LB_Round_Robin_Strategy (void); - // Destructor // = The Load_Balancing_Strategy methods virtual CORBA::Object_ptr replica (CORBA_Environment &ACE_TRY_ENV) @@ -66,15 +66,15 @@ public: virtual int remove (TAO_LB_ReplicaProxy *); private: + /// Set containing the ReplicaProxy servants. TAO_LB_ReplicaProxySet proxies_; - // Set containing the ReplicaProxy servants. ACE_Unbounded_Set_Iterator<TAO_LB_ReplicaProxy *> next_replica_; + /// Lock used to ensure access to state within this class is atomic. TAO_SYNCH_MUTEX lock_; - // Lock used to ensure access to state within this class is atomic. }; #include "ace/post.h" -#endif /* ROUND_ROBIN_STRATEGY_H */ +#endif /* LB_ROUND_ROBIN_STRATEGY_H */ diff --git a/TAO/orbsvcs/orbsvcs/Minimum_Dispersion.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Minimum_Dispersion.cpp index 3c2cf672211..3b90fbf127d 100644 --- a/TAO/orbsvcs/orbsvcs/Minimum_Dispersion.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Minimum_Dispersion.cpp @@ -1,12 +1,10 @@ // -*- C++ -*- -// $Id$ - -#include "Minimum_Dispersion.h" +#include "LB_Minimum_Dispersion.h" #include "ReplicaProxy.h" ACE_RCSID (LoadBalancing, - Minimum_Dispersion, + LB_Minimum_Dispersion, "$Id$") diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Minimum_Dispersion.h index fcf0b686ae3..66182c259c7 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Minimum_Dispersion.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Minimum_Dispersion.h @@ -1,34 +1,31 @@ // -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO_LoadBalancing -// -// = FILENAME -// Minimum_Dispersion_Strategy.h -// -// = AUTHOR -// Carlos O'Ryan <coryan@uci.edu> -// -// ============================================================================ - -#ifndef MINIMUM_DISPERSION_H -#define MINIMUM_DISPERSION_H +//============================================================================= +/** + * @file Minimum_Dispersion_Strategy.h + * + * $Id$ + * + * @author Carlos O'Ryan <coryan@uci.edu> + */ +//============================================================================= + + +#ifndef LB_MINIMUM_DISPERSION_H +#define LB_MINIMUM_DISPERSION_H #include "ace/pre.h" -#include "LoadBalancing_Strategy.h" -#include "orbsvcs/LoadBalancingS.h" -#include "ace/Containers.h" -#include "ace/Synch.h" +#include "LB_Balancing_Strategy.h" # if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once # endif /* ACE_LACKS_PRAGMA_ONCE */ +#include "orbsvcs/LoadBalancingS.h" +#include "ace/Containers.h" +#include "ace/Synch.h" + // @@ Ossama: my class names suck too, any idea on what would be a // good name for this strategy? It basically tries to keep all the // loads "close to the average", if one server is much higher than @@ -40,20 +37,21 @@ class TAO_LB_ReplicaProxy; typedef ACE_Unbounded_Set<TAO_LB_ReplicaProxy *> TAO_LB_ReplicaProxySet; typedef ACE_Unbounded_Set_Iterator<TAO_LB_ReplicaProxy *> TAO_LB_ReplicaProxySetIterator; -class TAO_LoadBalancing_Export TAO_LB_Minimum_Dispersion_Strategy : public TAO_LB_LoadBalancing_Strategy +/** + * @class TAO_LB_Minimum_Dispersion_Strategy + * + * @brief Minimum Dispersion load balancing strategy + */ +class TAO_LoadBalancing_Export TAO_LB_Minimum_Dispersion_Strategy + : public TAO_LB_LoadBalancing_Strategy { - // = TITLE - // Minimum Dispersion load balancing strategy - - // = DESCRIPTION - // - public: + + /// Constructor. TAO_LB_Minimum_Dispersion_Strategy (void); - // Constructor. + /// Destructor ~TAO_LB_Minimum_Dispersion_Strategy (void); - // Destructor // = The TAO_LB_LoadBalancing_Strategy methods virtual CORBA::Object_ptr replica (CORBA_Environment &ACE_TRY_ENV) @@ -64,14 +62,16 @@ public: CORBA::Environment &ACE_TRY_ENV); private: + + /// Set containing the ReplicaProxy servants. TAO_LB_ReplicaProxySet proxies_; - // Set containing the ReplicaProxy servants. + /// Lock used to ensure atomic access to state retained by this + /// class. TAO_SYNCH_MUTEX lock_; - // Lock used to ensure atomic access to state retained by this - // class. + }; #include "ace/post.h" -#endif /* MINIMUM_DISPERSION_H */ +#endif /* LB_MINIMUM_DISPERSION_H */ diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor.cpp index 99604af4fa7..de5f397c1e5 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor.cpp @@ -43,7 +43,7 @@ TAO_LB_RPMS_Monitor::current_load (CORBA::Environment &ACE_TRY_ENV) // maximize throughput in a multithreaded server replica by // preventing two allocations from being added to the critical path // of the client request. - // + // // This optimization won't make a difference on single-threaded // server replicas. diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor_Interceptor.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor_Interceptor.h index cb0a7ccb247..d0658c73e7e 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor_Interceptor.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor_Interceptor.h @@ -122,7 +122,7 @@ public: /// This template is actually instantiated in /// `tao/Object_Ref_Table.cpp'. - typedef ACE_Hash_Map_Manager_Ex<const char *, CORBA::Object_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> Table; + typedef ACE_Hash_Map_Manager_Ex<const char *, CORBA::Object_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> Table; private: @@ -145,7 +145,7 @@ private: LoadBalancing::ReplicationManager_var lb_; - + }; diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor_Interceptor.inl b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor_Interceptor.inl index 4cd431f4f15..21309dccfb0 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor_Interceptor.inl +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_RPMS_Monitor_Interceptor.inl @@ -13,7 +13,7 @@ TAO_LB_RPMS_Monitor_Interceptor::current_load (void) const CORBA::Float load = ACE_static_cast (CORBA::Float, this->request_count_) / elapsed_time.msec (); - + this->request_count_ = 0; this->interval_start_ = ACE_OS::gettimeofday (); diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Round_Robin_Strategy.cpp index d7bdf95d580..904e43bd080 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Round_Robin_Strategy.cpp @@ -1,13 +1,10 @@ // -*- C++ -*- -// $Id$ - - -#include "Round_Robin_Strategy.h" +#include "LB_Round_Robin_Strategy.h" #include "ReplicaProxy.h" ACE_RCSID (LoadBalancing, - Round_Robin_Strategy, + LB_Round_Robin_Strategy, "$Id$") diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Round_Robin_Strategy.h index 523ff488d9e..cefe3a6a5c1 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/Round_Robin_Strategy.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Round_Robin_Strategy.h @@ -1,34 +1,30 @@ // -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO_LoadBalancing -// -// = FILENAME -// Round_Robin_Strategy.h -// -// = AUTHOR -// Ossama Othman <ossama@uci.edu> -// -// ============================================================================ - -#ifndef ROUND_ROBIN_STRATEGY_H -#define ROUND_ROBIN_STRATEGY_H +//============================================================================= +/** + * @file LB_Round_Robin_Strategy.h + * + * $Id$ + * + * @author Ossama Othman <ossama@uci.edu> + */ +//============================================================================= + + +#ifndef LB_ROUND_ROBIN_STRATEGY_H +#define LB_ROUND_ROBIN_STRATEGY_H #include "ace/pre.h" -#include "LoadBalancing_Strategy.h" -#include "orbsvcs/LoadBalancingS.h" -#include "ace/Containers.h" -#include "ace/Synch.h" +#include "LB_Balancing_Strategy.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +#include "orbsvcs/LoadBalancingS.h" +#include "ace/Synch.h" + // Forward declarations class TAO_LB_ReplicaProxy; @@ -42,10 +38,14 @@ class TAO_LB_ReplicaProxy; typedef ACE_Unbounded_Set<TAO_LB_ReplicaProxy *> TAO_LB_ReplicaProxySet; typedef ACE_Unbounded_Set_Iterator<TAO_LB_ReplicaProxy *> TAO_LB_ReplicaProxySetIterator; -class TAO_LoadBalancing_Export TAO_LB_Round_Robin_Strategy : public TAO_LB_LoadBalancing_Strategy +/** + * @class TAO_LB_Round_Robin_Strategy + * + * @brief Round Robin load balancing strategy + */ +class TAO_LoadBalancing_Export TAO_LB_Round_Robin_Strategy + : public TAO_LB_Balancing_Strategy { - // = TITLE - // Round Robin load balancing strategy // = DESCRIPTION // Simple load balancing strategy that causes requests to be @@ -53,11 +53,11 @@ class TAO_LoadBalancing_Export TAO_LB_Round_Robin_Strategy : public TAO_LB_LoadB // fashion. public: + /// Constructor. TAO_LB_Round_Robin_Strategy (void); - // Constructor. + /// Destructor ~TAO_LB_Round_Robin_Strategy (void); - // Destructor // = The Load_Balancing_Strategy methods virtual CORBA::Object_ptr replica (CORBA_Environment &ACE_TRY_ENV) @@ -66,15 +66,15 @@ public: virtual int remove (TAO_LB_ReplicaProxy *); private: + /// Set containing the ReplicaProxy servants. TAO_LB_ReplicaProxySet proxies_; - // Set containing the ReplicaProxy servants. ACE_Unbounded_Set_Iterator<TAO_LB_ReplicaProxy *> next_replica_; + /// Lock used to ensure access to state within this class is atomic. TAO_SYNCH_MUTEX lock_; - // Lock used to ensure access to state within this class is atomic. }; #include "ace/post.h" -#endif /* ROUND_ROBIN_STRATEGY_H */ +#endif /* LB_ROUND_ROBIN_STRATEGY_H */ |