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 class Transport_Cache_Manager;
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_CONNECTING,
00058
00059
00060 ENTRY_UNKNOWN
00061 };
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 class TAO_Export Cache_IntId
00074 {
00075 public:
00076 friend class TAO::Transport_Cache_Manager;
00077
00078 Cache_IntId (void);
00079
00080
00081 Cache_IntId (TAO_Transport *transport);
00082
00083
00084 Cache_IntId (const Cache_IntId & rhs);
00085
00086
00087 ~Cache_IntId (void);
00088
00089
00090 Cache_IntId& operator= (const Cache_IntId &rhs);
00091
00092
00093 bool operator== (const Cache_IntId &rhs) const;
00094
00095
00096 bool operator!= (const Cache_IntId &rhs) const;
00097
00098
00099 TAO_Transport *transport (void);
00100
00101
00102 const TAO_Transport *transport (void) const;
00103
00104
00105 void recycle_state (Cache_Entries_State new_state);
00106
00107
00108 Cache_Entries_State recycle_state (void) const;
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 TAO_Transport *relinquish_transport (void);
00120
00121 private:
00122
00123 TAO_Transport *transport_;
00124
00125
00126 Cache_Entries_State recycle_state_;
00127
00128
00129
00130 bool is_connected_;
00131 };
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 class TAO_Export Cache_ExtId
00143 {
00144 public:
00145
00146
00147 Cache_ExtId (void);
00148
00149
00150 Cache_ExtId (TAO_Transport_Descriptor_Interface *prop);
00151
00152
00153 Cache_ExtId (const Cache_ExtId & rhs);
00154
00155
00156 ~Cache_ExtId (void);
00157
00158
00159
00160 Cache_ExtId& operator= (const Cache_ExtId &rhs);
00161
00162
00163 bool operator== (const Cache_ExtId &rhs) const;
00164
00165
00166 bool operator!= (const Cache_ExtId &rhs) const;
00167
00168
00169
00170 u_long hash (void) const;
00171
00172
00173 void duplicate (void);
00174
00175
00176 CORBA::ULong index (void) const;
00177
00178
00179
00180 void index (CORBA::ULong index);
00181
00182
00183 void incr_index (void);
00184
00185
00186
00187 TAO_Transport_Descriptor_Interface *property (void) const;
00188
00189 private:
00190
00191
00192 TAO_Transport_Descriptor_Interface *transport_property_;
00193
00194
00195 CORBA::Boolean is_delete_;
00196
00197
00198
00199
00200
00201
00202
00203 CORBA::ULong index_;
00204 };
00205 }
00206
00207 TAO_END_VERSIONED_NAMESPACE_DECL
00208
00209 #if defined (__ACE_INLINE__)
00210 # include "tao/Cache_Entries.inl"
00211 #endif
00212
00213 #include "ace/post.h"
00214
00215 #endif