TAO::Cache_IntId Class Reference

Helper class for TAO_Transport_Cache_Manager. More...

#include <Cache_Entries.h>

Collaboration diagram for TAO::Cache_IntId:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Cache_IntId (void)
 Constructor.

 Cache_IntId (TAO_Transport *transport)
 Constructor.

 Cache_IntId (const Cache_IntId &rhs)
 Copy constructor.

 ~Cache_IntId (void)
 Destructor.

Cache_IntIdoperator= (const Cache_IntId &rhs)
 Assignment operator (does copy memory).

bool operator== (const Cache_IntId &rhs) const
 Equality comparison operator (must match both id_ and kind_).

bool operator!= (const Cache_IntId &rhs) const
 Inequality comparison operator.

TAO_Transporttransport (void)
 Return the underlying transport.

const TAO_Transporttransport (void) const
 Return the underlying transport.

void recycle_state (Cache_Entries_State new_state)
 Set .

Cache_Entries_State recycle_state (void)
 Get .

TAO_Transportrelinquish_transport (void)

Private Attributes

TAO_Transporttransport_
 The transport that needs to be cached.

Cache_Entries_State recycle_state_
 The state of the handle.


Detailed Description

Helper class for TAO_Transport_Cache_Manager.

Helper class that wraps the part of the Map or table holding the Transport state.: unifies data items, so they can be stored together as a for a in a table holding the state of the Transport Cache.

Definition at line 70 of file Cache_Entries.h.


Constructor & Destructor Documentation

ACE_INLINE TAO::Cache_IntId::Cache_IntId void   ) 
 

Constructor.

Definition at line 10 of file Cache_Entries.inl.

References TAO::ENTRY_UNKNOWN.

00011     : transport_ (0),
00012       recycle_state_ (ENTRY_UNKNOWN)
00013   {
00014   }

TAO::Cache_IntId::Cache_IntId TAO_Transport transport  ) 
 

Constructor.

Definition at line 20 of file Cache_Entries.cpp.

References TAO_Transport::add_reference(), and TAO::ENTRY_UNKNOWN.

00021     : transport_ (transport)
00022     , recycle_state_ (ENTRY_UNKNOWN)
00023   {
00024     transport->add_reference ();
00025   }

ACE_INLINE TAO::Cache_IntId::Cache_IntId const Cache_IntId rhs  ) 
 

Copy constructor.

Definition at line 17 of file Cache_Entries.inl.

References TAO::ENTRY_UNKNOWN.

00018     : transport_ (0),
00019       recycle_state_ (ENTRY_UNKNOWN)
00020   {
00021     *this = rhs;
00022   }

TAO::Cache_IntId::~Cache_IntId void   ) 
 

Destructor.

Definition at line 27 of file Cache_Entries.cpp.

References TAO_Transport::remove_reference().

00028   {
00029     if (this->transport_)
00030       this->transport_->remove_reference ();
00031   }


Member Function Documentation

ACE_INLINE bool TAO::Cache_IntId::operator!= const Cache_IntId rhs  )  const
 

Inequality comparison operator.

Definition at line 31 of file Cache_Entries.inl.

References transport_.

00032   {
00033     return (this->transport_ != rhs.transport_);
00034   }

Cache_IntId & TAO::Cache_IntId::operator= const Cache_IntId rhs  ) 
 

Assignment operator (does copy memory).

Definition at line 34 of file Cache_Entries.cpp.

References TAO_Transport::add_reference(), recycle_state_, TAO_Transport::remove_reference(), and transport_.

00035   {
00036     if (this != &rhs)
00037       {
00038         this->recycle_state_ = rhs.recycle_state_;
00039 
00040         TAO_Transport *old_transport = this->transport_;
00041         this->transport_ = rhs.transport_;
00042         if (this->transport_)
00043           this->transport_->add_reference ();
00044         if (old_transport)
00045           old_transport->remove_reference ();
00046       }
00047 
00048     return *this;
00049   }

ACE_INLINE bool TAO::Cache_IntId::operator== const Cache_IntId rhs  )  const
 

Equality comparison operator (must match both id_ and kind_).

Definition at line 25 of file Cache_Entries.inl.

References transport_.

00026   {
00027     return (this->transport_ == rhs.transport_);
00028   }

ACE_INLINE Cache_Entries_State TAO::Cache_IntId::recycle_state void   ) 
 

Get .

Definition at line 55 of file Cache_Entries.inl.

00056   {
00057     return this->recycle_state_;
00058   }

ACE_INLINE void TAO::Cache_IntId::recycle_state Cache_Entries_State  new_state  ) 
 

Set .

Definition at line 49 of file Cache_Entries.inl.

Referenced by TAO::Transport_Cache_Manager::cache_idle_transport(), and TAO::Transport_Cache_Manager::cache_transport().

00050   {
00051     this->recycle_state_ = st;
00052   }

ACE_INLINE TAO_Transport * TAO::Cache_IntId::relinquish_transport void   ) 
 

Note:
This method should go away once the Transport_Cache_Map_Manager is improved so that it returns TAO_Transport objects when performing a find() operation. This method really only exists to get around inadequacies in the Transport_Cache_Map_Manager interface.

Definition at line 61 of file Cache_Entries.inl.

Referenced by TAO::Transport_Cache_Manager::find_transport().

00062   {
00063     // Yield ownership of the TAO_Transport object.
00064     TAO_Transport *val = this->transport_;
00065     this->transport_ = 0;
00066     return val;
00067   }

ACE_INLINE const TAO_Transport * TAO::Cache_IntId::transport void   )  const
 

Return the underlying transport.

Definition at line 43 of file Cache_Entries.inl.

00044   {
00045     return this->transport_;
00046   }

ACE_INLINE TAO_Transport * TAO::Cache_IntId::transport void   ) 
 

Return the underlying transport.

Definition at line 37 of file Cache_Entries.inl.

Referenced by TAO::Transport_Cache_Manager::bind_i(), and TAO::Transport_Cache_Manager::find().

00038   {
00039     return this->transport_;
00040   }


Member Data Documentation

Cache_Entries_State TAO::Cache_IntId::recycle_state_ [private]
 

The state of the handle.

Definition at line 123 of file Cache_Entries.h.

Referenced by operator=().

TAO_Transport* TAO::Cache_IntId::transport_ [private]
 

The transport that needs to be cached.

Definition at line 120 of file Cache_Entries.h.

Referenced by operator!=(), operator=(), and operator==().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:26:00 2006 for TAO by doxygen 1.3.6