TAO_Implementation_Repository
2.2.2
|
Database containing all ImR persistent information. More...
#include <Locator_Repository.h>
Public Types | |
typedef ACE_CString | ServerKey |
typedef ACE_Hash_Map_Manager_Ex < ServerKey, Server_Info_Ptr, ACE_Hash< ServerKey > , ACE_Equal_To< ServerKey > , ACE_Null_Mutex > | SIMap |
typedef ACE_CString | ActivatorKey |
typedef ACE_Hash_Map_Manager_Ex < ActivatorKey, Activator_Info_Ptr, ACE_Hash < ActivatorKey >, ACE_Equal_To < ActivatorKey > , ACE_Null_Mutex > | AIMap |
Public Member Functions | |
Locator_Repository (const Options &opts, CORBA::ORB_ptr orb) | |
virtual | ~Locator_Repository () |
int | unregister_if_address_reused (const ACE_CString &server_id, const ACE_CString &name, const char *partial_ior, ImR_Locator_i *imr_locator) |
int | add_server (const ACE_CString &server_id, const ACE_CString &name, bool jacorbs, const ACE_CString &aname, const ACE_CString &startup_command, const ImplementationRepository::EnvironmentList &environment_vars, const ACE_CString &working_dir, ImplementationRepository::ActivationMode activation, int start_limit, const ACE_CString &partial_ior=ACE_CString(""), const ACE_CString &ior=ACE_CString(""), ImplementationRepository::ServerObject_ptr svrobj=ImplementationRepository::ServerObject::_nil()) |
Add a new server to the Repository. More... | |
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... | |
Server_Info_Ptr | get_server (const ACE_CString &name) |
Returns information related to startup. More... | |
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... | |
SIMap & | servers (void) |
Returns the internal hash map containing the server information. More... | |
const SIMap & | servers (void) const |
AIMap & | activators (void) |
Returns the internal hash map containing the activator information. More... | |
const AIMap & | activators (void) const |
virtual const ACE_TCHAR * | repo_mode () 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... | |
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 () |
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 | report_ior (PortableServer::POA_ptr imr_poa) |
report the ImR Locator's IOR 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 Options & | opts_ |
TAO_IOR_Multicast | ior_multicast_ |
const CORBA::ORB_var | orb_ |
CORBA::String_var | imr_ior_ |
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... | |
Database containing all ImR persistent information.
typedef ACE_Hash_Map_Manager_Ex<ActivatorKey, Activator_Info_Ptr, ACE_Hash<ActivatorKey>, ACE_Equal_To<ActivatorKey>, ACE_Null_Mutex> Locator_Repository::AIMap |
typedef ACE_Hash_Map_Manager_Ex<ServerKey, Server_Info_Ptr, ACE_Hash<ServerKey>, ACE_Equal_To<ServerKey>, ACE_Null_Mutex> Locator_Repository::SIMap |
Locator_Repository::Locator_Repository | ( | const Options & | opts, |
CORBA::ORB_ptr | orb | ||
) |
|
virtual |
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 & | server_id, |
const ACE_CString & | name, | ||
bool | jacorbs, | ||
const ACE_CString & | aname, | ||
const ACE_CString & | startup_command, | ||
const ImplementationRepository::EnvironmentList & | environment_vars, | ||
const ACE_CString & | working_dir, | ||
ImplementationRepository::ActivationMode | activation, | ||
int | start_limit, | ||
const ACE_CString & | partial_ior = ACE_CString("") , |
||
const ACE_CString & | ior = ACE_CString("") , |
||
ImplementationRepository::ServerObject_ptr | svrobj = ImplementationRepository::ServerObject::_nil() |
||
) |
Add a new server to the Repository.
Activator_Info_Ptr Locator_Repository::get_activator | ( | const ACE_CString & | name | ) |
Returns information related to startup.
Server_Info_Ptr Locator_Repository::get_server | ( | const ACE_CString & | name | ) |
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 No_Backing_Store, Shared_Backing_Store, XML_Backing_Store, and Config_Backing_Store.
|
static |
convert to lower case
bool Locator_Repository::multicast | ( | ) | const |
Indicate if multicast should be used.
|
protectedpure virtual |
perform persistent remove
Implemented in No_Backing_Store, Shared_Backing_Store, XML_Backing_Store, and Config_Backing_Store.
|
protectedpure virtual |
perform server persistent update
Implemented in No_Backing_Store, Shared_Backing_Store, XML_Backing_Store, and Config_Backing_Store.
|
protectedpure virtual |
perform activator persistent update
Implemented in No_Backing_Store, Shared_Backing_Store, XML_Backing_Store, and Config_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 | ) |
Removes the server from the Repository.
|
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.
|
protectedvirtual |
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 |
|
protected |
|
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 & | server_id, |
const ACE_CString & | name, | ||
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.