TAO_System_Id_With_Unique_Id_Strategy Class Reference

System id strategy. More...

#include <Active_Object_Map.h>

Inheritance diagram for TAO_System_Id_With_Unique_Id_Strategy:

Inheritance graph
[legend]
Collaboration diagram for TAO_System_Id_With_Unique_Id_Strategy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual int bind_using_system_id (PortableServer::Servant servant, CORBA::Short priority, TAO_Active_Object_Map_Entry *&entry)
 Must be used with SYSTEM_ID policy.

Detailed Description

System id strategy.

Strategy for the SYSTEM_ID policy (with UNIQUE_ID policy).

Definition at line 558 of file Active_Object_Map.h.


Member Function Documentation

int TAO_System_Id_With_Unique_Id_Strategy::bind_using_system_id ( PortableServer::Servant  servant,
CORBA::Short  priority,
TAO_Active_Object_Map_Entry *&  entry 
) [virtual]

Must be used with SYSTEM_ID policy.

Implements TAO_Id_Assignment_Strategy.

Definition at line 876 of file Active_Object_Map.cpp.

References ACE_NEW_RETURN, TAO_Id_Assignment_Strategy::active_object_map_, TAO_Active_Object_Map::id_hint_strategy_, TAO_Active_Object_Map_Entry::priority_, TAO_Active_Object_Map_Entry::servant_, TAO_Active_Object_Map::servant_map_, TAO_Active_Object_Map_Entry::user_id_, and TAO_Active_Object_Map::user_id_map_.

00880 {
00881   ACE_NEW_RETURN (entry,
00882                   TAO_Active_Object_Map_Entry,
00883                   -1);
00884 
00885   int result =
00886     this->active_object_map_->user_id_map_->bind_create_key (entry,
00887                                                              entry->user_id_);
00888   if (result == 0)
00889     {
00890       entry->servant_ = servant;
00891       entry->priority_ = priority;
00892 
00893       result = this->active_object_map_->id_hint_strategy_->bind (*entry);
00894 
00895       if (result == 0)
00896         {
00897           if (servant != 0)
00898             {
00899               result =
00900                 this->active_object_map_->servant_map_->bind (entry->servant_,
00901                                                               entry);
00902             }
00903 
00904           if (result != 0)
00905             {
00906               this->active_object_map_->user_id_map_->unbind (entry->user_id_);
00907               this->active_object_map_->id_hint_strategy_->unbind (*entry);
00908               delete entry;
00909             }
00910           else
00911             {
00912 #if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1)
00913               this->active_object_map_->monitor_->receive (
00914                 this->active_object_map_->servant_map_->current_size ());
00915 #endif /* TAO_HAS_MONITOR_POINTS==1 */
00916             }
00917         }
00918       else
00919         {
00920           this->active_object_map_->user_id_map_->unbind (entry->user_id_);
00921           delete entry;
00922         }
00923     }
00924   else
00925     {
00926       delete entry;
00927     }
00928 
00929   return result;
00930 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:41:34 2010 for TAO_PortableServer by  doxygen 1.4.7