summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-06 22:04:41 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-06 22:04:41 +0000
commit20afe55c08a11a09e2faee538b27d77790b7f6ba (patch)
treec3c0aa95e37ad4b0e081f0af4fad7d8fb36601c1
parent04377ab7acfc10c6c3759cfc9118b6e1d8d25a86 (diff)
downloadATCD-20afe55c08a11a09e2faee538b27d77790b7f6ba.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/tools/RTComponentServer/ChangeLog6
-rw-r--r--TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp39
-rw-r--r--TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h20
3 files changed, 55 insertions, 10 deletions
diff --git a/TAO/CIAO/tools/RTComponentServer/ChangeLog b/TAO/CIAO/tools/RTComponentServer/ChangeLog
index 8bb32361c41..665c1b0e3df 100644
--- a/TAO/CIAO/tools/RTComponentServer/ChangeLog
+++ b/TAO/CIAO/tools/RTComponentServer/ChangeLog
@@ -1,3 +1,9 @@
+Wed Aug 06 17:02:02 2003 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * RTConfig_Manager.h:
+ * RTConfig_Manager.cpp: Added support for keeping PriorityBands
+ information.
+
Sun Aug 3 23:12:20 2003 Nanbor Wang <nanbor@cs.wustl.edu>
* RTConfig_Manager.cpp: Fixed mismatched throw specifications.
diff --git a/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp b/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp
index 0caf61cfb2a..dd53bf91491 100644
--- a/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp
+++ b/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.cpp
@@ -61,6 +61,20 @@ CIAO::RTResource_Config_Manager::init
ACE_THROW (CORBA::INTERNAL ());
}
}
+
+ for (i = 0; i < info.pb_configs.length (); ++i)
+ {
+ RTCORBA::PriorityBands_var safebands = new RTCORBA::PriorityBands;
+
+ safebands = info.pb_configs[i].bands;
+
+ if (this->priority_bands_map_.bind (info.pb_configs[i].name.in (),
+ safebands) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Error binding priority bands name: %s to map when initializing RTComponentServer resources.\n", info.pb_configs[i].name.in ()));
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+ }
}
void
@@ -105,15 +119,32 @@ CIAO::RTResource_Config_Manager::find_threadpool_by_name (const char *name
return ret_id;
}
-/*
-
RTCORBA::PriorityBands *
CIAO::RTResource_Config_Manager::find_priority_bands_by_name (const char *name
ACE_ENV_ARG_DECL)
- // @@ THROW SPEC?
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
+ if (name == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Invalid name string found in \"find_priority_bands_by_name\"\n"));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+ PB_MAP::ENTRY *entry;
+
+ if (this->priority_bands_map_.find (name, entry) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Unable to find a connection bands named %s\n",
+ name));
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+ RTCORBA::PriorityBands_var retv = new RTCORBA::PriorityBands;
+ (*retv.ptr ()) = (*entry->int_id_.ptr ());
+ return retv._retn ();
}
-*/
void
CIAO::RTPolicy_Set_Manager::init (const CIAO::RTConfiguration::Policy_Sets &sets
diff --git a/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h b/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h
index 9bac65c82ad..2d7eaddcad2 100644
--- a/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h
+++ b/TAO/CIAO/tools/RTComponentServer/RTConfig_Manager.h
@@ -64,12 +64,11 @@ namespace CIAO
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
- /*
- /// Query a priority bands infor by name.
+
+ /// Query a priority bands info by name.
RTCORBA::PriorityBands *find_priority_bands_by_name (const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- // @@ THROW SPEC?
- */
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
private:
// Cached an RTORB reference.
@@ -82,8 +81,17 @@ namespace CIAO
ACE_Equal_To<ACE_CString>,
ACE_Null_Mutex> TP_MAP;
- /// Internal TP names to id map.
+ typedef ACE_Hash_Map_Manager_Ex<ACE_CString,
+ RTCORBA::PriorityBands_var,
+ ACE_Hash<ACE_CString>,
+ ACE_Equal_To<ACE_CString>,
+ ACE_Null_Mutex> PB_MAP;
+
+ /// Internal TP name to id map.
TP_MAP threadpool_map_;
+
+ /// Internal PB name to priority bands map.
+ PB_MAP priority_bands_map_;
};
/**