#include <Active_Object_Map.h>
Collaboration diagram for TAO_Active_Object_Map:
Implementation to be used by the POA.
Definition at line 50 of file Active_Object_Map.h.
TAO_Active_Object_Map::TAO_Active_Object_Map | ( | int | user_id_policy, | |
int | unique_id_policy, | |||
int | persistent_id_policy, | |||
const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters & | creation_parameters | |||
) |
Constructor.
Definition at line 77 of file Active_Object_Map.cpp.
References ACE_ERROR, ACE_NEW, ACE_NEW_THROW_EX, TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters::active_object_map_size_, TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters::allow_reactivation_of_system_ids_, id_assignment_strategy_, id_hint_strategy_, id_uniqueness_strategy_, lifespan_strategy_, LM_ERROR, TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters::object_lookup_strategy_for_system_id_policy_, TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters::object_lookup_strategy_for_user_id_policy_, TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters::reverse_object_lookup_strategy_for_unique_id_policy_, servant_map_, TAO_Id_Assignment_Strategy::set_active_object_map(), TAO_Lifespan_Strategy::set_active_object_map(), TAO_Id_Uniqueness_Strategy::set_active_object_map(), set_system_id_size(), TAO_ACTIVE_DEMUX, TAO_DYNAMIC_HASH, TAO_LINEAR, TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters::use_active_hint_in_ids_, user_id_map_, and using_active_maps_.
00083 : user_id_map_ (0) 00084 , servant_map_ (0) 00085 , id_uniqueness_strategy_ (0) 00086 , lifespan_strategy_ (0) 00087 , id_assignment_strategy_ (0) 00088 , id_hint_strategy_ (0) 00089 , using_active_maps_ (false) 00090 { 00091 TAO_Active_Object_Map::set_system_id_size (creation_parameters); 00092 00093 TAO_Id_Uniqueness_Strategy *id_uniqueness_strategy = 0; 00094 00095 if (unique_id_policy) 00096 { 00097 ACE_NEW_THROW_EX (id_uniqueness_strategy, 00098 TAO_Unique_Id_Strategy, 00099 CORBA::NO_MEMORY ()); 00100 } 00101 else 00102 { 00103 #if !defined (CORBA_E_MICRO) 00104 ACE_NEW_THROW_EX (id_uniqueness_strategy, 00105 TAO_Multiple_Id_Strategy, 00106 CORBA::NO_MEMORY ()); 00107 #else 00108 ACE_ERROR ((LM_ERROR, 00109 "Multiple Id Strategy not supported with CORBA/e\n")); 00110 #endif 00111 } 00112 00113 // Give ownership to the auto pointer. 00114 auto_ptr<TAO_Id_Uniqueness_Strategy> 00115 new_id_uniqueness_strategy (id_uniqueness_strategy); 00116 00117 TAO_Lifespan_Strategy *lifespan_strategy = 0; 00118 00119 if (persistent_id_policy) 00120 { 00121 #if !defined (CORBA_E_MICRO) 00122 ACE_NEW_THROW_EX (lifespan_strategy, 00123 TAO_Persistent_Strategy, 00124 CORBA::NO_MEMORY ()); 00125 #else 00126 ACE_UNUSED_ARG (persistent_id_policy); 00127 ACE_ERROR ((LM_ERROR, 00128 "Persistent Id Strategy not supported with CORBA/e\n")); 00129 #endif 00130 } 00131 else 00132 { 00133 ACE_NEW_THROW_EX (lifespan_strategy, 00134 TAO_Transient_Strategy, 00135 CORBA::NO_MEMORY ()); 00136 } 00137 00138 // Give ownership to the auto pointer. 00139 auto_ptr<TAO_Lifespan_Strategy> new_lifespan_strategy (lifespan_strategy); 00140 00141 TAO_Id_Assignment_Strategy *id_assignment_strategy = 0; 00142 00143 if (user_id_policy) 00144 { 00145 #if !defined (CORBA_E_MICRO) 00146 ACE_NEW_THROW_EX (id_assignment_strategy, 00147 TAO_User_Id_Strategy, 00148 CORBA::NO_MEMORY ()); 00149 #else 00150 ACE_ERROR ((LM_ERROR, 00151 "User Id Assignment not supported with CORBA/e\n")); 00152 #endif 00153 } 00154 else if (unique_id_policy) 00155 { 00156 ACE_NEW_THROW_EX (id_assignment_strategy, 00157 TAO_System_Id_With_Unique_Id_Strategy, 00158 CORBA::NO_MEMORY ()); 00159 } 00160 else 00161 { 00162 #if !defined (CORBA_E_MICRO) 00163 ACE_NEW_THROW_EX (id_assignment_strategy, 00164 TAO_System_Id_With_Multiple_Id_Strategy, 00165 CORBA::NO_MEMORY ()); 00166 #else 00167 ACE_ERROR ((LM_ERROR, 00168 "System Id Assignment with multiple " 00169 "not supported with CORBA/e\n")); 00170 #endif 00171 } 00172 00173 // Give ownership to the auto pointer. 00174 auto_ptr<TAO_Id_Assignment_Strategy> 00175 new_id_assignment_strategy (id_assignment_strategy); 00176 00177 TAO_Id_Hint_Strategy *id_hint_strategy = 0; 00178 if ((user_id_policy 00179 || creation_parameters.allow_reactivation_of_system_ids_) 00180 && creation_parameters.use_active_hint_in_ids_) 00181 { 00182 this->using_active_maps_ = true; 00183 00184 ACE_NEW_THROW_EX (id_hint_strategy, 00185 TAO_Active_Hint_Strategy ( 00186 creation_parameters.active_object_map_size_), 00187 CORBA::NO_MEMORY ()); 00188 } 00189 else 00190 { 00191 ACE_NEW_THROW_EX (id_hint_strategy, 00192 TAO_No_Hint_Strategy, 00193 CORBA::NO_MEMORY ()); 00194 } 00195 00196 // Give ownership to the auto pointer. 00197 auto_ptr<TAO_Id_Hint_Strategy> new_id_hint_strategy (id_hint_strategy); 00198 00199 servant_map *sm = 0; 00200 if (unique_id_policy) 00201 { 00202 switch (creation_parameters.reverse_object_lookup_strategy_for_unique_id_policy_) 00203 { 00204 case TAO_LINEAR: 00205 #if (TAO_HAS_MINIMUM_POA_MAPS == 0) 00206 ACE_NEW_THROW_EX (sm, 00207 servant_linear_map ( 00208 creation_parameters.active_object_map_size_), 00209 CORBA::NO_MEMORY ()); 00210 break; 00211 #else 00212 ACE_ERROR ((LM_ERROR, 00213 "linear option for " 00214 "-ORBUniqueidPolicyReverseDemuxStrategy " 00215 "not supported with minimum POA maps. " 00216 "Ingoring option to use default... \n")); 00217 /* FALL THROUGH */ 00218 #endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ 00219 00220 case TAO_DYNAMIC_HASH: 00221 default: 00222 ACE_NEW_THROW_EX (sm, 00223 servant_hash_map ( 00224 creation_parameters.active_object_map_size_), 00225 CORBA::NO_MEMORY ()); 00226 break; 00227 } 00228 } 00229 00230 // Give ownership to the auto pointer. 00231 auto_ptr<servant_map> new_servant_map (sm); 00232 00233 user_id_map *uim = 0; 00234 if (user_id_policy 00235 || creation_parameters.allow_reactivation_of_system_ids_) 00236 { 00237 switch (creation_parameters.object_lookup_strategy_for_user_id_policy_) 00238 { 00239 case TAO_LINEAR: 00240 #if (TAO_HAS_MINIMUM_POA_MAPS == 0) 00241 ACE_NEW_THROW_EX (uim, 00242 user_id_linear_map ( 00243 creation_parameters.active_object_map_size_), 00244 CORBA::NO_MEMORY ()); 00245 break; 00246 #else 00247 ACE_ERROR ((LM_ERROR, 00248 "linear option for -ORBUseridPolicyDemuxStrategy " 00249 "not supported with minimum POA maps. " 00250 "Ingoring option to use default... \n")); 00251 /* FALL THROUGH */ 00252 #endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ 00253 00254 case TAO_DYNAMIC_HASH: 00255 default: 00256 ACE_NEW_THROW_EX (uim, 00257 user_id_hash_map (creation_parameters.active_object_map_size_), 00258 CORBA::NO_MEMORY ()); 00259 break; 00260 } 00261 } 00262 else 00263 { 00264 switch (creation_parameters.object_lookup_strategy_for_system_id_policy_) 00265 { 00266 #if (TAO_HAS_MINIMUM_POA_MAPS == 0) 00267 case TAO_LINEAR: 00268 ACE_NEW_THROW_EX (uim, 00269 user_id_linear_map (creation_parameters.active_object_map_size_), 00270 CORBA::NO_MEMORY ()); 00271 break; 00272 00273 case TAO_DYNAMIC_HASH: 00274 ACE_NEW_THROW_EX (uim, 00275 user_id_hash_map (creation_parameters.active_object_map_size_), 00276 CORBA::NO_MEMORY ()); 00277 break; 00278 #else 00279 case TAO_LINEAR: 00280 case TAO_DYNAMIC_HASH: 00281 ACE_ERROR ((LM_ERROR, 00282 "linear and dynamic options for -ORBSystemidPolicyDemuxStrategy " 00283 "are not supported with minimum POA maps. " 00284 "Ingoring option to use default... \n")); 00285 /* FALL THROUGH */ 00286 #endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ 00287 00288 case TAO_ACTIVE_DEMUX: 00289 default: 00290 00291 this->using_active_maps_ = true; 00292 00293 ACE_NEW_THROW_EX (uim, 00294 user_id_active_map (creation_parameters.active_object_map_size_), 00295 CORBA::NO_MEMORY ()); 00296 break; 00297 } 00298 } 00299 00300 // Give ownership to the auto pointer. 00301 auto_ptr<user_id_map> new_user_id_map (uim); 00302 00303 id_uniqueness_strategy->set_active_object_map (this); 00304 lifespan_strategy->set_active_object_map (this); 00305 id_assignment_strategy->set_active_object_map (this); 00306 00307 // Finally everything is fine. Make sure to take ownership away 00308 // from the auto pointer. 00309 this->id_uniqueness_strategy_ = new_id_uniqueness_strategy; 00310 this->lifespan_strategy_ = new_lifespan_strategy; 00311 this->id_assignment_strategy_ = new_id_assignment_strategy; 00312 this->id_hint_strategy_ = new_id_hint_strategy; 00313 this->servant_map_ = new_servant_map; 00314 this->user_id_map_ = new_user_id_map; 00315 00316 #if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1) 00317 ACE_NEW (this->monitor_, 00318 ACE::Monitor_Control::Size_Monitor); 00319 #endif /* TAO_HAS_MONITOR_POINTS==1 */ 00320 }
TAO_Active_Object_Map::~TAO_Active_Object_Map | ( | void | ) |
Destructor.
Definition at line 322 of file Active_Object_Map.cpp.
References user_id_map_.
00323 { 00324 user_id_map::iterator iterator = this->user_id_map_->begin (); 00325 user_id_map::iterator end = this->user_id_map_->end (); 00326 00327 for (; 00328 iterator != end; 00329 ++iterator) 00330 { 00331 user_id_map::value_type map_entry = *iterator; 00332 delete map_entry.second (); 00333 } 00334 00335 #if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1) 00336 this->monitor_->remove_from_registry (); 00337 this->monitor_->remove_ref (); 00338 #endif /* TAO_HAS_MONITOR_POINTS==1 */ 00339 }
ACE_INLINE int TAO_Active_Object_Map::bind_using_system_id_returning_system_id | ( | PortableServer::Servant | servant, | |
CORBA::Short | priority, | |||
PortableServer::ObjectId_out | system_id | |||
) |
Must be used with SYSTEM_ID policy.
Definition at line 18 of file Active_Object_Map.inl.
References ACE_NEW_RETURN, id_assignment_strategy_, id_hint_strategy_, and user_id_map_.
00022 { 00023 if (servant == 0 && !this->using_active_maps_) 00024 { 00025 PortableServer::ObjectId id; 00026 00027 int result = this->user_id_map_->create_key (id); 00028 00029 if (result == 0) 00030 { 00031 ACE_NEW_RETURN (system_id, 00032 PortableServer::ObjectId (id), 00033 -1); 00034 } 00035 00036 return result; 00037 } 00038 00039 TAO_Active_Object_Map_Entry *entry = 0; 00040 00041 int result = 00042 this->id_assignment_strategy_->bind_using_system_id (servant, 00043 priority, 00044 entry); 00045 00046 if (result == 0) 00047 { 00048 result = this->id_hint_strategy_->system_id (system_id, 00049 *entry); 00050 } 00051 00052 return result; 00053 }
ACE_INLINE int TAO_Active_Object_Map::bind_using_system_id_returning_user_id | ( | PortableServer::Servant | servant, | |
CORBA::Short | priority, | |||
PortableServer::ObjectId_out | user_id | |||
) |
Must be used with SYSTEM_ID policy.
Definition at line 56 of file Active_Object_Map.inl.
References ACE_NEW_RETURN, id_assignment_strategy_, and TAO_Active_Object_Map_Entry::user_id_.
00060 { 00061 TAO_Active_Object_Map_Entry *entry = 0; 00062 00063 int result = 00064 this->id_assignment_strategy_->bind_using_system_id (servant, 00065 priority, 00066 entry); 00067 if (result == 0) 00068 ACE_NEW_RETURN (user_id, 00069 PortableServer::ObjectId (entry->user_id_), 00070 -1); 00071 return result; 00072 }
ACE_INLINE int TAO_Active_Object_Map::bind_using_user_id | ( | PortableServer::Servant | servant, | |
const PortableServer::ObjectId & | user_id, | |||
CORBA::Short | priority | |||
) |
Can be used with any policy. With the SYSTEM_ID policy, user_id is actually system_id.
Definition at line 75 of file Active_Object_Map.inl.
References id_uniqueness_strategy_.
00079 { 00080 TAO_Active_Object_Map_Entry *entry = 0; 00081 return this->id_uniqueness_strategy_->bind_using_user_id (servant, 00082 user_id, 00083 priority, 00084 entry); 00085 }
ACE_INLINE size_t TAO_Active_Object_Map::current_size | ( | void | ) |
Size of the map.
Definition at line 281 of file Active_Object_Map.inl.
References user_id_map_.
00282 { 00283 return this->user_id_map_->current_size (); 00284 }
ACE_INLINE int TAO_Active_Object_Map::find_entry_using_user_id | ( | const PortableServer::ObjectId & | user_id, | |
TAO_Active_Object_Map_Entry *& | entry | |||
) |
-1 | Entry is not found or is deactivated. | |
0 | Entry is found. |
Definition at line 202 of file Active_Object_Map.inl.
References TAO_Active_Object_Map_Entry::deactivated_, and user_id_map_.
Referenced by find_servant_and_system_id_using_user_id().
00205 { 00206 int result = this->user_id_map_->find (user_id, entry); 00207 00208 if (result == 0) 00209 { 00210 if (entry->deactivated_) 00211 { 00212 result = -1; 00213 } 00214 } 00215 00216 return result; 00217 }
ACE_INLINE int TAO_Active_Object_Map::find_servant_and_system_id_using_user_id | ( | const PortableServer::ObjectId & | user_id, | |
PortableServer::Servant & | servant, | |||
PortableServer::ObjectId_out | system_id, | |||
CORBA::Short & | priority | |||
) |
Can be used with any policy. With the SYSTEM_ID policy, user_id is identical to system_id.
Definition at line 220 of file Active_Object_Map.inl.
References find_entry_using_user_id(), id_hint_strategy_, TAO_Active_Object_Map_Entry::priority_, and TAO_Active_Object_Map_Entry::servant_.
00225 { 00226 TAO_Active_Object_Map_Entry *entry = 0; 00227 int result = this->find_entry_using_user_id (user_id, entry); 00228 00229 if (result == 0) 00230 { 00231 if (entry->servant_ == 0) 00232 { 00233 result = -1; 00234 } 00235 else 00236 { 00237 result = this->id_hint_strategy_->system_id (system_id, 00238 *entry); 00239 if (result == 0) 00240 { 00241 servant = entry->servant_; 00242 priority = entry->priority_; 00243 } 00244 } 00245 } 00246 00247 return result; 00248 }
ACE_INLINE int TAO_Active_Object_Map::find_servant_using_system_id_and_user_id | ( | const PortableServer::ObjectId & | system_id, | |
const PortableServer::ObjectId & | user_id, | |||
PortableServer::Servant & | servant, | |||
TAO_Active_Object_Map_Entry *& | entry | |||
) |
Can be used with any policy.
Definition at line 187 of file Active_Object_Map.inl.
References lifespan_strategy_.
00192 { 00193 return 00194 this->lifespan_strategy_->find_servant_using_system_id_and_user_id ( 00195 system_id, 00196 user_id, 00197 servant, 00198 entry); 00199 }
ACE_INLINE int TAO_Active_Object_Map::find_servant_using_user_id | ( | const PortableServer::ObjectId & | user_id, | |
PortableServer::Servant & | servant | |||
) |
Can be used with any policy. With the SYSTEM_ID policy, user_id is actually system_id.
Definition at line 160 of file Active_Object_Map.inl.
References TAO_Active_Object_Map_Entry::deactivated_, TAO_Active_Object_Map_Entry::servant_, and user_id_map_.
00163 { 00164 TAO_Active_Object_Map_Entry *entry = 0; 00165 int result = this->user_id_map_->find (user_id, entry); 00166 00167 if (result == 0) 00168 { 00169 if (entry->deactivated_) 00170 { 00171 result = -1; 00172 } 00173 else if (entry->servant_ == 0) 00174 { 00175 result = -1; 00176 } 00177 else 00178 { 00179 servant = entry->servant_; 00180 } 00181 } 00182 00183 return result; 00184 }
ACE_INLINE int TAO_Active_Object_Map::find_system_id_using_servant | ( | PortableServer::Servant | servant, | |
PortableServer::ObjectId_out | system_id, | |||
CORBA::Short & | priority | |||
) |
Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, user_id is actually system_id.
Definition at line 148 of file Active_Object_Map.inl.
References id_uniqueness_strategy_.
00152 { 00153 return 00154 this->id_uniqueness_strategy_->find_system_id_using_servant (servant, 00155 system_id, 00156 priority); 00157 }
ACE_INLINE int TAO_Active_Object_Map::find_system_id_using_user_id | ( | const PortableServer::ObjectId & | user_id, | |
CORBA::Short | priority, | |||
PortableServer::ObjectId_out | system_id | |||
) |
Can be used with any policy. With the SYSTEM_ID policy, user_id is actually system_id.
Definition at line 88 of file Active_Object_Map.inl.
References ACE_NEW_RETURN, id_hint_strategy_, and id_uniqueness_strategy_.
00092 { 00093 if (!this->using_active_maps_) 00094 { 00095 ACE_NEW_RETURN (system_id, 00096 PortableServer::ObjectId (user_id), 00097 -1); 00098 00099 return 0; 00100 } 00101 00102 TAO_Active_Object_Map_Entry *entry = 0; 00103 int result = 00104 this->id_uniqueness_strategy_->bind_using_user_id (0, 00105 user_id, 00106 priority, 00107 entry); 00108 if (result == 0) 00109 { 00110 result = 00111 this->id_hint_strategy_->system_id (system_id, *entry); 00112 } 00113 00114 return result; 00115 }
ACE_INLINE int TAO_Active_Object_Map::find_user_id_using_servant | ( | PortableServer::Servant | servant, | |
PortableServer::ObjectId_out | user_id | |||
) |
Must be used with UNIQUE_ID policy. With the SYSTEM_ID policy, user_id is actually system_id.
Definition at line 138 of file Active_Object_Map.inl.
References id_uniqueness_strategy_.
00141 { 00142 return 00143 this->id_uniqueness_strategy_->find_user_id_using_servant (servant, 00144 user_id); 00145 }
ACE_INLINE int TAO_Active_Object_Map::find_user_id_using_system_id | ( | const PortableServer::ObjectId & | system_id, | |
PortableServer::ObjectId & | user_id | |||
) |
Can be used with any policy. When the SYSTEM_ID policy is used, the system_id is identical to user_id.
Definition at line 267 of file Active_Object_Map.inl.
References id_hint_strategy_.
00270 { 00271 return this->id_hint_strategy_->recover_key (system_id, user_id); 00272 }
ACE_INLINE int TAO_Active_Object_Map::find_user_id_using_system_id | ( | const PortableServer::ObjectId & | system_id, | |
PortableServer::ObjectId_out | user_id | |||
) |
Can be used with any policy. When the SYSTEM_ID policy is used, the system_id is identical to user_id.
Definition at line 251 of file Active_Object_Map.inl.
References ACE_NEW_RETURN.
00254 { 00255 PortableServer::ObjectId id; 00256 if (this->id_hint_strategy_->recover_key (system_id, id) == 0) 00257 { 00258 ACE_NEW_RETURN (user_id, 00259 PortableServer::ObjectId (id), 00260 -1); 00261 } 00262 00263 return 0; 00264 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE int TAO_Active_Object_Map::is_servant_in_map | ( | PortableServer::Servant | servant, | |
bool & | deactivated | |||
) |
Must be used with UNIQUE_ID policy.
Definition at line 10 of file Active_Object_Map.inl.
References id_uniqueness_strategy_.
00012 { 00013 return this->id_uniqueness_strategy_->is_servant_in_map (servant, 00014 deactivated); 00015 }
bool TAO_Active_Object_Map::is_user_id_in_map | ( | const PortableServer::ObjectId & | user_id, | |
CORBA::Short | priority, | |||
bool & | priorities_match, | |||
bool & | deactivated | |||
) |
Can be used with any policy. With the SYSTEM_ID policy, user_id is actually system_id.
Definition at line 342 of file Active_Object_Map.cpp.
References TAO_Active_Object_Map_Entry::deactivated_, TAO_Active_Object_Map_Entry::priority_, TAO_Active_Object_Map_Entry::servant_, and user_id_map_.
00347 { 00348 TAO_Active_Object_Map_Entry *entry = 0; 00349 bool result = false; 00350 int const find_result = this->user_id_map_->find (user_id, entry); 00351 00352 if (find_result == 0) 00353 { 00354 if (entry->servant_ == 0) 00355 { 00356 if (entry->priority_ != priority) 00357 { 00358 priorities_match = false; 00359 } 00360 } 00361 else 00362 { 00363 result = true; 00364 00365 if (entry->deactivated_) 00366 { 00367 deactivated = true; 00368 } 00369 } 00370 } 00371 00372 return result; 00373 }
ACE_INLINE int TAO_Active_Object_Map::rebind_using_user_id_and_system_id | ( | PortableServer::Servant | servant, | |
const PortableServer::ObjectId & | user_id, | |||
const PortableServer::ObjectId & | system_id, | |||
TAO_Active_Object_Map_Entry *& | entry | |||
) |
Can be used with any policy.
Definition at line 118 of file Active_Object_Map.inl.
References id_uniqueness_strategy_.
00123 { 00124 return this->id_uniqueness_strategy_->bind_using_user_id (servant, 00125 user_id, 00126 -1, 00127 entry); 00128 }
ACE_INLINE CORBA::Boolean TAO_Active_Object_Map::remaining_activations | ( | PortableServer::Servant | servant | ) |
Are there any remaining activations of servant in the active object map? Can be used with any policy.
Definition at line 275 of file Active_Object_Map.inl.
References id_uniqueness_strategy_.
00276 { 00277 return this->id_uniqueness_strategy_->remaining_activations (servant); 00278 }
void TAO_Active_Object_Map::set_system_id_size | ( | const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters & | creation_parameters | ) | [static] |
Set the system id size.
Definition at line 25 of file Active_Object_Map.cpp.
References ACE_Active_Map_Manager_Key::size(), system_id_size_, TAO_ACTIVE_DEMUX, TAO_DYNAMIC_HASH, and TAO_LINEAR.
Referenced by TAO_Active_Object_Map().
00027 { 00028 if (TAO_Active_Object_Map::system_id_size_ == 0) 00029 { 00030 if (creation_parameters.allow_reactivation_of_system_ids_) 00031 { 00032 switch (creation_parameters.object_lookup_strategy_for_system_id_policy_) 00033 { 00034 #if (TAO_HAS_MINIMUM_POA_MAPS == 0) 00035 case TAO_LINEAR: 00036 TAO_Active_Object_Map::system_id_size_ = sizeof (CORBA::ULong); 00037 break; 00038 #endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ 00039 00040 case TAO_DYNAMIC_HASH: 00041 default: 00042 TAO_Active_Object_Map::system_id_size_ = sizeof (CORBA::ULong); 00043 break; 00044 } 00045 00046 size_t hint_size = 0; 00047 00048 if (creation_parameters.use_active_hint_in_ids_) 00049 hint_size = ACE_Active_Map_Manager_Key::size (); 00050 00051 TAO_Active_Object_Map::system_id_size_ += hint_size; 00052 } 00053 else 00054 { 00055 switch (creation_parameters.object_lookup_strategy_for_system_id_policy_) 00056 { 00057 #if (TAO_HAS_MINIMUM_POA_MAPS == 0) 00058 case TAO_LINEAR: 00059 TAO_Active_Object_Map::system_id_size_ = sizeof (CORBA::ULong); 00060 break; 00061 00062 case TAO_DYNAMIC_HASH: 00063 TAO_Active_Object_Map::system_id_size_ = sizeof (CORBA::ULong); 00064 break; 00065 #endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */ 00066 00067 case TAO_ACTIVE_DEMUX: 00068 default: 00069 TAO_Active_Object_Map::system_id_size_ = 00070 ACE_Active_Map_Manager_Key::size (); 00071 break; 00072 } 00073 } 00074 } 00075 }
ACE_INLINE size_t TAO_Active_Object_Map::system_id_size | ( | void | ) | [static] |
Can be used with any policy.
Definition at line 288 of file Active_Object_Map.inl.
References system_id_size_.
Referenced by TAO_Root_POA::parse_key().
00289 { 00290 return TAO_Active_Object_Map::system_id_size_; 00291 }
ACE_INLINE int TAO_Active_Object_Map::unbind_using_user_id | ( | const PortableServer::ObjectId & | user_id | ) |
Can be used with any policy. With the SYSTEM_ID policy, user_id is actually system_id.
Definition at line 131 of file Active_Object_Map.inl.
References id_uniqueness_strategy_.
00133 { 00134 return this->id_uniqueness_strategy_->unbind_using_user_id (user_id); 00135 }
Id assignment strategy.
Definition at line 254 of file Active_Object_Map.h.
Referenced by bind_using_system_id_returning_system_id(), bind_using_system_id_returning_user_id(), and TAO_Active_Object_Map().
Id hint strategy.
Definition at line 257 of file Active_Object_Map.h.
Referenced by TAO_System_Id_With_Multiple_Id_Strategy::bind_using_system_id(), TAO_System_Id_With_Unique_Id_Strategy::bind_using_system_id(), bind_using_system_id_returning_system_id(), TAO_Multiple_Id_Strategy::bind_using_user_id(), TAO_Unique_Id_Strategy::bind_using_user_id(), find_servant_and_system_id_using_user_id(), TAO_Persistent_Strategy::find_servant_using_system_id_and_user_id(), TAO_Transient_Strategy::find_servant_using_system_id_and_user_id(), TAO_Unique_Id_Strategy::find_system_id_using_servant(), find_system_id_using_user_id(), find_user_id_using_system_id(), TAO_Active_Object_Map(), TAO_Multiple_Id_Strategy::unbind_using_user_id(), and TAO_Unique_Id_Strategy::unbind_using_user_id().
Id uniqueness strategy.
Definition at line 248 of file Active_Object_Map.h.
Referenced by bind_using_user_id(), find_system_id_using_servant(), find_system_id_using_user_id(), find_user_id_using_servant(), is_servant_in_map(), rebind_using_user_id_and_system_id(), remaining_activations(), TAO_Active_Object_Map(), and unbind_using_user_id().
Lifespan strategy.
Definition at line 251 of file Active_Object_Map.h.
Referenced by find_servant_using_system_id_and_user_id(), and TAO_Active_Object_Map().
Servant map.
Definition at line 245 of file Active_Object_Map.h.
Referenced by TAO_System_Id_With_Unique_Id_Strategy::bind_using_system_id(), TAO_Unique_Id_Strategy::bind_using_user_id(), TAO_Unique_Id_Strategy::find_system_id_using_servant(), TAO_Unique_Id_Strategy::find_user_id_using_servant(), TAO_Unique_Id_Strategy::is_servant_in_map(), TAO_Active_Object_Map(), and TAO_Unique_Id_Strategy::unbind_using_user_id().
TAO_BEGIN_VERSIONED_NAMESPACE_DECL size_t TAO_Active_Object_Map::system_id_size_ = 0 [static] |
Size of the system id produced by the map.
Definition at line 264 of file Active_Object_Map.h.
Referenced by set_system_id_size(), and system_id_size().
Id map.
Definition at line 242 of file Active_Object_Map.h.
Referenced by TAO_System_Id_With_Multiple_Id_Strategy::bind_using_system_id(), TAO_System_Id_With_Unique_Id_Strategy::bind_using_system_id(), bind_using_system_id_returning_system_id(), TAO_Multiple_Id_Strategy::bind_using_user_id(), TAO_Unique_Id_Strategy::bind_using_user_id(), current_size(), find_entry_using_user_id(), TAO_Persistent_Strategy::find_servant_using_system_id_and_user_id(), TAO_Transient_Strategy::find_servant_using_system_id_and_user_id(), find_servant_using_user_id(), is_user_id_in_map(), TAO_Multiple_Id_Strategy::remaining_activations(), TAO_Active_Object_Map(), TAO_Multiple_Id_Strategy::unbind_using_user_id(), TAO_Unique_Id_Strategy::unbind_using_user_id(), and ~TAO_Active_Object_Map().
Flag to see if we are using active maps in this active object map.
Definition at line 261 of file Active_Object_Map.h.
Referenced by TAO_Active_Object_Map().