Public Member Functions | Protected Types | Protected Attributes

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 252 of file Object_Adapter.h.


Member Typedef Documentation

Definition at line 275 of file Object_Adapter.h.


Constructor & Destructor Documentation

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

Definition at line 963 of file Object_Adapter.cpp.

  : persistent_poa_system_map_ (map_size)
{
}

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

Definition at line 968 of file Object_Adapter.cpp.

{
}


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 1001 of file Object_Adapter.cpp.

{
  poa_name name = folded_name;
  int result = this->persistent_poa_system_map_.bind_modify_key (poa,
                                                                 name);

  if (result == 0)
    {
      result =
        this->object_adapter_->persistent_poa_name_map_->bind (folded_name,
                                                               poa);

      if (result != 0)
        this->persistent_poa_system_map_.unbind (name);
      else
        ACE_NEW_RETURN (system_name,
                        poa_name (name),
                        -1);
    }

  return result;
}

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 973 of file Object_Adapter.cpp.

{
  poa_name folded_name;
  int result = this->persistent_poa_system_map_.recover_key (system_name,
                                                             folded_name);

  if (result == 0)
    {
      result = this->persistent_poa_system_map_.find (system_name, poa);
      if (result != 0
          || folded_name != poa->folded_name ())
        {
          result =
            this->object_adapter_->persistent_poa_name_map_->find (folded_name,
                                                                   poa);
          if (result != 0)
            {
              result = this->object_adapter_->activate_poa (folded_name, poa);
            }
        }
    }

  return result;
}

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 1028 of file Object_Adapter.cpp.

{
  int result = this->persistent_poa_system_map_.unbind (system_name);

  if (result == 0)
    result =
      this->object_adapter_->persistent_poa_name_map_->unbind (folded_name);

  return result;
}


Member Data Documentation

Definition at line 277 of file Object_Adapter.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines