TAO_Object_Adapter::Active_Hint_Strategy Class Reference

This class uses active demux hint for POA active hint strategy. More...

#include <Object_Adapter.h>

Inheritance diagram for TAO_Object_Adapter::Active_Hint_Strategy:

Inheritance graph
[legend]
Collaboration diagram for TAO_Object_Adapter::Active_Hint_Strategy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Active_Hint_Strategy (CORBA::ULong map_size)
virtual ~Active_Hint_Strategy (void)
virtual int find_persistent_poa (const poa_name &system_name, TAO_Root_POA *&poa)
virtual int bind_persistent_poa (const poa_name &folded_name, TAO_Root_POA *poa, poa_name_out system_name)
virtual int unbind_persistent_poa (const poa_name &folded_name, const poa_name &system_name)

Protected Types

typedef ACE_Active_Map_Manager_Adapter<
poa_name, TAO_Root_POA *,
TAO_Preserve_Original_Key_Adapter
persistent_poa_system_map

Protected Attributes

persistent_poa_system_map persistent_poa_system_map_

Detailed Description

This class uses active demux hint for POA active hint strategy.

This class will append an active hint to the POA name, making the POA lookups fast and predictable.

Definition at line 270 of file Object_Adapter.h.


Member Typedef Documentation

typedef ACE_Active_Map_Manager_Adapter< poa_name, TAO_Root_POA *, TAO_Preserve_Original_Key_Adapter> TAO_Object_Adapter::Active_Hint_Strategy::persistent_poa_system_map [protected]
 

Definition at line 294 of file Object_Adapter.h.


Constructor & Destructor Documentation

TAO_Object_Adapter::Active_Hint_Strategy::Active_Hint_Strategy CORBA::ULong  map_size  ) 
 

Definition at line 961 of file Object_Adapter.cpp.

00962   : persistent_poa_system_map_ (map_size)
00963 {
00964 }

TAO_Object_Adapter::Active_Hint_Strategy::~Active_Hint_Strategy void   )  [virtual]
 

Definition at line 966 of file Object_Adapter.cpp.

00967 {
00968 }


Member Function Documentation

int TAO_Object_Adapter::Active_Hint_Strategy::bind_persistent_poa const poa_name folded_name,
TAO_Root_POA poa,
poa_name_out  system_name
[virtual]
 

Implements TAO_Object_Adapter::Hint_Strategy.

Definition at line 999 of file Object_Adapter.cpp.

References ACE_NEW_RETURN, ACE_Map< KEY, VALUE >::bind(), ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >::bind_modify_key(), TAO_Object_Adapter::persistent_poa_name_map_, persistent_poa_system_map_, TAO_Object_Adapter::poa_name, TAO_Object_Adapter::poa_name_out, and ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >::unbind().

01003 {
01004   poa_name name = folded_name;
01005   int result = this->persistent_poa_system_map_.bind_modify_key (poa,
01006                                                                  name);
01007 
01008   if (result == 0)
01009     {
01010       result =
01011         this->object_adapter_->persistent_poa_name_map_->bind (folded_name,
01012                                                                poa);
01013 
01014       if (result != 0)
01015         this->persistent_poa_system_map_.unbind (name);
01016       else
01017         ACE_NEW_RETURN (system_name,
01018                         poa_name (name),
01019                         -1);
01020     }
01021 
01022   return result;
01023 }

int TAO_Object_Adapter::Active_Hint_Strategy::find_persistent_poa const poa_name system_name,
TAO_Root_POA *&  poa
[virtual]
 

Implements TAO_Object_Adapter::Hint_Strategy.

Definition at line 971 of file Object_Adapter.cpp.

References TAO_Object_Adapter::activate_poa(), ACE_Map< KEY, VALUE >::find(), ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >::find(), TAO_Root_POA::folded_name(), TAO_Object_Adapter::persistent_poa_name_map_, persistent_poa_system_map_, TAO_Object_Adapter::poa_name, and ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >::recover_key().

00974 {
00975   poa_name folded_name;
00976   int result = this->persistent_poa_system_map_.recover_key (system_name,
00977                                                              folded_name);
00978 
00979   if (result == 0)
00980     {
00981       result = this->persistent_poa_system_map_.find (system_name, poa);
00982       if (result != 0
00983           || folded_name != poa->folded_name ())
00984         {
00985           result =
00986             this->object_adapter_->persistent_poa_name_map_->find (folded_name,
00987                                                                    poa);
00988           if (result != 0)
00989             {
00990               result = this->object_adapter_->activate_poa (folded_name, poa);
00991             }
00992         }
00993     }
00994 
00995   return result;
00996 }

int TAO_Object_Adapter::Active_Hint_Strategy::unbind_persistent_poa const poa_name folded_name,
const poa_name system_name
[virtual]
 

Implements TAO_Object_Adapter::Hint_Strategy.

Definition at line 1026 of file Object_Adapter.cpp.

References TAO_Object_Adapter::persistent_poa_name_map_, persistent_poa_system_map_, TAO_Object_Adapter::poa_name, ACE_Map< KEY, VALUE >::unbind(), and ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >::unbind().

01029 {
01030   int result = this->persistent_poa_system_map_.unbind (system_name);
01031 
01032   if (result == 0)
01033     result =
01034       this->object_adapter_->persistent_poa_name_map_->unbind (folded_name);
01035 
01036   return result;
01037 }


Member Data Documentation

persistent_poa_system_map TAO_Object_Adapter::Active_Hint_Strategy::persistent_poa_system_map_ [protected]
 

Definition at line 296 of file Object_Adapter.h.

Referenced by bind_persistent_poa(), find_persistent_poa(), and unbind_persistent_poa().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:27:22 2008 for TAO_PortableServer by doxygen 1.3.6