TAO_Implementation_Repository 4.0.3
Loading...
Searching...
No Matches
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 ()
 
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.
 
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.
 
int update_server (const Server_Info_Ptr &info)
 Update the associated information.
 
int update_activator (const Activator_Info_Ptr &info)
 Update the associated information.
 
virtual void notify_remote_access (const char *id, ImplementationRepository::AAM_Status state)
 Update the peer's access state.
 
Server_Info_Ptr get_active_server (const ACE_CString &name, int pid=0)
 Returns information related to startup.
 
Activator_Info_Ptr get_activator (const ACE_CString &name)
 Returns information related to startup.
 
bool has_activator (const ACE_CString &name)
 
int remove_server (const ACE_CString &name, ImR_Locator_i *imr_locator)
 Removes the server from the Repository.
 
int remove_activator (const ACE_CString &name)
 Removes the activator from the Repository.
 
SIMapservers ()
 Returns the internal hash map containing the server information.
 
const SIMapservers () const
 
AIMapactivators ()
 Returns the internal hash map containing the activator information.
 
const AIMapactivators () const
 
virtual const ACE_TCHARrepo_mode () const =0
 Indicate the persistence mode for the repository.
 
int init (PortableServer::POA_ptr root_poa, PortableServer::POA_ptr imr_poa, const char *this_ior)
 Initialize the repo.
 
bool multicast () const
 Indicate if multicast should be used.
 
virtual int report_ior (PortableServer::POA_ptr imr_poa)
 report the ImR Locator's IOR
 

Static Public Member Functions

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

Protected Member Functions

virtual int init_repo (PortableServer::POA_ptr imr_poa)=0
 perform repo mode specific initialization
 
virtual int sync_load ()
 
virtual int persistent_update (const Server_Info_Ptr &info, bool add)=0
 perform server persistent update
 
virtual int persistent_update (const Activator_Info_Ptr &info, bool add)=0
 perform activator persistent update
 
virtual int persistent_remove (const ACE_CString &name, bool activator)=0
 perform persistent remove
 
virtual int recover_ior ()
 recover the ImR Locator's IOR from the persisted file
 
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.
 
AIMap activator_infos_
 The in-memory list of the activator information.
 

Detailed Description

Database containing all ImR persistent information.

Member Typedef Documentation

◆ AIMap

◆ SIMap

Constructor & Destructor Documentation

◆ Locator_Repository()

Locator_Repository::Locator_Repository ( const Options & opts,
CORBA::ORB_ptr orb )

◆ ~Locator_Repository()

Locator_Repository::~Locator_Repository ( )
virtual

Member Function Documentation

◆ activators() [1/2]

Locator_Repository::AIMap & Locator_Repository::activators ( )

Returns the internal hash map containing the activator information.

◆ activators() [2/2]

const Locator_Repository::AIMap & Locator_Repository::activators ( ) const

◆ add_activator()

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.

◆ add_server() [1/2]

int Locator_Repository::add_server ( const ACE_CString & fqname,
const ACE_CString & partial_ior,
const ACE_CString & ior,
ImplementationRepository::ServerObject_ptr svrobj )

◆ add_server() [2/2]

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

Add a new server to the Repository.

◆ add_server_i()

int Locator_Repository::add_server_i ( Server_Info * si)

◆ find_by_poa()

Server_Info_Ptr Locator_Repository::find_by_poa ( const ACE_CString & name)
private

◆ get_activator()

Activator_Info_Ptr Locator_Repository::get_activator ( const ACE_CString & name)

Returns information related to startup.

◆ get_active_server()

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

Returns information related to startup.

◆ has_activator()

bool Locator_Repository::has_activator ( const ACE_CString & name)

◆ init()

int Locator_Repository::init ( PortableServer::POA_ptr root_poa,
PortableServer::POA_ptr imr_poa,
const char * this_ior )

Initialize the repo.

◆ init_repo()

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

perform repo mode specific initialization

Implemented in Config_Backing_Store, No_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.

◆ lcase()

ACE_CString Locator_Repository::lcase ( const ACE_CString & s)
static

Convert to lower case.

◆ link_peers()

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.

◆ multicast()

bool Locator_Repository::multicast ( ) const

Indicate if multicast should be used.

◆ notify_remote_access()

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.

◆ persistent_remove()

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

perform persistent remove

Implemented in Config_Backing_Store, No_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.

◆ persistent_update() [1/2]

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

perform activator persistent update

Implemented in Config_Backing_Store, No_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.

◆ persistent_update() [2/2]

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

perform server persistent update

Implemented in Config_Backing_Store, No_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.

◆ recover_ior()

int Locator_Repository::recover_ior ( )
protectedvirtual

recover the ImR Locator's IOR from the persisted file

◆ registered()

bool Locator_Repository::registered ( ) const
protected

◆ remove_activator()

int Locator_Repository::remove_activator ( const ACE_CString & name)

Removes the activator from the Repository.

◆ remove_server()

int Locator_Repository::remove_server ( const ACE_CString & name,
ImR_Locator_i * imr_locator )

Removes the server from the Repository.

◆ repo_mode()

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

Indicate the persistence mode for the repository.

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

◆ report_ior()

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

report the ImR Locator's IOR

Reimplemented in Shared_Backing_Store.

◆ servers() [1/2]

Locator_Repository::SIMap & Locator_Repository::servers ( )

Returns the internal hash map containing the server information.

◆ servers() [2/2]

const Locator_Repository::SIMap & Locator_Repository::servers ( ) const

◆ setup_multicast()

int Locator_Repository::setup_multicast ( ACE_Reactor * reactor,
const char * imr_ior )
protected

◆ shutdown()

void Locator_Repository::shutdown ( )
virtual

Reimplemented in Shared_Backing_Store.

◆ sync_load()

int Locator_Repository::sync_load ( )
protectedvirtual

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

Reimplemented in Shared_Backing_Store.

◆ teardown_multicast()

void Locator_Repository::teardown_multicast ( )
protected

◆ unregister_if_address_reused()

int Locator_Repository::unregister_if_address_reused ( const ACE_CString & fqname,
const char * partial_ior,
ImR_Locator_i * imr_locator )

◆ update_activator()

int Locator_Repository::update_activator ( const Activator_Info_Ptr & info)

Update the associated information.

◆ update_server()

int Locator_Repository::update_server ( const Server_Info_Ptr & info)

Update the associated information.

Member Data Documentation

◆ activator_infos_

AIMap Locator_Repository::activator_infos_
private

The in-memory list of the activator information.

◆ imr_ior_

CORBA::String_var Locator_Repository::imr_ior_
protected

◆ ior_multicast_

TAO_IOR_Multicast Locator_Repository::ior_multicast_
protected

◆ opts_

const Options& Locator_Repository::opts_
protected

◆ orb_

const CORBA::ORB_var Locator_Repository::orb_
protected

◆ registered_

bool Locator_Repository::registered_
private

◆ server_infos_

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: