TAO
2.3.3
|
Table that maintains the set of ObjectKey's seen by the ORB. More...
#include <ObjectKey_Table.h>
Public Member Functions | |
ObjectKey_Table (void) | |
Default Constructor and destructor.. More... | |
~ObjectKey_Table (void) | |
int | destroy (void) |
Iterates and unbinds the contents of the table. More... | |
int | bind (const ObjectKey &key, Refcounted_ObjectKey *&key_new) |
Bind the ObjectKey in the table. More... | |
int | unbind (TAO::Refcounted_ObjectKey *&key) |
Unbind an ObjectKey from the table. More... | |
Protected Member Functions | |
int | bind_i (const ObjectKey &key, Refcounted_ObjectKey *&key_new) |
Implementation for bind (). More... | |
int | unbind_i (Refcounted_ObjectKey *&key) |
Implementation for unbind (). More... | |
Private Types | |
typedef ACE_RB_Tree< TAO::ObjectKey, TAO::Refcounted_ObjectKey *, TAO::Less_Than_ObjectKey, ACE_Null_Mutex > | TABLE |
Some useful typedefs. More... | |
Private Member Functions | |
ObjectKey_Table (const ObjectKey_Table &) | |
ObjectKey_Table & | operator= (const ObjectKey_Table &) |
Private Attributes | |
TAO_SYNCH_MUTEX | lock_ |
Lock for the table. More... | |
TABLE | table_ |
Table that contains the data. More... | |
Table that maintains the set of ObjectKey's seen by the ORB.
The ORB maintains one table for the whole ORB. ObjectKeys generated by the ORB or the ones seen by the ORB from remote ORB's are stored here. The ObjectKeys are stored through a wrapper which encapsulates the reference count on them. This class actually provides the synchronization mechanism for manipulating the reference counts on the object keys provided by the wrapper class.
This class does not offer a find () call with a reason. The call to bind () will return a pointer which is expected to be cached by the client/caller and use the pointer in every invocation.
|
private |
Some useful typedefs.
TAO::ObjectKey_Table::ObjectKey_Table | ( | void | ) |
Default Constructor and destructor..
TAO::ObjectKey_Table::~ObjectKey_Table | ( | void | ) |
|
private |
int TAO::ObjectKey_Table::bind | ( | const ObjectKey & | key, |
Refcounted_ObjectKey *& | key_new | ||
) |
Bind the ObjectKey in the table.
Bind an ObjectKey in the table and return a pointer to the Refcounted_ObjectKey which the client can use. If the ObjectKey is already available in the table, this operation just increments the refcount on the ObjectKey. If the ObjectKey is new it is bounded to the table. Returns a 0 on success and a -1 on failure.
|
protected |
Implementation for bind ().
int TAO::ObjectKey_Table::destroy | ( | void | ) |
Iterates and unbinds the contents of the table.
|
private |
int TAO::ObjectKey_Table::unbind | ( | TAO::Refcounted_ObjectKey *& | key | ) |
Unbind an ObjectKey from the table.
|
protected |
Implementation for unbind ().
|
private |
Lock for the table.
|
private |
Table that contains the data.