#include <IOR_Table_Impl.h>
Inheritance diagram for TAO_IOR_Table_Impl:
Public Member Functions | |
TAO_IOR_Table_Impl (void) | |
Constructor. | |
char * | find (const char *object_key) throw ( CORBA::SystemException, IORTable::NotFound ) |
Find the object, using the locator if it is not on the table. | |
The IORTable::Table methods | |
virtual void | bind (const char *object_key, const char *IOR) throw ( CORBA::SystemException, IORTable::AlreadyBound ) |
virtual void | rebind (const char *object_key, const char *IOR) throw ( CORBA::SystemException ) |
virtual void | unbind (const char *object_key) throw ( CORBA::SystemException, IORTable::NotFound ) |
virtual void | set_locator (IORTable::Locator_ptr the_locator) throw ( CORBA::SystemException ) |
Private Types | |
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, ACE_CString, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_Mutex > | Map |
Private Attributes | |
Map | map_ |
The map. | |
IORTable::Locator_var | locator_ |
The locator. | |
TAO_SYNCH_MUTEX | lock_ |
Synchronization. |
|
Definition at line 99 of file IOR_Table_Impl.h. |
|
Constructor.
Definition at line 20 of file IOR_Table_Impl.cpp.
00021 { 00022 } |
|
Implements IORTable::Table. Definition at line 51 of file IOR_Table_Impl.cpp. References ACE_GUARD, ACE_THROW, and TAO_SYNCH_MUTEX.
00060 { 00061 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); 00062 if (this->map_.bind (object_key, IOR) != 0) 00063 ACE_THROW (IORTable::AlreadyBound ()); 00064 } |
|
Find the object, using the locator if it is not on the table.
Definition at line 25 of file IOR_Table_Impl.cpp. References ACE_CString, ACE_ENV_ARG_PARAMETER, ACE_GUARD_RETURN, ACE_THROW_RETURN, CORBA::is_nil(), CORBA::string_dup(), and TAO_SYNCH_MUTEX.
00031 { 00032 // We don't want the lock held during locate, so make it go out 00033 // of scope before then. 00034 { 00035 ACE_CString key (object_key); 00036 ACE_CString ior; 00037 00038 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0); 00039 if (this->map_.find (key, ior) == 0) 00040 { 00041 return CORBA::string_dup (ior.c_str ()); 00042 } 00043 if (CORBA::is_nil (this->locator_.in ())) 00044 ACE_THROW_RETURN (IORTable::NotFound (), 0); 00045 } 00046 00047 return this->locator_->locate (object_key ACE_ENV_ARG_PARAMETER); 00048 } |
|
Implements IORTable::Table. Definition at line 67 of file IOR_Table_Impl.cpp. References ACE_GUARD, and TAO_SYNCH_MUTEX.
|
|
Definition at line 96 of file IOR_Table_Impl.cpp. References IORTable::Locator::_duplicate(), ACE_GUARD, IORTable::Locator_ptr, and TAO_SYNCH_MUTEX.
00103 { 00104 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); 00105 this->locator_ = IORTable::Locator::_duplicate (locator); 00106 } |
|
Implements IORTable::Table. Definition at line 81 of file IOR_Table_Impl.cpp. References ACE_GUARD, ACE_THROW, and TAO_SYNCH_MUTEX.
00089 { 00090 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); 00091 if (this->map_.unbind (object_key) != 0) 00092 ACE_THROW (IORTable::NotFound ()); 00093 } |
|
The locator.
Definition at line 105 of file IOR_Table_Impl.h. |
|
Synchronization.
Definition at line 108 of file IOR_Table_Impl.h. |
|
The map.
Definition at line 102 of file IOR_Table_Impl.h. |