TAO_Implementation_Repository  2.3.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Locator_Repository Class Referenceabstract

Database containing all ImR persistent information. More...

#include <Locator_Repository.h>

Inheritance diagram for Locator_Repository:
Inheritance graph
[legend]
Collaboration diagram for Locator_Repository:
Collaboration graph
[legend]

Public Types

typedef ACE_Hash_Map_Manager_Ex< ACE_CString, Server_Info_Ptr, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_MutexSIMap
 
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, Activator_Info_Ptr, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_MutexAIMap
 

Public Member Functions

 Locator_Repository (const Options &opts, CORBA::ORB_ptr orb)
 
virtual ~Locator_Repository ()
 
virtual void shutdown (void)
 
int unregister_if_address_reused (const ACE_CString &fqname, const char *partial_ior, ImR_Locator_i *imr_locator)
 
int add_server (const ACE_CString &fqname, const ImplementationRepository::StartupOptions &options)
 Add a new server to the Repository. More...
 
int add_server (const ACE_CString &fqname, const ACE_CString &partial_ior, const ACE_CString &ior, ImplementationRepository::ServerObject_ptr svrobj)
 
int add_server_i (Server_Info *si)
 
int link_peers (Server_Info_Ptr base, const CORBA::StringSeq peers)
 
int add_activator (const ACE_CString &name, const CORBA::Long token, const ACE_CString &ior=ACE_CString(""), ImplementationRepository::Activator_ptr act=ImplementationRepository::Activator::_nil())
 Add a new activator to the Repository. More...
 
int update_server (const Server_Info_Ptr &info)
 Update the associated information. More...
 
int update_activator (const Activator_Info_Ptr &info)
 Update the associated information. More...
 
virtual void notify_remote_access (const char *id, ImplementationRepository::AAM_Status state)
 Update the peer's access state. More...
 
Server_Info_Ptr get_active_server (const ACE_CString &name, int pid=0)
 Returns information related to startup. More...
 
Server_Info_Ptr get_info (const ACE_CString &name)
 
Activator_Info_Ptr get_activator (const ACE_CString &name)
 Returns information related to startup. More...
 
bool has_activator (const ACE_CString &name)
 
int remove_server (const ACE_CString &name)
 Removes the server from the Repository. More...
 
int remove_activator (const ACE_CString &name)
 Removes the activator from the Repository. More...
 
SIMapservers (void)
 Returns the internal hash map containing the server information. More...
 
const SIMapservers (void) const
 
AIMapactivators (void)
 Returns the internal hash map containing the activator information. More...
 
const AIMapactivators (void) const
 
virtual const ACE_TCHARrepo_mode (void) const =0
 indicate the persistence mode for the repository More...
 
int init (PortableServer::POA_ptr root_poa, PortableServer::POA_ptr imr_poa, const char *this_ior)
 Initialize the repo. More...
 
bool multicast () const
 Indicate if multicast should be used. More...
 
virtual int report_ior (PortableServer::POA_ptr imr_poa)
 report the ImR Locator's IOR More...
 

Static Public Member Functions

static ACE_CString lcase (const ACE_CString &s)
 convert to lower case More...
 

Protected Member Functions

virtual int init_repo (PortableServer::POA_ptr imr_poa)=0
 perform repo mode specific initialization More...
 
virtual int sync_load (void)
 
virtual int persistent_update (const Server_Info_Ptr &info, bool add)=0
 perform server persistent update More...
 
virtual int persistent_update (const Activator_Info_Ptr &info, bool add)=0
 perform activator persistent update More...
 
virtual int persistent_remove (const ACE_CString &name, bool activator)=0
 perform persistent remove More...
 
virtual int recover_ior (void)
 recover the ImR Locator's IOR from the persisted file More...
 
int setup_multicast (ACE_Reactor *reactor, const char *imr_ior)
 
void teardown_multicast ()
 
bool registered () const
 

Protected Attributes

const Optionsopts_
 
TAO_IOR_Multicast ior_multicast_
 
const CORBA::ORB_var orb_
 
CORBA::String_var imr_ior_
 

Private Member Functions

Server_Info_Ptr find_by_poa (const ACE_CString &name)
 

Private Attributes

bool registered_
 
SIMap server_infos_
 The in-memory list of the server information. More...
 
AIMap activator_infos_
 The in-memory list of the activator information. More...
 

Detailed Description

Database containing all ImR persistent information.

Member Typedef Documentation

Constructor & Destructor Documentation

Locator_Repository::Locator_Repository ( const Options opts,
CORBA::ORB_ptr  orb 
)
Locator_Repository::~Locator_Repository ( )
virtual

Member Function Documentation

Locator_Repository::AIMap & Locator_Repository::activators ( void  )

Returns the internal hash map containing the activator information.

const Locator_Repository::AIMap & Locator_Repository::activators ( void  ) const
int Locator_Repository::add_activator ( const ACE_CString name,
const CORBA::Long  token,
const ACE_CString ior = ACE_CString(""),
ImplementationRepository::Activator_ptr  act = ImplementationRepository::Activator::_nil() 
)

Add a new activator to the Repository.

int Locator_Repository::add_server ( const ACE_CString fqname,
const ImplementationRepository::StartupOptions &  options 
)

Add a new server to the Repository.

int Locator_Repository::add_server ( const ACE_CString fqname,
const ACE_CString partial_ior,
const ACE_CString ior,
ImplementationRepository::ServerObject_ptr  svrobj 
)
int Locator_Repository::add_server_i ( Server_Info si)
Server_Info_Ptr Locator_Repository::find_by_poa ( const ACE_CString name)
private
Activator_Info_Ptr Locator_Repository::get_activator ( const ACE_CString name)

Returns information related to startup.

Server_Info_Ptr Locator_Repository::get_active_server ( const ACE_CString name,
int  pid = 0 
)

Returns information related to startup.

Server_Info_Ptr Locator_Repository::get_info ( const ACE_CString name)
bool Locator_Repository::has_activator ( const ACE_CString name)
int Locator_Repository::init ( PortableServer::POA_ptr  root_poa,
PortableServer::POA_ptr  imr_poa,
const char *  this_ior 
)

Initialize the repo.

virtual int Locator_Repository::init_repo ( PortableServer::POA_ptr  imr_poa)
protectedpure virtual

perform repo mode specific initialization

Implemented in No_Backing_Store, Shared_Backing_Store, XML_Backing_Store, and Config_Backing_Store.

ACE_CString Locator_Repository::lcase ( const ACE_CString s)
static

convert to lower case

int Locator_Repository::link_peers ( Server_Info_Ptr  base,
const CORBA::StringSeq  peers 
)

create new records for poas that share a server instance. This is a two step process, first the base poa must be registered then a list of peers may be added.

bool Locator_Repository::multicast ( ) const

Indicate if multicast should be used.

void Locator_Repository::notify_remote_access ( const char *  id,
ImplementationRepository::AAM_Status  state 
)
virtual

Update the peer's access state.

Reimplemented in Shared_Backing_Store.

virtual int Locator_Repository::persistent_remove ( const ACE_CString name,
bool  activator 
)
protectedpure virtual

perform persistent remove

Implemented in No_Backing_Store, Shared_Backing_Store, XML_Backing_Store, and Config_Backing_Store.

virtual int Locator_Repository::persistent_update ( const Server_Info_Ptr info,
bool  add 
)
protectedpure virtual

perform server persistent update

Implemented in No_Backing_Store, Shared_Backing_Store, XML_Backing_Store, and Config_Backing_Store.

virtual int Locator_Repository::persistent_update ( const Activator_Info_Ptr info,
bool  add 
)
protectedpure virtual

perform activator persistent update

Implemented in No_Backing_Store, Shared_Backing_Store, XML_Backing_Store, and Config_Backing_Store.

int Locator_Repository::recover_ior ( void  )
protectedvirtual

recover the ImR Locator's IOR from the persisted file

bool Locator_Repository::registered ( ) const
protected
int Locator_Repository::remove_activator ( const ACE_CString name)

Removes the activator from the Repository.

int Locator_Repository::remove_server ( const ACE_CString name)

Removes the server from the Repository.

virtual const ACE_TCHAR* Locator_Repository::repo_mode ( void  ) const
pure virtual

indicate the persistence mode for the repository

Implemented in No_Backing_Store, Registry_Backing_Store, Heap_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.

int Locator_Repository::report_ior ( PortableServer::POA_ptr  imr_poa)
virtual

report the ImR Locator's IOR

Reimplemented in Shared_Backing_Store.

Locator_Repository::SIMap & Locator_Repository::servers ( void  )

Returns the internal hash map containing the server information.

const Locator_Repository::SIMap & Locator_Repository::servers ( void  ) const
int Locator_Repository::setup_multicast ( ACE_Reactor reactor,
const char *  imr_ior 
)
protected
void Locator_Repository::shutdown ( void  )
virtual

Reimplemented in Shared_Backing_Store.

int Locator_Repository::sync_load ( void  )
protectedvirtual

perform sync of repo with backing store defaults to no-op, only shared backing stores need to sync

Reimplemented in Shared_Backing_Store.

void Locator_Repository::teardown_multicast ( )
protected
int Locator_Repository::unregister_if_address_reused ( const ACE_CString fqname,
const char *  partial_ior,
ImR_Locator_i imr_locator 
)
int Locator_Repository::update_activator ( const Activator_Info_Ptr info)

Update the associated information.

int Locator_Repository::update_server ( const Server_Info_Ptr info)

Update the associated information.

Member Data Documentation

AIMap Locator_Repository::activator_infos_
private

The in-memory list of the activator information.

CORBA::String_var Locator_Repository::imr_ior_
protected
TAO_IOR_Multicast Locator_Repository::ior_multicast_
protected
const Options& Locator_Repository::opts_
protected
const CORBA::ORB_var Locator_Repository::orb_
protected
bool Locator_Repository::registered_
private
SIMap Locator_Repository::server_infos_
private

The in-memory list of the server information.


The documentation for this class was generated from the following files: