00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TAO_CACHE_ENTRIES_H
00016 #define TAO_CACHE_ENTRIES_H
00017
00018 #include "ace/pre.h"
00019
00020 #include "tao/Transport_Descriptor_Interface.h"
00021
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif
00025
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027
00028 class TAO_Transport;
00029
00030 #ifdef index
00031 # undef index
00032 #endif
00033
00034 namespace TAO
00035 {
00036
00037
00038
00039 enum Cache_Entries_State
00040 {
00041
00042 ENTRY_IDLE_AND_PURGABLE,
00043
00044
00045 ENTRY_IDLE_BUT_NOT_PURGABLE,
00046
00047
00048 ENTRY_PURGABLE_BUT_NOT_IDLE,
00049
00050
00051 ENTRY_BUSY,
00052
00053
00054 ENTRY_CLOSED,
00055
00056
00057 ENTRY_UNKNOWN
00058 };
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 class TAO_Export Cache_IntId
00071 {
00072 public:
00073
00074
00075 Cache_IntId (void);
00076
00077
00078 Cache_IntId (TAO_Transport *transport);
00079
00080
00081 Cache_IntId (const Cache_IntId & rhs);
00082
00083
00084 ~Cache_IntId (void);
00085
00086
00087 Cache_IntId& operator= (const Cache_IntId &rhs);
00088
00089
00090 bool operator== (const Cache_IntId &rhs) const;
00091
00092
00093 bool operator!= (const Cache_IntId &rhs) const;
00094
00095
00096 TAO_Transport *transport (void);
00097
00098
00099 const TAO_Transport *transport (void) const;
00100
00101
00102 void recycle_state (Cache_Entries_State new_state);
00103
00104
00105 Cache_Entries_State recycle_state (void);
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116 TAO_Transport *relinquish_transport (void);
00117
00118 private:
00119
00120 TAO_Transport *transport_;
00121
00122
00123 Cache_Entries_State recycle_state_;
00124 };
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135 class TAO_Export Cache_ExtId
00136 {
00137 public:
00138
00139
00140 Cache_ExtId (void);
00141
00142
00143 Cache_ExtId (TAO_Transport_Descriptor_Interface *prop);
00144
00145
00146 Cache_ExtId (const Cache_ExtId & rhs);
00147
00148
00149 ~Cache_ExtId (void);
00150
00151
00152
00153 Cache_ExtId& operator= (const Cache_ExtId &rhs);
00154
00155
00156 bool operator== (const Cache_ExtId &rhs) const;
00157
00158
00159 bool operator!= (const Cache_ExtId &rhs) const;
00160
00161
00162
00163 u_long hash (void) const;
00164
00165
00166 void duplicate (void);
00167
00168
00169 CORBA::ULong index (void) const;
00170
00171
00172
00173 void index (CORBA::ULong index);
00174
00175
00176 void incr_index (void);
00177
00178
00179
00180 TAO_Transport_Descriptor_Interface *property (void) const;
00181
00182 private:
00183
00184
00185 TAO_Transport_Descriptor_Interface *transport_property_;
00186
00187
00188 CORBA::Boolean is_delete_;
00189
00190
00191
00192
00193
00194
00195
00196 CORBA::ULong index_;
00197 };
00198 }
00199
00200 TAO_END_VERSIONED_NAMESPACE_DECL
00201
00202 #if defined (__ACE_INLINE__)
00203 # include "tao/Cache_Entries.inl"
00204 #endif
00205
00206 #include "ace/post.h"
00207
00208 #endif