#include <Cache_Entries.h>
Collaboration diagram for TAO::Cache_IntId:
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_IntId & | operator= (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_Transport * | transport (void) |
Return the underlying transport. | |
const TAO_Transport * | transport (void) const |
Return the underlying transport. | |
void | recycle_state (Cache_Entries_State new_state) |
Set <recycle_state>. | |
Cache_Entries_State | recycle_state (void) const |
Get <recycle_state>. | |
TAO_Transport * | relinquish_transport (void) |
Private Attributes | |
TAO_Transport * | transport_ |
The transport that needs to be cached. | |
Cache_Entries_State | recycle_state_ |
The state of the handle. | |
bool | is_connected_ |
Friends | |
class | 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 <key> in a table holding the state of the Transport Cache.
Definition at line 73 of file Cache_Entries.h.
ACE_INLINE TAO::Cache_IntId::Cache_IntId | ( | void | ) |
Constructor.
Definition at line 10 of file Cache_Entries.inl.
00011 : transport_ (0), 00012 recycle_state_ (ENTRY_UNKNOWN), 00013 is_connected_ (false) 00014 { 00015 }
TAO::Cache_IntId::Cache_IntId | ( | TAO_Transport * | transport | ) |
Constructor.
Definition at line 20 of file Cache_Entries.cpp.
References TAO_Transport::add_reference(), TAO_Transport::is_connected(), and is_connected_.
00021 : transport_ (transport) 00022 , recycle_state_ (ENTRY_UNKNOWN) 00023 , is_connected_ (false) 00024 { 00025 this->is_connected_ = transport->is_connected(); 00026 transport->add_reference (); 00027 }
ACE_INLINE TAO::Cache_IntId::Cache_IntId | ( | const Cache_IntId & | rhs | ) |
Copy constructor.
Definition at line 18 of file Cache_Entries.inl.
00019 : transport_ (0), 00020 recycle_state_ (ENTRY_UNKNOWN), 00021 is_connected_ (false) 00022 { 00023 *this = rhs; 00024 }
TAO::Cache_IntId::~Cache_IntId | ( | void | ) |
Destructor.
Definition at line 29 of file Cache_Entries.cpp.
References TAO_Transport::remove_reference(), and transport_.
00030 { 00031 if (this->transport_) 00032 this->transport_->remove_reference (); 00033 }
ACE_INLINE bool TAO::Cache_IntId::operator!= | ( | const Cache_IntId & | rhs | ) | const |
Inequality comparison operator.
Definition at line 33 of file Cache_Entries.inl.
References transport_.
Cache_IntId & TAO::Cache_IntId::operator= | ( | const Cache_IntId & | rhs | ) |
Assignment operator (does copy memory).
Definition at line 36 of file Cache_Entries.cpp.
References TAO_Transport::add_reference(), is_connected_, recycle_state_, TAO_Transport::remove_reference(), and transport_.
00037 { 00038 if (this != &rhs) 00039 { 00040 this->recycle_state_ = rhs.recycle_state_; 00041 this->is_connected_ = rhs.is_connected_; 00042 TAO_Transport *old_transport = this->transport_; 00043 this->transport_ = rhs.transport_; 00044 if (this->transport_) 00045 this->transport_->add_reference (); 00046 if (old_transport) 00047 old_transport->remove_reference (); 00048 } 00049 00050 return *this; 00051 }
ACE_INLINE bool TAO::Cache_IntId::operator== | ( | const Cache_IntId & | rhs | ) | const |
Equality comparison operator (must match both id_ and kind_).
Definition at line 27 of file Cache_Entries.inl.
References transport_.
ACE_INLINE Cache_Entries_State TAO::Cache_IntId::recycle_state | ( | void | ) | const |
Get <recycle_state>.
Definition at line 57 of file Cache_Entries.inl.
References recycle_state_.
00058 { 00059 return this->recycle_state_; 00060 }
ACE_INLINE void TAO::Cache_IntId::recycle_state | ( | Cache_Entries_State | new_state | ) |
Set <recycle_state>.
Definition at line 51 of file Cache_Entries.inl.
References recycle_state_.
Referenced by TAO::Transport_Cache_Manager::cache_idle_transport(), and TAO::Transport_Cache_Manager::cache_transport().
00052 { 00053 this->recycle_state_ = st; 00054 }
ACE_INLINE TAO_Transport * TAO::Cache_IntId::relinquish_transport | ( | void | ) |
Definition at line 63 of file Cache_Entries.inl.
References transport_.
Referenced by TAO::Transport_Cache_Manager::find_transport().
00064 { 00065 // Yield ownership of the TAO_Transport object. 00066 TAO_Transport *val = this->transport_; 00067 this->transport_ = 0; 00068 return val; 00069 }
ACE_INLINE const TAO_Transport * TAO::Cache_IntId::transport | ( | void | ) | const |
Return the underlying transport.
Definition at line 45 of file Cache_Entries.inl.
References transport_.
00046 { 00047 return this->transport_; 00048 }
ACE_INLINE TAO_Transport * TAO::Cache_IntId::transport | ( | void | ) |
Return the underlying transport.
Definition at line 39 of file Cache_Entries.inl.
References transport_.
Referenced by TAO::Transport_Cache_Manager::bind_i(), and TAO::Transport_Cache_Manager::find().
00040 { 00041 return this->transport_; 00042 }
friend class TAO::Transport_Cache_Manager [friend] |
Definition at line 76 of file Cache_Entries.h.
bool TAO::Cache_IntId::is_connected_ [private] |
This is an analog for the transport::is_connected(), which is guarded by a mutex.
Definition at line 130 of file Cache_Entries.h.
Referenced by Cache_IntId(), and operator=().
Cache_Entries_State TAO::Cache_IntId::recycle_state_ [private] |
The state of the handle.
Definition at line 126 of file Cache_Entries.h.
Referenced by operator=(), and recycle_state().
TAO_Transport* TAO::Cache_IntId::transport_ [private] |
The transport that needs to be cached.
Definition at line 123 of file Cache_Entries.h.
Referenced by operator!=(), operator=(), operator==(), relinquish_transport(), transport(), and ~Cache_IntId().