Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Fault_Tolerance_Service Class Reference

TAO_Fault_Tolerant_Service. More...

#include <Fault_Tolerance_Service.h>

Collaboration diagram for TAO_Fault_Tolerance_Service:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_Fault_Tolerance_Service (void)
 Ctor. More...

 ~TAO_Fault_Tolerance_Service (void)
 Dtor. More...

void init (TAO_ORB_Core *orb_core)
 Initialise the internal data structures. More...

TAO_Service_Callbacksservice_callback (void)
 Return the underlying callback object. More...

const ACE_CStringclient_id (void)
 Return the underlying <ft_object_id>. More...

void client_id (const char *id)
 Set the client id. More...

CORBA::Long retention_id (void)
 Generate and return a new retention id. More...


Private Attributes

TAO_Service_Callbacksft_service_callback_
 hook to callback on to the service. More...

ACE_CString ft_object_id_
 The object id that would be used if the ft service is loaded. More...

CORBA::Long ft_object_retention_id_
ACE_Lockft_object_retention_id_lock_
 Lock for the retention id. More...


Detailed Description

TAO_Fault_Tolerant_Service.

A collection of ORB & ORB_Core related stuff that is needed at the ORB level. The ORB Core would carry an instance of this class and invoke methods on this. Note: This collection would be really useful when we have logging in place. The contents of this class can be logged at regular check point intervals.

Definition at line 46 of file Fault_Tolerance_Service.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_Fault_Tolerance_Service::TAO_Fault_Tolerance_Service void   
 

Ctor.

Definition at line 3 of file Fault_Tolerance_Service.i.

00004   : ft_service_callback_ (0),
00005     ft_object_id_ (),
00006     ft_object_retention_id_ (-1),
00007     ft_object_retention_id_lock_ (0)
00008 {
00009 }

TAO_Fault_Tolerance_Service::~TAO_Fault_Tolerance_Service void   
 

Dtor.

Definition at line 15 of file Fault_Tolerance_Service.cpp.

References ft_object_retention_id_lock_, and ft_service_callback_.

00016 {
00017   delete this->ft_service_callback_;
00018   delete this->ft_object_retention_id_lock_;
00019 }


Member Function Documentation

ACE_INLINE void TAO_Fault_Tolerance_Service::client_id const char *    id
 

Set the client id.

Definition at line 26 of file Fault_Tolerance_Service.i.

References ft_object_id_.

00027 {
00028   this->ft_object_id_ = id;
00029 }

ACE_INLINE const ACE_CString & TAO_Fault_Tolerance_Service::client_id void   
 

Return the underlying <ft_object_id>.

Definition at line 20 of file Fault_Tolerance_Service.i.

References ft_object_id_.

Referenced by CORBA_ORB::_tao_ft_client_id.

00021 {
00022   return this->ft_object_id_;
00023 }

void TAO_Fault_Tolerance_Service::init TAO_ORB_Core   orb_core
 

Initialise the internal data structures.

Definition at line 22 of file Fault_Tolerance_Service.cpp.

References TAO_Services_Activate::activate_services, TAO_ORB_Core::client_factory, TAO_Client_Strategy_Factory::create_ft_service_retention_id_lock, ft_object_id_, ft_object_retention_id_lock_, and ft_service_callback_.

Referenced by TAO_ORB_Core::services_callbacks_init.

00023 {
00024   // Look in to the svc conf stuff to get an instance of the
00025   // FT_Service.
00026   if (this->ft_service_callback_ == 0)
00027     {
00028       TAO_Services_Activate *service =
00029         ACE_Dynamic_Service <TAO_Services_Activate>::instance ("FT_Service_Activate");
00030 
00031       // Activate the callback
00032       if (service)
00033         this->ft_service_callback_ = service->activate_services (orb_core);
00034     }
00035 
00036   // If we have a valid service then we instantiate our lock and the
00037   // client id
00038   if (this->ft_service_callback_)
00039     {
00040       // Initialize the lock
00041       this->ft_object_retention_id_lock_ =
00042         orb_core->client_factory ()
00043           ->create_ft_service_retention_id_lock ();
00044 
00045       // Initialize the client id
00046       this->ft_object_id_ = "TAO_Client";
00047     }
00048 
00049   return;
00050 }

CORBA::Long TAO_Fault_Tolerance_Service::retention_id void   
 

Generate and return a new retention id.

Definition at line 53 of file Fault_Tolerance_Service.cpp.

References ACE_GUARD_RETURN, ACE_MT, and ft_object_retention_id_.

00054 {
00055   ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
00056                             guard,
00057                             *this->ft_object_retention_id_lock_,
00058                             0));
00059 
00060   return ++this->ft_object_retention_id_;
00061 }

ACE_INLINE TAO_Service_Callbacks * TAO_Fault_Tolerance_Service::service_callback void   
 

Return the underlying callback object.

Definition at line 14 of file Fault_Tolerance_Service.i.

References ft_service_callback_.

Referenced by TAO_ORB_Core::object_is_nil, TAO_ORB_Core::reset_service_profile_flags, TAO_ORB_Core::service_profile_reselection, TAO_ORB_Core::service_profile_selection, TAO_ORB_Core::service_raise_comm_failure, TAO_ORB_Core::service_raise_transient_failure, TAO_ORB_Core::services_log_msg_post_upcall, TAO_ORB_Core::services_log_msg_pre_upcall, and TAO_ORB_Core::services_log_msg_rcv.

00015 {
00016   return this->ft_service_callback_;
00017 }


Member Data Documentation

ACE_CString TAO_Fault_Tolerance_Service::ft_object_id_ [private]
 

The object id that would be used if the ft service is loaded.

Definition at line 77 of file Fault_Tolerance_Service.h.

Referenced by client_id, and init.

CORBA::Long TAO_Fault_Tolerance_Service::ft_object_retention_id_ [private]
 

This and the <ft_object_id_> act as unique identifiers for the request sent from the source Object. Modification of this value is done by the loaded FT

Definition at line 84 of file Fault_Tolerance_Service.h.

Referenced by retention_id.

ACE_Lock* TAO_Fault_Tolerance_Service::ft_object_retention_id_lock_ [private]
 

Lock for the retention id.

Definition at line 87 of file Fault_Tolerance_Service.h.

Referenced by init, and ~TAO_Fault_Tolerance_Service.

TAO_Service_Callbacks* TAO_Fault_Tolerance_Service::ft_service_callback_ [private]
 

hook to callback on to the service.

Definition at line 74 of file Fault_Tolerance_Service.h.

Referenced by init, service_callback, and ~TAO_Fault_Tolerance_Service.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:15:01 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002