diff options
author | marina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-29 17:37:22 +0000 |
---|---|---|
committer | marina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-29 17:37:22 +0000 |
commit | 0c555d4a0da49ef4af42f75d4a8ade2aebba2255 (patch) | |
tree | 90b3213016c1ce8e6e0dba073a0d8a04dabab0dc /TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.h | |
parent | 4842d1cdcd70c5c7219f515d64e2938773ec13ff (diff) | |
download | ATCD-0c555d4a0da49ef4af42f75d4a8ade2aebba2255.tar.gz |
ChangeLogTag:Tue Jun 29 12:20:24 1999 Marina Spivak
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.h b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.h index 8e12d9d095b..d1a1f83a65d 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.h +++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.h @@ -106,6 +106,13 @@ public: protected: + int open_helper (size_t hash_table_size, + void *buffer); + // Helper to the <open> method. By isolating placement new into a + // separate method, we can deal with memory allocation failures more + // efficiently. If there is a problem in HASH_MAP constructor, we + // can clean up preallocated space. + int shared_bind (const char *id, const char *kind, CORBA::Object_ptr obj, @@ -165,6 +172,18 @@ public: virtual ~TAO_Persistent_Naming_Context (void); // Destructor. + // = Utility methods. + static CosNaming::NamingContext_ptr make_new_context (PortableServer::POA_ptr poa, + const char *poa_id, + size_t context_size, + TAO_Persistent_Context_Index *ind, + CORBA::Environment &ACE_TRY_ENV); + // This utility method factors out the code needed to create a new + // Persistent Naming Context servant and activate it under the + // specified POA with the specified id. This function is static so + // that the code can be used, both from inside the class (e.g., <new_context>), + // and from outside (e.g., Naming_Utils.cpp). + // = Methods not implemented in TAO_Hash_Naming_Context. virtual CosNaming::NamingContext_ptr new_context (CORBA::Environment &ACE_TRY_ENV); @@ -181,20 +200,33 @@ public: // are returned with a BindingIterator. In the naming context does // not contain any additional bindings <bi> returned as null. +protected: + + void set_cleanup_level (int level); + // Set <destroyed_> flag (inherited from TAO_Hash_Naming_Context) to + // <level>. Legal values for <destroyed_> are 0, 1, and 2. The + // values specify the extent of cleanup that should take place in the + // context's destructor: + // '0' - no cleanup (e.g., if the context goes out of scope, but + // it's state is to remain in persistent storage); + // '1' - free up the underlying data structure in persistent storage + // (e.g., if the initialization of this context was only partially completed + // due to some failures, and we need to roll back); + // '2' - free up the underlying data structure, and deregister this + // naming context from its <index_> (e.g., if the context had + // <destroy> method invoked and needs to be completely removed from existence). ACE_UINT32 *counter_; // Counter used for generation of POA ids for children Naming // Contexts. - TAO_Persistent_Bindings_Map * persistent_context_; + TAO_Persistent_Bindings_Map *persistent_context_; // A pointer to the underlying data structure used to store name // bindings. While our superclass (TAO_Hash_Naming_Context) also // maintains a pointer to the data structure, keeping this pointer // around saves us from the need to downcast when invoking // non-virtual methods. -protected: - TAO_Persistent_Context_Index *index_; // A pointer to the index object of this naming service: it keeps // track of all the naming contexts created. Every time we make a |