ACE 8.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK > Class Template Reference

Maintaining accesses Local Name Server Database. Allows to add NameBindings, change them, remove them and resolve NameBindings. More...

#include <Local_Name_Space_T.h>

Inheritance diagram for ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >:
Inheritance graph
[legend]
Collaboration diagram for ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >:
Collaboration graph
[legend]

Public Types

typedef ACE_Allocator_Adapter< ACE_Malloc< ACE_MEM_POOL_2, ACE_LOCK > > ALLOCATOR
 

Public Member Functions

 ACE_Local_Name_Space ()
 "Do-nothing" constructor.
 
 ACE_Local_Name_Space (ACE_Naming_Context::Context_Scope_Type scope_in, ACE_Name_Options *name_options)
 
int open (ACE_Naming_Context::Context_Scope_Type scope_in)
 
 ~ACE_Local_Name_Space ()
 
virtual int bind (const ACE_NS_WString &name, const ACE_NS_WString &value, const char *type="")
 Bind a new name to a naming context (Wide character strings).
 
virtual int rebind (const ACE_NS_WString &name, const ACE_NS_WString &value, const char *type="")
 
virtual int unbind (const ACE_NS_WString &name)
 
virtual int unbind_i (const ACE_NS_WString &name)
 
virtual int resolve (const ACE_NS_WString &name, ACE_NS_WString &value, char *&type)
 
virtual int resolve_i (const ACE_NS_WString &name, ACE_NS_WString &value, char *&type)
 
virtual int list_names (ACE_WSTRING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_names_i (ACE_WSTRING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_values (ACE_WSTRING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_values_i (ACE_WSTRING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_types (ACE_WSTRING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_types_i (ACE_WSTRING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_name_entries (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_name_entries_i (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_value_entries (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_value_entries_i (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_type_entries (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 
virtual int list_type_entries_i (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 
virtual void dump () const
 Dump the state of the object.
 
virtual void dump_i () const
 
- Public Member Functions inherited from ACE_Name_Space
virtual ~ACE_Name_Space ()
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 

Private Member Functions

int remap (EXCEPTION_POINTERS *ep)
 Remap the backing store.
 
int shared_bind (const ACE_NS_WString &name, const ACE_NS_WString &value, const char *type, int rebind)
 Factor out code from bind() and rebind().
 
int shared_bind_i (const ACE_NS_WString &name, const ACE_NS_WString &value, const char *type, int rebind)
 
int create_manager ()
 
int create_manager_i ()
 

Private Attributes

ALLOCATORallocator_
 Pointer to the allocator.
 
ACE_Name_Space_Map< ALLOCATOR > * name_space_map_
 Pointer to the allocated map manager.
 
ACE_Naming_Context::Context_Scope_Type ns_scope_
 
ACE_Name_Optionsname_options_
 Keep track of the options such as database name etc.
 
ACE_TCHAR context_file_ [MAXPATHLEN+MAXNAMELEN]
 Name of the file used as the backing store.
 
ACE_LOCK * lock_
 Synchronization variable.
 

Detailed Description

template<ACE_MEM_POOL_1, class ACE_LOCK>
class ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >

Maintaining accesses Local Name Server Database. Allows to add NameBindings, change them, remove them and resolve NameBindings.

Manages a Naming Service for a local name space which includes bindings for node_local and host_local naming contexts. All strings are stored in wide character format. A Name Binding consists of a name (that's the key), a value string and an optional type string (no wide chars).

Member Typedef Documentation

◆ ALLOCATOR

Constructor & Destructor Documentation

◆ ACE_Local_Name_Space() [1/2]

"Do-nothing" constructor.

◆ ACE_Local_Name_Space() [2/2]

Specifies the scope of this namespace, opens and memory-maps the associated file (if accessible) or contacts the dedicated name server process for NET_LOCAL namespace.

◆ ~ACE_Local_Name_Space()

Destructor, do some cleanup :TBD: last dtor should "compress" file

Member Function Documentation

◆ bind()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::bind ( const ACE_NS_WString & name,
const ACE_NS_WString & value,
const char * type = "" )
virtual

Bind a new name to a naming context (Wide character strings).

Implements ACE_Name_Space.

◆ create_manager()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
class ACE_LOCK int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::create_manager ( )
private

Allocate the appropriate type of map manager that stores the key/value binding.

◆ create_manager_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::create_manager_i ( )
private

◆ dump()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
void ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::dump ( ) const
virtual

Dump the state of the object.

Implements ACE_Name_Space.

◆ dump_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
void ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::dump_i ( ) const
virtual

◆ list_name_entries()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_name_entries ( ACE_BINDING_SET & set,
const ACE_NS_WString & pattern )
virtual

Get a set of names matching a specified pattern (wchars). Matching means the names must begin with the pattern string. Returns the complete binding associated each pattern match.

Implements ACE_Name_Space.

◆ list_name_entries_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_name_entries_i ( ACE_BINDING_SET & set,
const ACE_NS_WString & pattern )
virtual

◆ list_names()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_names ( ACE_WSTRING_SET & set,
const ACE_NS_WString & pattern )
virtual

Get a set of names matching a specified pattern (wchars). Matching means the names must begin with the pattern string.

Implements ACE_Name_Space.

◆ list_names_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_names_i ( ACE_WSTRING_SET & set,
const ACE_NS_WString & pattern )
virtual

◆ list_type_entries()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_type_entries ( ACE_BINDING_SET & set,
const ACE_NS_WString & pattern )
virtual

Get a set of types matching a specified pattern (wchars). Matching means the types must begin with the pattern string. Returns the complete binding associated each pattern match.

Implements ACE_Name_Space.

◆ list_type_entries_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_type_entries_i ( ACE_BINDING_SET & set,
const ACE_NS_WString & pattern )
virtual

◆ list_types()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_types ( ACE_WSTRING_SET & set,
const ACE_NS_WString & pattern )
virtual

Get a set of types matching a specified pattern (wchars). Matching means the types must begin with the pattern string.

Implements ACE_Name_Space.

◆ list_types_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_types_i ( ACE_WSTRING_SET & set,
const ACE_NS_WString & pattern )
virtual

◆ list_value_entries()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_value_entries ( ACE_BINDING_SET & set,
const ACE_NS_WString & pattern )
virtual

Get a set of values matching a specified pattern (wchars). Matching means the values must begin with the pattern string. Returns the complete binding associated each pattern match.

Implements ACE_Name_Space.

◆ list_value_entries_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_value_entries_i ( ACE_BINDING_SET & set,
const ACE_NS_WString & pattern )
virtual

◆ list_values()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_values ( ACE_WSTRING_SET & set,
const ACE_NS_WString & pattern )
virtual

Get a set of values matching a specified pattern (wchars). Matching means the values must begin with the pattern string.

Implements ACE_Name_Space.

◆ list_values_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::list_values_i ( ACE_WSTRING_SET & set,
const ACE_NS_WString & pattern )
virtual

◆ open()

Specifies the scope of this namespace, opens and memory-maps the associated file (if accessible) or contacts the dedicated name server process for NET_LOCAL namespace.

◆ rebind()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::rebind ( const ACE_NS_WString & name,
const ACE_NS_WString & value,
const char * type = "" )
virtual

Overwrite the value or type of an existing name in a ACE_Local_Name_Space or bind a new name to the context, if it didn't exist yet. (Wide character strings interface).

Implements ACE_Name_Space.

◆ remap()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::remap ( EXCEPTION_POINTERS * ep)
private

Remap the backing store.

◆ resolve()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::resolve ( const ACE_NS_WString & name,
ACE_NS_WString & value,
char *& type )
virtual

Get value and type of a given name binding (Wide chars). The caller is responsible for deleting type!

Implements ACE_Name_Space.

◆ resolve_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::resolve_i ( const ACE_NS_WString & name,
ACE_NS_WString & value,
char *& type )
virtual

◆ shared_bind()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::shared_bind ( const ACE_NS_WString & name,
const ACE_NS_WString & value,
const char * type,
int rebind )
private

Factor out code from bind() and rebind().

◆ shared_bind_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::shared_bind_i ( const ACE_NS_WString & name,
const ACE_NS_WString & value,
const char * type,
int rebind )
private

◆ unbind()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::unbind ( const ACE_NS_WString & name)
virtual

Delete a name from a ACE_Local_Name_Space (Wide character strings Interface).

Implements ACE_Name_Space.

◆ unbind_i()

template<ACE_MEM_POOL_1 , class ACE_LOCK >
int ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::unbind_i ( const ACE_NS_WString & name)
virtual

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

template<ACE_MEM_POOL_1 , class ACE_LOCK >
ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::ACE_ALLOC_HOOK_DECLARE

◆ allocator_

template<ACE_MEM_POOL_1 , class ACE_LOCK >
ALLOCATOR* ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::allocator_
private

Pointer to the allocator.

◆ context_file_

template<ACE_MEM_POOL_1 , class ACE_LOCK >
ACE_TCHAR ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::context_file_[MAXPATHLEN+MAXNAMELEN]
private

Name of the file used as the backing store.

◆ lock_

template<ACE_MEM_POOL_1 , class ACE_LOCK >
ACE_LOCK* ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::lock_
private

Synchronization variable.

◆ name_options_

template<ACE_MEM_POOL_1 , class ACE_LOCK >
ACE_Name_Options* ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::name_options_
private

Keep track of the options such as database name etc.

◆ name_space_map_

template<ACE_MEM_POOL_1 , class ACE_LOCK >
ACE_Name_Space_Map<ALLOCATOR>* ACE_Local_Name_Space< ACE_MEM_POOL_1, ACE_LOCK >::name_space_map_
private

Pointer to the allocated map manager.

◆ ns_scope_

Scope of this naming context (e.g., PROC_LOCAL, NODE_LOCAL, or NET_LOCAL).


The documentation for this class was generated from the following files: