Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / LoadBalancer / Push_Handler.cpp
blob350101d7f791ebf26177af15e5938ff66b8853e0
1 #include "Push_Handler.h"
2 #include "tao/debug.h"
4 TAO_LB_Push_Handler::TAO_LB_Push_Handler (
5 CosLoadBalancing::LoadMonitor_ptr monitor,
6 const PortableGroup::Location & location,
7 CosLoadBalancing::LoadManager_ptr manager)
8 : monitor_ (CosLoadBalancing::LoadMonitor::_duplicate (monitor)),
9 location_ (location),
10 manager_ (CosLoadBalancing::LoadManager::_duplicate (manager))
14 int
15 TAO_LB_Push_Handler::handle_timeout (
16 const ACE_Time_Value & /* current_time */,
17 const void * /* arg */)
19 try
21 CosLoadBalancing::LoadList_var loads =
22 this->monitor_->loads ();
24 // ORBSVCS_DEBUG ((LM_DEBUG,
25 // "PUSHING LOAD:\n"
26 // " id: %u\n"
27 // " value: %f\n",
28 // loads[0].id,
29 // loads[0].value));
31 this->manager_->push_loads (this->location_,
32 loads.in ());
34 catch (const CORBA::Exception& ex)
36 // Catch the exception and ignore it.
37 // @@ Yah?
39 if (TAO_debug_level > 0)
40 ex._tao_print_exception ("(%P|%t) Push_Handler::handle_timeout()\n");
43 return 0;