TAO_Implementation_Repository
2.4.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 |
class | Update_Handler |
Public Types | |
enum | ExtraParams { REPO_TYPE = 0, REPO_ID = 1 } |
enum | SyncType { NO_SYNC, INC_SYNC, FULL_SYNC } |
typedef ImplementationRepository::UpdatePushNotification_var | Replica_var |
typedef ImplementationRepository::UpdatePushNotification_ptr | Replica_ptr |
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, UniqueId, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_Mutex > | UniqueIdMap |
![]() | |
typedef std::pair< ACE_CString, ACE_CString > | NameValue |
typedef std::vector< NameValue > | NameValues |
![]() | |
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 | |
Shared_Backing_Store (const Options &opts, CORBA::ORB_ptr orb, ImR_Locator_i *loc_impl) | |
virtual | ~Shared_Backing_Store () |
virtual void | shutdown (void) |
virtual const ACE_TCHAR * | repo_mode () const |
indicate the persistence mode for the repository More... | |
virtual void | load_server (Server_Info *info, 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) |
virtual void | notify_remote_access (const char *id, ImplementationRepository::AAM_Status s) |
Update the peer's access state. More... | |
virtual int | report_ior (PortableServer::POA_ptr imr_poa) |
void | gen_ior (char *&ft_imr_ior) |
void | updates_available (const ImplementationRepository::UpdateInfoSeq &info, bool missed) |
void | process_updates (void) |
![]() | |
XML_Backing_Store (const Options &opts, CORBA::ORB_ptr orb, bool suppress_erase=false) | |
virtual | ~XML_Backing_Store (void) |
![]() | |
Locator_Repository (const Options &opts, CORBA::ORB_ptr orb) | |
virtual | ~Locator_Repository () |
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... | |
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, ImR_Locator_i *imr_locator) |
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... | |
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 () |
char * | locator_service_ior (const char *peer_ior) const |
int | connect_replicas (void) |
![]() | |
int | load_file (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) |
![]() | |
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 | |
void | bind_unique_id (const ACE_CString &key, UniqueIdMap &unique_ids, const UniqueId &id) |
map management helper functions More... | |
void | find_unique_id (const ACE_CString &key, UniqueIdMap &unique_ids, UniqueId &uid) |
void | update_unique_id (const ACE_CString &key, UniqueIdMap &unique_ids, Options::ImrType &entry_repo_type, unsigned int &entry_repo_id, UniqueId &uid) |
void | verify_unique_id (const ACE_CString &key, const XML_Backing_Store::NameValues &extra_params, UniqueIdMap &unique_ids) |
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 *list) |
int | connect_replicas (Replica_ptr this_replica) |
Private Attributes | |
const ACE_TString | listing_file_ |
the path and filename for the listings file 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... | |
UniqueIdMap | server_uids_ |
map for server unique ids More... | |
UniqueIdMap | 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... | |
ImR_Locator_i * | loc_impl_ |
reference to the locator implmentation More... | |
Replicator | replicator_ |
ImplementationRepository::UpdateInfoSeq | updates_ |
bool | notified_ |
Shared_Backing_Store::Update_Handler | update_handler_ |
Additional Inherited Members | |
![]() | |
static ACE_CString | lcase (const ACE_CString &s) |
convert to lower case More... | |
![]() | |
static int | load_file (const ACE_TString &filename, ACEXML_DefaultHandler &xml_handler, unsigned int debug, FILE *open_file=0) |
![]() | |
const ACE_TString | filename_ |
the filename indicated in the Options for the backing store More... | |
![]() | |
const Options & | opts_ |
TAO_IOR_Multicast | ior_multicast_ |
const CORBA::ORB_var | orb_ |
CORBA::String_var | imr_ior_ |
XML backing store containing all ImR persistent information in multiple files shared between multiple Locators.
typedef ImplementationRepository::UpdatePushNotification_ptr Shared_Backing_Store::Replica_ptr |
typedef ImplementationRepository::UpdatePushNotification_var Shared_Backing_Store::Replica_var |
typedef ACE_Hash_Map_Manager_Ex<ACE_CString, UniqueId, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> Shared_Backing_Store::UniqueIdMap |
|
private |
Shared_Backing_Store::Shared_Backing_Store | ( | const Options & | opts, |
CORBA::ORB_ptr | orb, | ||
ImR_Locator_i * | loc_impl | ||
) |
|
virtual |
|
private |
map management helper functions
|
protected |
|
private |
connect this replica to its peer replica
this_replica | a pointer to this Replica object |
|
private |
void Shared_Backing_Store::gen_ior | ( | char *& | ft_imr_ior | ) |
|
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 |
recover a persisted Server_Info object
info | points to a newly created Server_Info object |
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 |
create the Fault Tolerant ImR Locator IOR, using the peer_ior and this ImR Locator's IOR
|
virtual |
Update the peer's access state.
Reimplemented from Locator_Repository.
|
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.
void Shared_Backing_Store::process_updates | ( | void | ) |
|
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.
|
virtual |
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.
|
virtual |
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 |
void Shared_Backing_Store::updates_available | ( | const ImplementationRepository::UpdateInfoSeq & | info, |
bool | missed | ||
) |
|
private |
|
private |
write content to the listings file and optionally its backup
list | 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 |
reference to the locator implmentation
|
private |
the ior for just this ImR Locator
|
private |
|
private |
|
private |
next unique repo id
|
private |
extra parameters for XML
|
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
|
private |
|
private |