#include <Active_Object_Map.h>
Inheritance diagram for TAO_Transient_Strategy:
Public Member Functions | |
virtual int | find_servant_using_system_id_and_user_id (const PortableServer::ObjectId &system_id, const PortableServer::ObjectId &user_id, PortableServer::Servant &servant, TAO_Active_Object_Map_Entry *&entry) |
Can be used with any policy. |
Strategy for the TRANSIENT policy.
Definition at line 469 of file Active_Object_Map.h.
int TAO_Transient_Strategy::find_servant_using_system_id_and_user_id | ( | const PortableServer::ObjectId & | system_id, | |
const PortableServer::ObjectId & | user_id, | |||
PortableServer::Servant & | servant, | |||
TAO_Active_Object_Map_Entry *& | entry | |||
) | [virtual] |
Can be used with any policy.
Implements TAO_Lifespan_Strategy.
Definition at line 743 of file Active_Object_Map.cpp.
References TAO_Lifespan_Strategy::active_object_map_, TAO_Active_Object_Map_Entry::deactivated_, TAO_Active_Object_Map::id_hint_strategy_, TAO_Active_Object_Map_Entry::servant_, and TAO_Active_Object_Map::user_id_map_.
00748 { 00749 int result = this->active_object_map_->id_hint_strategy_->find (system_id, 00750 entry); 00751 if (result == 0) 00752 { 00753 if (entry->deactivated_) 00754 { 00755 result = -1; 00756 } 00757 else if (entry->servant_ == 0) 00758 { 00759 result = -1; 00760 } 00761 else 00762 { 00763 servant = entry->servant_; 00764 } 00765 } 00766 else 00767 { 00768 result = this->active_object_map_->user_id_map_->find (user_id, 00769 entry); 00770 if (result == 0) 00771 { 00772 if (entry->deactivated_) 00773 { 00774 result = -1; 00775 } 00776 else if (entry->servant_ == 0) 00777 { 00778 result = -1; 00779 } 00780 else 00781 { 00782 servant = entry->servant_; 00783 } 00784 } 00785 } 00786 00787 if (result == -1) 00788 { 00789 entry = 0; 00790 } 00791 00792 return result; 00793 }