TAO_Persistent_Strategy Class Reference

Persistent strategy. More...

#include <Active_Object_Map.h>

Inheritance diagram for TAO_Persistent_Strategy:

Inheritance graph
[legend]
Collaboration diagram for TAO_Persistent_Strategy:

Collaboration graph
[legend]
List of all members.

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.

Detailed Description

Persistent strategy.

Strategy for the PERSISTENT policy.

Definition at line 489 of file Active_Object_Map.h.


Member Function Documentation

int TAO_Persistent_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 799 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_, TAO_Active_Object_Map_Entry::user_id_, and TAO_Active_Object_Map::user_id_map_.

00804 {
00805   int result =
00806     this->active_object_map_->id_hint_strategy_->find (system_id,
00807                                                        entry);
00808   if (result == 0 && user_id == entry->user_id_)
00809     {
00810       if (entry->deactivated_)
00811         {
00812           result = -1;
00813         }
00814       else if (entry->servant_ == 0)
00815         {
00816           result = -1;
00817         }
00818       else
00819         {
00820           servant = entry->servant_;
00821         }
00822     }
00823   else
00824     {
00825       result =
00826         this->active_object_map_->user_id_map_->find (user_id, entry);
00827 
00828       if (result == 0)
00829         {
00830           if (entry->deactivated_)
00831             {
00832               result = -1;
00833             }
00834           else if (entry->servant_ == 0)
00835             {
00836               result = -1;
00837             }
00838           else
00839             {
00840               servant = entry->servant_;
00841             }
00842         }
00843     }
00844 
00845   if (result == -1)
00846     {
00847       entry = 0;
00848     }
00849 
00850   return result;
00851 }


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