#include <Active_Object_Map.h>
Inheritance diagram for TAO_Unique_Id_Strategy:
Public Member Functions | |
virtual int | is_servant_in_map (PortableServer::Servant servant, int &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) |
Strategy for the UNIQUE_ID policy.
Definition at line 297 of file Active_Object_Map.h.
|
Can be used with any policy. With the SYSTEM_ID policy, is actually . Implements TAO_Id_Uniqueness_Strategy. Definition at line 396 of file Active_Object_Map.cpp. References ACE_NEW_RETURN, TAO_Id_Hint_Strategy::bind(), 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_Id_Hint_Strategy::unbind(), TAO_Active_Object_Map_Entry::user_id_, and TAO_Active_Object_Map::user_id_map_.
00400 { 00401 int result = this->active_object_map_->user_id_map_->find (user_id, 00402 entry); 00403 if (result == 0) 00404 { 00405 if (servant != 0) 00406 { 00407 entry->servant_ = servant; 00408 00409 result = this->active_object_map_->servant_map_->bind (entry->servant_, 00410 entry); 00411 } 00412 } 00413 else 00414 { 00415 ACE_NEW_RETURN (entry, 00416 TAO_Active_Object_Map_Entry, 00417 -1); 00418 entry->user_id_ = user_id; 00419 entry->servant_ = servant; 00420 entry->priority_ = priority; 00421 00422 result = this->active_object_map_->id_hint_strategy_->bind (*entry); 00423 00424 if (result == 0) 00425 { 00426 result = this->active_object_map_->user_id_map_->bind (entry->user_id_, 00427 entry); 00428 if (result == 0) 00429 { 00430 if (servant != 0) 00431 result = this->active_object_map_->servant_map_->bind (entry->servant_, 00432 entry); 00433 if (result != 0) 00434 { 00435 this->active_object_map_->user_id_map_->unbind (entry->user_id_); 00436 this->active_object_map_->id_hint_strategy_->unbind (*entry); 00437 delete entry; 00438 } 00439 } 00440 else 00441 { 00442 this->active_object_map_->id_hint_strategy_->unbind (*entry); 00443 delete entry; 00444 } 00445 } 00446 else 00447 delete entry; 00448 } 00449 00450 return result; 00451 } |
|
Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, is actually . Implements TAO_Id_Uniqueness_Strategy. Definition at line 495 of file Active_Object_Map.cpp. References TAO_Active_Object_Map_Entry::deactivated_, TAO_Active_Object_Map::id_hint_strategy_, TAO_Active_Object_Map_Entry::priority_, TAO_Active_Object_Map::servant_map_, and TAO_Id_Hint_Strategy::system_id().
00498 { 00499 TAO_Active_Object_Map_Entry *entry = 0; 00500 int result = this->active_object_map_->servant_map_->find (servant, 00501 entry); 00502 if (result == 0) 00503 { 00504 if (entry->deactivated_) 00505 result = -1; 00506 else 00507 { 00508 result = this->active_object_map_->id_hint_strategy_->system_id (system_id, 00509 *entry); 00510 if (result == 0) 00511 priority = entry->priority_; 00512 } 00513 } 00514 00515 return result; 00516 } |
|
Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, is actually . Implements TAO_Id_Uniqueness_Strategy. Definition at line 475 of file Active_Object_Map.cpp. References ACE_NEW_RETURN, TAO_Active_Object_Map_Entry::deactivated_, TAO_Active_Object_Map::servant_map_, and TAO_Active_Object_Map_Entry::user_id_.
00477 { 00478 TAO_Active_Object_Map_Entry *entry = 0; 00479 int result = this->active_object_map_->servant_map_->find (servant, 00480 entry); 00481 if (result == 0) 00482 { 00483 if (entry->deactivated_) 00484 result = -1; 00485 else 00486 ACE_NEW_RETURN (user_id, 00487 PortableServer::ObjectId (entry->user_id_), 00488 -1); 00489 } 00490 00491 return result; 00492 } |
|
Must be used with UNIQUE_ID policy.
Implements TAO_Id_Uniqueness_Strategy. Definition at line 373 of file Active_Object_Map.cpp. References TAO_Active_Object_Map_Entry::deactivated_, and TAO_Active_Object_Map::servant_map_.
00375 { 00376 TAO_Active_Object_Map_Entry *entry = 0; 00377 int result = this->active_object_map_->servant_map_->find (servant, 00378 entry); 00379 if (result == 0) 00380 { 00381 result = 1; 00382 if (entry->deactivated_) 00383 { 00384 deactivated = 1; 00385 } 00386 } 00387 else 00388 { 00389 result = 0; 00390 } 00391 00392 return result; 00393 } |
|
Are there any remaining activations of in the active object map? Can be used with any policy. Implements TAO_Id_Uniqueness_Strategy. Definition at line 519 of file Active_Object_Map.cpp.
00520 { 00521 ACE_UNUSED_ARG (servant); 00522 00523 // Since servant are always unique here, return false. 00524 return 0; 00525 } |
|
Can be used with any policy. With the SYSTEM_ID policy, is actually . Implements TAO_Id_Uniqueness_Strategy. Definition at line 454 of file Active_Object_Map.cpp. References TAO_Active_Object_Map::id_hint_strategy_, TAO_Active_Object_Map_Entry::servant_, TAO_Active_Object_Map::servant_map_, TAO_Id_Hint_Strategy::unbind(), and TAO_Active_Object_Map::user_id_map_.
00455 { 00456 TAO_Active_Object_Map_Entry *entry = 0; 00457 int result = this->active_object_map_->user_id_map_->unbind (user_id, 00458 entry); 00459 if (result == 0) 00460 { 00461 if (entry->servant_ != 0) 00462 result = this->active_object_map_->servant_map_->unbind (entry->servant_); 00463 00464 if (result == 0) 00465 result = 00466 this->active_object_map_->id_hint_strategy_->unbind (*entry); 00467 00468 if (result == 0) 00469 delete entry; 00470 } 00471 return result; 00472 } |