Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

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 Methods

 TAO_Cache_IntId (void)
 Constructor. More...

 TAO_Cache_IntId (TAO_Transport *transport)
 Constructor. More...

 TAO_Cache_IntId (const TAO_Cache_IntId &rhs)
 Copy constructor. More...

 ~TAO_Cache_IntId (void)
 Destructor. More...

TAO_Cache_IntId & operator= (const TAO_Cache_IntId &rhs)
 Assignment operator (does copy memory). More...

int operator== (const TAO_Cache_IntId &rhs) const
 Equality comparison operator (must match both id_ and kind_). More...

int operator!= (const TAO_Cache_IntId &rhs) const
 Inequality comparison operator. More...

TAO_Transporttransport (void)
 Return the underlying transport. More...

const TAO_Transporttransport (void) const
 Return the underlying transport. More...

void recycle_state (ACE_Recyclable_State new_state)
 Set <recycle_state>. More...

ACE_Recyclable_State recycle_state (void)
 Get <recycle_state>. More...

TAO_Transportrelinquish_transport (void)
 Relinquish ownership of the TAO_Transport object associated with this TAO_Cache_IntId. More...


Private Attributes

TAO_Transporttransport_
 The transport that needs to be cached. More...

ACE_Recyclable_State recycle_state_
 The state of the handle. More...


Detailed Description

Helper class for TAO_Transport_Cache_Manager.

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

Definition at line 44 of file Cache_Entries.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_Cache_IntId::TAO_Cache_IntId void   
 

Constructor.

Definition at line 5 of file Cache_Entries.inl.

References ACE_RECYCLABLE_UNKNOWN.

00006   : transport_ (0),
00007     recycle_state_ (ACE_RECYCLABLE_UNKNOWN)
00008 {
00009 }

TAO_Cache_IntId::TAO_Cache_IntId TAO_Transport   transport
 

Constructor.

Definition at line 14 of file Cache_Entries.cpp.

References ACE_RECYCLABLE_UNKNOWN.

00015   : transport_ (TAO_Transport::_duplicate (transport)),
00016     recycle_state_ (ACE_RECYCLABLE_UNKNOWN)
00017 {
00018 }

ACE_INLINE TAO_Cache_IntId::TAO_Cache_IntId const TAO_Cache_IntId &    rhs
 

Copy constructor.

Definition at line 12 of file Cache_Entries.inl.

References ACE_RECYCLABLE_UNKNOWN.

00013   : transport_ (0),
00014     recycle_state_ (ACE_RECYCLABLE_UNKNOWN)
00015 {
00016   *this = rhs;
00017 }

TAO_Cache_IntId::~TAO_Cache_IntId void   
 

Destructor.

Definition at line 20 of file Cache_Entries.cpp.

References TAO_Transport::release.

00021 {
00022   TAO_Transport::release (this->transport_);
00023 }


Member Function Documentation

ACE_INLINE int TAO_Cache_IntId::operator!= const TAO_Cache_IntId &    rhs const
 

Inequality comparison operator.

Definition at line 26 of file Cache_Entries.inl.

References transport_.

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

TAO_Cache_IntId & TAO_Cache_IntId::operator= const TAO_Cache_IntId &    rhs
 

Assignment operator (does copy memory).

Definition at line 26 of file Cache_Entries.cpp.

References TAO_Transport::_duplicate, recycle_state_, TAO_Transport::release, and transport_.

00027 {
00028   if (this != &rhs)
00029     {
00030       this->recycle_state_ = rhs.recycle_state_;
00031 
00032       TAO_Transport* old_transport = this->transport_;
00033       this->transport_ = TAO_Transport::_duplicate (rhs.transport_);
00034       TAO_Transport::release (old_transport);
00035     }
00036 
00037   return *this;
00038 }

ACE_INLINE int TAO_Cache_IntId::operator== const TAO_Cache_IntId &    rhs const
 

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

Definition at line 20 of file Cache_Entries.inl.

References transport_.

00021 {
00022   return (this->transport_ == rhs.transport_);
00023 }

ACE_INLINE ACE_Recyclable_State TAO_Cache_IntId::recycle_state void   
 

Get <recycle_state>.

Definition at line 50 of file Cache_Entries.inl.

References recycle_state_.

00051 {
00052   return this->recycle_state_;
00053 }

ACE_INLINE void TAO_Cache_IntId::recycle_state ACE_Recyclable_State    new_state
 

Set <recycle_state>.

Definition at line 44 of file Cache_Entries.inl.

References ACE_Recyclable_State, and recycle_state_.

Referenced by TAO_Transport_Cache_Manager::cache_idle_transport, TAO_Transport_Cache_Manager::cache_transport, TAO_Transport_Cache_Manager::find_i, TAO_Transport_Cache_Manager::is_entry_idle, TAO_Transport_Cache_Manager::mark_invalid_i, and TAO_Transport_Cache_Manager::purge.

00045 {
00046   this->recycle_state_ = st;
00047 }

ACE_INLINE TAO_Transport * TAO_Cache_IntId::relinquish_transport void   
 

Relinquish ownership of the TAO_Transport object associated with this TAO_Cache_IntId.

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 56 of file Cache_Entries.inl.

References transport_.

Referenced by TAO_Transport_Cache_Manager::find_transport.

00057 {
00058   // Yield ownership of the TAO_Transport object.
00059   TAO_Transport *val = this->transport_;
00060   this->transport_ = 0;
00061   return val;
00062 }

ACE_INLINE const TAO_Transport * TAO_Cache_IntId::transport void    const
 

Return the underlying transport.

Definition at line 38 of file Cache_Entries.inl.

References transport_.

00039 {
00040   return this->transport_;
00041 }

ACE_INLINE TAO_Transport * TAO_Cache_IntId::transport void   
 

Return the underlying transport.

Definition at line 32 of file Cache_Entries.inl.

References transport_.

Referenced by TAO_Transport_Cache_Manager::bind_i, TAO_Transport_Cache_Manager::find, TAO_Transport_Cache_Manager::find_i, TAO_Transport_Cache_Manager::purge, TAO_Transport_Cache_Manager::sort_set, and TAO_Transport_Cache_Manager::update_entry.

00033 {
00034   return this->transport_;
00035 }


Member Data Documentation

ACE_Recyclable_State TAO_Cache_IntId::recycle_state_ [private]
 

The state of the handle.

Definition at line 98 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 95 of file Cache_Entries.h.

Referenced by operator!=, operator=, operator==, relinquish_transport, and transport.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:05:50 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002