Multiple id strategy. More...
#include <Active_Object_Map.h>
Public Member Functions | |
virtual int | is_servant_in_map (PortableServer::Servant servant, bool &deactivated) |
Must be used with UNIQUE_ID policy. | |
virtual int | unbind_using_user_id (const PortableServer::ObjectId &user_id) |
virtual int | find_user_id_using_servant (PortableServer::Servant servant, PortableServer::ObjectId_out user_id) |
virtual int | find_system_id_using_servant (PortableServer::Servant servant, PortableServer::ObjectId_out system_id, CORBA::Short &priority) |
virtual int | bind_using_user_id (PortableServer::Servant servant, const PortableServer::ObjectId &user_id, CORBA::Short priority, TAO_Active_Object_Map_Entry *&entry) |
virtual CORBA::Boolean | remaining_activations (PortableServer::Servant servant) |
Multiple id strategy.
Strategy for the MULTIPLE_ID policy.
Definition at line 387 of file Active_Object_Map.h.
int TAO_Multiple_Id_Strategy::bind_using_user_id | ( | PortableServer::Servant | servant, | |
const PortableServer::ObjectId & | user_id, | |||
CORBA::Short | priority, | |||
TAO_Active_Object_Map_Entry *& | entry | |||
) | [virtual] |
Can be used with any policy. With the SYSTEM_ID policy, user_id is actually system_id
.
Implements TAO_Id_Uniqueness_Strategy.
Definition at line 609 of file Active_Object_Map.cpp.
{ int result = this->active_object_map_->user_id_map_->find (user_id, entry); if (result == 0) { if (servant != 0) { entry->servant_ = servant; } } else { ACE_NEW_RETURN (entry, TAO_Active_Object_Map_Entry, -1); entry->user_id_ = user_id; entry->servant_ = servant; entry->priority_ = priority; result = this->active_object_map_->id_hint_strategy_->bind (*entry); if (result == 0) { result = this->active_object_map_->user_id_map_->bind (entry->user_id_, entry); if (result != 0) { this->active_object_map_->id_hint_strategy_->unbind (*entry); delete entry; } else { #if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1) this->active_object_map_->monitor_->receive ( this->active_object_map_->user_id_map_->current_size ()); #endif /* TAO_HAS_MONITOR_POINTS==1 */ } } else { delete entry; } } return result; }
int TAO_Multiple_Id_Strategy::find_system_id_using_servant | ( | PortableServer::Servant | servant, | |
PortableServer::ObjectId_out | system_id, | |||
CORBA::Short & | priority | |||
) | [virtual] |
Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, <user_id> is actually system_id.
Implements TAO_Id_Uniqueness_Strategy.
Definition at line 698 of file Active_Object_Map.cpp.
{
return -1;
}
int TAO_Multiple_Id_Strategy::find_user_id_using_servant | ( | PortableServer::Servant | servant, | |
PortableServer::ObjectId_out | user_id | |||
) | [virtual] |
Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, user_id is actually system_id
.
Implements TAO_Id_Uniqueness_Strategy.
Definition at line 690 of file Active_Object_Map.cpp.
{
return -1;
}
int TAO_Multiple_Id_Strategy::is_servant_in_map | ( | PortableServer::Servant | servant, | |
bool & | deactivated | |||
) | [virtual] |
Must be used with UNIQUE_ID policy.
Implements TAO_Id_Uniqueness_Strategy.
Definition at line 603 of file Active_Object_Map.cpp.
{
return -1;
}
CORBA::Boolean TAO_Multiple_Id_Strategy::remaining_activations | ( | PortableServer::Servant | servant | ) | [virtual] |
Are there any remaining activations of servant in the active object map? Can be used with any policy.
Implements TAO_Id_Uniqueness_Strategy.
Definition at line 707 of file Active_Object_Map.cpp.
{ TAO_Active_Object_Map::user_id_map::iterator end = this->active_object_map_->user_id_map_->end (); for (TAO_Active_Object_Map::user_id_map::iterator iter = this->active_object_map_->user_id_map_->begin (); iter != end; ++iter) { TAO_Active_Object_Map::user_id_map::value_type map_pair = *iter; TAO_Active_Object_Map_Entry *entry = map_pair.second (); if (entry->servant_ == servant) { return 1; } } return 0; }
int TAO_Multiple_Id_Strategy::unbind_using_user_id | ( | const PortableServer::ObjectId & | user_id | ) | [virtual] |
Can be used with any policy. With the SYSTEM_ID policy, user_id is actually system_id
.
Implements TAO_Id_Uniqueness_Strategy.
Definition at line 665 of file Active_Object_Map.cpp.
{ TAO_Active_Object_Map_Entry *entry = 0; int result = this->active_object_map_->user_id_map_->unbind (user_id, entry); if (result == 0) { result = this->active_object_map_->id_hint_strategy_->unbind (*entry); if (result == 0) { delete entry; } #if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1) this->active_object_map_->monitor_->receive ( this->active_object_map_->user_id_map_->current_size ()); #endif /* TAO_HAS_MONITOR_POINTS==1 */ } return result; }