summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2001-06-16 01:48:53 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2001-06-16 01:48:53 +0000
commita1046e6373cc7efcad9e84cb7d1a1d12788f2ffa (patch)
treeebc4fdb1192a35bf7971c4dead9260b17bcd970a
parentcbe1362b773f5d33cf9c6334e6e8865753d67e1b (diff)
downloadATCD-a1046e6373cc7efcad9e84cb7d1a1d12788f2ffa.tar.gz
*** empty log message ***
-rw-r--r--TAO/orbsvcs/orbsvcs/LB_GenericFactory.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_GenericFactory.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.cpp28
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.h15
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancingI.cpp28
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancingI.h15
6 files changed, 94 insertions, 12 deletions
diff --git a/TAO/orbsvcs/orbsvcs/LB_GenericFactory.cpp b/TAO/orbsvcs/orbsvcs/LB_GenericFactory.cpp
index bbb63c5836c..d869aef990e 100644
--- a/TAO/orbsvcs/orbsvcs/LB_GenericFactory.cpp
+++ b/TAO/orbsvcs/orbsvcs/LB_GenericFactory.cpp
@@ -35,13 +35,15 @@ TAO_LB_GenericFactory::create_object (
LoadBalancing::InvalidProperty,
LoadBalancing::CannotMeetCriteria))
{
- LoadBalancing::Criteria_var creation_criteria =
- this->property_manager_.process_criteria (the_criteria,
- ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
+// LoadBalancing::Criteria_var creation_criteria =
+// this->property_manager_.process_criteria (the_criteria,
+// ACE_TRY_ENV);
+// ACE_CHECK_RETURN (CORBA::Object::_nil ());
CORBA::ULong factory_infos_count = factory_infos.length ();
+ const CORBA::UShort initial_number_replicas = 3; // @@ REMOVE ME!
+
// If the number of factories is less than the initial number of
// replicas, then the desired number of replicas cannot possibly be
// created.
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_GenericFactory.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_GenericFactory.cpp
index bbb63c5836c..d869aef990e 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_GenericFactory.cpp
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_GenericFactory.cpp
@@ -35,13 +35,15 @@ TAO_LB_GenericFactory::create_object (
LoadBalancing::InvalidProperty,
LoadBalancing::CannotMeetCriteria))
{
- LoadBalancing::Criteria_var creation_criteria =
- this->property_manager_.process_criteria (the_criteria,
- ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
+// LoadBalancing::Criteria_var creation_criteria =
+// this->property_manager_.process_criteria (the_criteria,
+// ACE_TRY_ENV);
+// ACE_CHECK_RETURN (CORBA::Object::_nil ());
CORBA::ULong factory_infos_count = factory_infos.length ();
+ const CORBA::UShort initial_number_replicas = 3; // @@ REMOVE ME!
+
// If the number of factories is less than the initial number of
// replicas, then the desired number of replicas cannot possibly be
// created.
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.cpp
index d97462d5e7b..f5820808bd2 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.cpp
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.cpp
@@ -7,6 +7,8 @@
#include "LB_ReplicaLocator.h"
#include "LB_Balancing_Strategy.h"
+#include "LB_Minimum_Dispersion.h" // @@ REMOVE ME!
+
ACE_RCSID (LoadBalancing,
LoadBalancingI,
"$Id$")
@@ -22,14 +24,16 @@ TAO_LoadBalancing_ReplicationManager_i::TAO_LoadBalancing_ReplicationManager_i
generic_factory_ (this->property_manager_,
this->object_group_map_),
object_group_manager_ (this->property_manager_,
- this->object_group_map_)
+ this->object_group_map_),
+ balancing_strategy_ (new TAO_LB_Minimum_Dispersion_Strategy) //@@ FIXME!
{
- // (void) this->init ();
+ // (void) this->init ();
}
// Implementation skeleton destructor
TAO_LoadBalancing_ReplicationManager_i::~TAO_LoadBalancing_ReplicationManager_i (void)
{
+ delete this->balancing_strategy_; // @@ REMOVE ME!
}
void
@@ -52,6 +56,26 @@ TAO_LoadBalancing_ReplicationManager_i::get_load_notifier (
}
void
+TAO_LoadBalancing_ReplicationManager_i::register_load_monitor (
+ LoadBalancing::LoadMonitor_ptr /* load_monitor */,
+ const LoadBalancing::Location & /* the_location */,
+ CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+LoadBalancing::LoadMonitor_ptr
+TAO_LoadBalancing_ReplicationManager_i::get_load_monitor (
+ const LoadBalancing::Location & /* the_location */,
+ CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ LoadBalancing::InterfaceNotFound))
+{
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
+ LoadBalancing::LoadMonitor::_nil ());
+}
+
+void
TAO_LoadBalancing_ReplicationManager_i::set_default_properties (
const LoadBalancing::Properties &props,
CORBA::Environment &ACE_TRY_ENV)
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.h
index 7ca842fc719..9d15fdc6078 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.h
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LoadBalancingI.h
@@ -58,6 +58,21 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException,
LoadBalancing::InterfaceNotFound));
+ /// Register a load monitor with the load balancer
+ /// ReplicationManager.
+ virtual void register_load_monitor (
+ LoadBalancing::LoadMonitor_ptr load_monitor,
+ const LoadBalancing::Location & the_location,
+ CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Return a reference to the load notifier in use.
+ virtual LoadBalancing::LoadMonitor_ptr get_load_monitor (
+ const LoadBalancing::Location & the_location,
+ CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ LoadBalancing::InterfaceNotFound));
+
/**
* @name LoadBalancing::PropertyManager methods
*/
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancingI.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancingI.cpp
index d97462d5e7b..f5820808bd2 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancingI.cpp
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancingI.cpp
@@ -7,6 +7,8 @@
#include "LB_ReplicaLocator.h"
#include "LB_Balancing_Strategy.h"
+#include "LB_Minimum_Dispersion.h" // @@ REMOVE ME!
+
ACE_RCSID (LoadBalancing,
LoadBalancingI,
"$Id$")
@@ -22,14 +24,16 @@ TAO_LoadBalancing_ReplicationManager_i::TAO_LoadBalancing_ReplicationManager_i
generic_factory_ (this->property_manager_,
this->object_group_map_),
object_group_manager_ (this->property_manager_,
- this->object_group_map_)
+ this->object_group_map_),
+ balancing_strategy_ (new TAO_LB_Minimum_Dispersion_Strategy) //@@ FIXME!
{
- // (void) this->init ();
+ // (void) this->init ();
}
// Implementation skeleton destructor
TAO_LoadBalancing_ReplicationManager_i::~TAO_LoadBalancing_ReplicationManager_i (void)
{
+ delete this->balancing_strategy_; // @@ REMOVE ME!
}
void
@@ -52,6 +56,26 @@ TAO_LoadBalancing_ReplicationManager_i::get_load_notifier (
}
void
+TAO_LoadBalancing_ReplicationManager_i::register_load_monitor (
+ LoadBalancing::LoadMonitor_ptr /* load_monitor */,
+ const LoadBalancing::Location & /* the_location */,
+ CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+LoadBalancing::LoadMonitor_ptr
+TAO_LoadBalancing_ReplicationManager_i::get_load_monitor (
+ const LoadBalancing::Location & /* the_location */,
+ CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ LoadBalancing::InterfaceNotFound))
+{
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
+ LoadBalancing::LoadMonitor::_nil ());
+}
+
+void
TAO_LoadBalancing_ReplicationManager_i::set_default_properties (
const LoadBalancing::Properties &props,
CORBA::Environment &ACE_TRY_ENV)
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancingI.h b/TAO/orbsvcs/orbsvcs/LoadBalancingI.h
index 7ca842fc719..9d15fdc6078 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancingI.h
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancingI.h
@@ -58,6 +58,21 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException,
LoadBalancing::InterfaceNotFound));
+ /// Register a load monitor with the load balancer
+ /// ReplicationManager.
+ virtual void register_load_monitor (
+ LoadBalancing::LoadMonitor_ptr load_monitor,
+ const LoadBalancing::Location & the_location,
+ CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Return a reference to the load notifier in use.
+ virtual LoadBalancing::LoadMonitor_ptr get_load_monitor (
+ const LoadBalancing::Location & the_location,
+ CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ LoadBalancing::InterfaceNotFound));
+
/**
* @name LoadBalancing::PropertyManager methods
*/