Persistent strategy. More...
#include <Active_Object_Map.h>


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. | |
Persistent strategy.
Strategy for the PERSISTENT policy.
Definition at line 489 of file Active_Object_Map.h.
| 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.
{
int result =
this->active_object_map_->id_hint_strategy_->find (system_id,
entry);
if (result == 0 && user_id == entry->user_id_)
{
if (entry->deactivated_)
{
result = -1;
}
else if (entry->servant_ == 0)
{
result = -1;
}
else
{
servant = entry->servant_;
}
}
else
{
result =
this->active_object_map_->user_id_map_->find (user_id, entry);
if (result == 0)
{
if (entry->deactivated_)
{
result = -1;
}
else if (entry->servant_ == 0)
{
result = -1;
}
else
{
servant = entry->servant_;
}
}
}
if (result == -1)
{
entry = 0;
}
return result;
}
1.7.0