TAO_Implementation_Repository
2.2.0
|
XML backing store containing all ImR persistent information in multiple files shared between multiple Locators. More...
#include <Shared_Backing_Store.h>
Classes | |
class | LocatorListings_XMLHandler |
struct | UniqueId |
Public Member Functions | |
Shared_Backing_Store (const Options &opts, CORBA::ORB_ptr orb) | |
virtual | ~Shared_Backing_Store () |
virtual const ACE_TCHAR * | repo_mode () const |
indicate the persistence mode for the repository More... | |
virtual void | notify_updated_server (const ImplementationRepository::ServerUpdate &server) |
virtual void | notify_updated_activator (const ImplementationRepository::ActivatorUpdate &activator) |
virtual void | register_replica (ImplementationRepository::UpdatePushNotification_ptr replica, char *&ft_imr_ior, ImplementationRepository::SequenceNum_out seq_num) |
virtual void | load_server (const ACE_CString &server_id, const ACE_CString &server_name, bool jacorb_server, const ACE_CString &activator_name, const ACE_CString &cmdline, const ImplementationRepository::EnvironmentList &env_vars, const ACE_CString &working_dir, ImplementationRepository::ActivationMode actmode, int start_limit, const ACE_CString &partial_ior, const ACE_CString &ior, bool server_started, const NameValues &extra_params) |
virtual void | load_activator (const ACE_CString &activator_name, long token, const ACE_CString &ior, const NameValues &extra_params) |
Public Member Functions inherited from XML_Backing_Store | |
XML_Backing_Store (const Options &opts, CORBA::ORB_ptr orb, bool suppress_erase=false) | |
virtual | ~XML_Backing_Store () |
Public Member Functions inherited from Locator_Repository | |
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 |
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 | |
typedef ImplementationRepository::UpdatePushNotification_var | Replica_var |
Protected Member Functions | |
virtual int | init_repo (PortableServer::POA_ptr imr_poa) |
virtual int | persistent_update (const Server_Info_Ptr &info, bool add) |
perform server persistent update More... | |
virtual int | persistent_update (const Activator_Info_Ptr &info, bool add) |
perform activator persistent update More... | |
virtual int | persistent_remove (const ACE_CString &name, bool activator) |
perform persistent remove More... | |
virtual int | sync_load () |
virtual int | report_ior (PortableServer::POA_ptr imr_poa) |
char * | locator_service_ior (const char *peer_ior) const |
Protected Member Functions inherited from XML_Backing_Store | |
int | load (const ACE_TString &filename, FILE *open_file=0) |
void | persist (FILE *fp, const Server_Info &info, const char *tag_prepend, const NameValues &name_values=NameValues()) |
void | persist (FILE *fp, const Activator_Info &info, const char *tag_prepend, const NameValues &name_values=NameValues()) |
void | create_server (bool server_started, const Server_Info_Ptr &si) |
Protected Member Functions inherited from Locator_Repository | |
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 |
Private Types | |
typedef ACE_Strong_Bound_Ptr < LocatorListings_XMLHandler, ACE_Null_Mutex > | XMLHandler_Ptr |
Private Member Functions | |
ACE_CString | replica_ior_filename (bool peer_ior_file) const |
XMLHandler_Ptr | get_listings (Lockable_File &listing_lf, bool only_changes) const |
int | persistent_load (bool only_changes) |
int | persist_listings (Lockable_File &listing_lf) |
void | write_listing (FILE *) |
int | connect_replicas (Replica_ptr this_replica) |
Private Attributes | |
const ACE_TString | listing_file_ |
the path and filename for the listings file More... | |
Replica_var | peer_replica_ |
the path and filename for the listings file More... | |
ImplementationRepository::SequenceNum | seq_num_ |
ImplementationRepository::SequenceNum | replica_seq_num_ |
the current sequence number last reported by the peer replica More... | |
const Options::ImrType | imr_type_ |
the imr type of this Shared_Backing_Store More... | |
SyncType | sync_needed_ |
the current type of sync needed by the repo More... | |
std::set< ACE_TString > | sync_files_ |
CORBA::String_var | non_ft_imr_ior_ |
the ior for just this ImR Locator More... | |
const char * | IMR_REPLICA [3] |
an array associating ImrType with the appropriate name More... | |
ServerUIMap | server_uids_ |
map for server unique ids More... | |
ActivatorUIMap | activator_uids_ |
map for activator unique ids More... | |
unsigned int | repo_id_ |
next unique repo id More... | |
XML_Backing_Store::NameValues | repo_values_ |
extra parameters for XML More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from XML_Backing_Store | |
static int | load (const ACE_TString &filename, ACEXML_DefaultHandler &xml_handler, unsigned int debug, FILE *open_file=0) |
Protected Attributes inherited from XML_Backing_Store | |
const ACE_TString | filename_ |
the filename indicated in the Options for the backing store More... | |
XML backing store containing all ImR persistent information in multiple files shared between multiple Locators.
typedef ACE_Hash_Map_Manager_Ex<ActivatorKey, UniqueId, ACE_Hash<ActivatorKey>, ACE_Equal_To<ActivatorKey>, ACE_Null_Mutex> Shared_Backing_Store::ActivatorUIMap |
typedef ImplementationRepository::UpdatePushNotification_ptr Shared_Backing_Store::Replica_ptr |
|
static |
typedef ACE_Hash_Map_Manager_Ex<ServerKey, UniqueId, ACE_Hash<ServerKey>, ACE_Equal_To<ServerKey>, ACE_Null_Mutex> Shared_Backing_Store::ServerUIMap |
|
private |
Shared_Backing_Store::Shared_Backing_Store | ( | const Options & | opts, |
CORBA::ORB_ptr | orb | ||
) |
|
virtual |
|
private |
connect this replica to its peer replica
this_replica | a pointer to this Replica object |
|
private |
get the listings file contents
listing_lf | a Lockable_File for the listings file that will be locked when the function returns |
only_changes | if only changes to the repo should be reported |
|
protectedvirtual |
perform shared backing store specific initialization (activates this Shared_Backing_Store as the "ImR_Replica", trys to connect to the peer replica, unless it is a STANDALONE_IMR, clears out the persisted store if needed, and loads the repo from the persisted store)
Reimplemented from XML_Backing_Store.
|
virtual |
create the Activator_Info activator object
activator_name | the Activator_Info name |
token | the Activator_Info token |
ior | the Activator_Info ior |
extra_params | extra name value pairs that were reported for the activator |
Reimplemented from XML_Backing_Store.
|
virtual |
create the Server_Info server object
server_id | the Server_Info server_id |
server_name | the Server_Info server_name |
activator_name | the Server_Info activator |
cmdline | the Server_Info cmdline |
env_vars | the Server_Info env_vars |
workin_dir | the Server_Info dir |
actmode | the Server_Info activation_mode |
start_limit | the Server_Info start_limit |
partial_ior | the Server_Info partial_ior |
ior | the Server_Info ior |
server_started | indicates if the server object existed when data was persisted |
extra_params | extra name value pairs that were reported for the server |
Reimplemented from XML_Backing_Store.
|
protected |
|
virtual |
provide the implementation for being notified of a activator update
|
virtual |
provide the implementation for being notified of a server update
|
private |
persistent the listings file
listing_lf | a Lockable_File for the listings file that will be locked when the function returns |
|
private |
perform a persistent load from the backing store
only_changes | if only changes to the repo should be loaded |
|
protectedvirtual |
perform persistent remove
Reimplemented from XML_Backing_Store.
|
protectedvirtual |
perform server persistent update
Reimplemented from XML_Backing_Store.
|
protectedvirtual |
perform activator persistent update
Reimplemented from XML_Backing_Store.
|
virtual |
|
private |
determine the filename where the replica ior is reported
peer_ior_file | if this is the filename for the peer replica or this replica |
|
virtual |
indicate the persistence mode for the repository
Reimplemented from XML_Backing_Store.
|
protectedvirtual |
calls Locator_Repository::report_ior with the Fault Tolerant ImR Locator's IOR if available, otherwise reporting the ior is delayed until the peer replica registers with this replica
Reimplemented from Locator_Repository.
|
protectedvirtual |
perform sync of repo with backing store uses sync_needed_ and sync_files_ to determine what to update
Reimplemented from Locator_Repository.
|
private |
write content to the listings file and optionally its backup
File | pointer to write to. Can be primary or backup. |
|
private |
map for activator unique ids
|
private |
an array associating ImrType with the appropriate name
|
private |
the imr type of this Shared_Backing_Store
|
private |
the path and filename for the listings file
|
private |
the ior for just this ImR Locator
|
private |
the path and filename for the listings file
|
private |
the current sequence number last reported by the peer replica
|
private |
next unique repo id
|
private |
extra parameters for XML
|
private |
the current sequence number for reporting changes made directly to this repo
|
private |
map for server unique ids
|
private |
the server and activator files that need to be updated for sync_needed_ == INC_SYNC
|
private |
the current type of sync needed by the repo