TAO_Implementation_Repository 4.0.3
|
Database containing all ImR persistent information. More...
#include <Locator_Repository.h>
Public Types | |
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, Server_Info_Ptr, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_Mutex > | SIMap |
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, Activator_Info_Ptr, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_Mutex > | AIMap |
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. | |
SIMap & | servers () |
Returns the internal hash map containing the server information. | |
const SIMap & | servers () const |
AIMap & | activators () |
Returns the internal hash map containing the activator information. | |
const AIMap & | activators () const |
virtual const ACE_TCHAR * | repo_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 Options & | opts_ |
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. | |
Database containing all ImR persistent information.
typedef ACE_Hash_Map_Manager_Ex<ACE_CString, Activator_Info_Ptr, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> Locator_Repository::AIMap |
typedef ACE_Hash_Map_Manager_Ex<ACE_CString, Server_Info_Ptr, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> Locator_Repository::SIMap |
Locator_Repository::Locator_Repository | ( | const Options & | opts, |
CORBA::ORB_ptr | orb ) |
|
virtual |
Locator_Repository::AIMap & Locator_Repository::activators | ( | ) |
Returns the internal hash map containing the activator information.
const Locator_Repository::AIMap & Locator_Repository::activators | ( | ) | 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 ACE_CString & | partial_ior, | ||
const ACE_CString & | ior, | ||
ImplementationRepository::ServerObject_ptr | svrobj ) |
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_i | ( | Server_Info * | si | ) |
|
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.
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.
|
protectedpure virtual |
perform repo mode specific initialization
Implemented in Config_Backing_Store, No_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.
|
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.
|
virtual |
Update the peer's access state.
Reimplemented in Shared_Backing_Store.
|
protectedpure virtual |
perform persistent remove
Implemented in Config_Backing_Store, No_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.
|
protectedpure virtual |
perform activator persistent update
Implemented in Config_Backing_Store, No_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.
|
protectedpure virtual |
perform server persistent update
Implemented in Config_Backing_Store, No_Backing_Store, Shared_Backing_Store, and XML_Backing_Store.
|
protectedvirtual |
recover the ImR Locator's IOR from the persisted file
|
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, |
ImR_Locator_i * | imr_locator ) |
Removes the server from the Repository.
|
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.
|
virtual |
report the ImR Locator's IOR
Reimplemented in Shared_Backing_Store.
Locator_Repository::SIMap & Locator_Repository::servers | ( | ) |
Returns the internal hash map containing the server information.
const Locator_Repository::SIMap & Locator_Repository::servers | ( | ) | const |
|
protected |
|
virtual |
Reimplemented in Shared_Backing_Store.
|
protectedvirtual |
perform sync of repo with backing store defaults to no-op, only shared backing stores need to sync
Reimplemented in Shared_Backing_Store.
|
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.
|
private |
The in-memory list of the activator information.
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
The in-memory list of the server information.