Active_Object_Map.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Active_Object_Map.h
00006  *
00007  *  $Id: Active_Object_Map.h 81691 2008-05-14 11:09:21Z johnnyw $
00008  *
00009  *  @author Irfan Pyarali
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_ACTIVE_OBJECT_MAP_H
00015 #define TAO_ACTIVE_OBJECT_MAP_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "tao/PortableServer/Key_Adapters.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "tao/PortableServer/Servant_Base.h"
00026 #include "tao/Server_Strategy_Factory.h"
00027 #include "ace/Map_T.h"
00028 #include "ace/Auto_Ptr.h"
00029 
00030 #if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1)
00031 #include "ace/Monitor_Size.h"
00032 #endif /* TAO_HAS_MONITOR_POINTS==1 */
00033 
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035 
00036 // Forward declarations.
00037 class TAO_Id_Uniqueness_Strategy;
00038 class TAO_Lifespan_Strategy;
00039 class TAO_Id_Assignment_Strategy;
00040 class TAO_Id_Hint_Strategy;
00041 struct TAO_Active_Object_Map_Entry;
00042 
00043 /**
00044  * @class TAO_Active_Object_Map
00045  *
00046  * @brief Map of object ids to servants.
00047  *
00048  * Implementation to be used by the POA.
00049  */
00050 class TAO_Active_Object_Map
00051 {
00052 public:
00053 
00054   /// Constructor.
00055   TAO_Active_Object_Map (
00056     int user_id_policy,
00057     int unique_id_policy,
00058     int persistent_id_policy,
00059     const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters);
00060 
00061   /// Destructor.
00062   ~TAO_Active_Object_Map (void);
00063 
00064   /// Must be used with UNIQUE_ID policy.
00065   int
00066   is_servant_in_map (PortableServer::Servant servant,
00067                      bool &deactivated);
00068 
00069   /// Can be used with any policy.  With the SYSTEM_ID policy,
00070   /// user_id is actually system_id.
00071   bool
00072   is_user_id_in_map (const PortableServer::ObjectId &user_id,
00073                      CORBA::Short priority,
00074                      bool &priorities_match,
00075                      bool &deactivated);
00076 
00077   /// Must be used with SYSTEM_ID policy.
00078   int
00079   bind_using_system_id_returning_system_id (
00080     PortableServer::Servant servant,
00081     CORBA::Short priority,
00082     PortableServer::ObjectId_out system_id);
00083 
00084   /// Must be used with SYSTEM_ID policy.
00085   int
00086   bind_using_system_id_returning_user_id (
00087     PortableServer::Servant servant,
00088     CORBA::Short priority,
00089     PortableServer::ObjectId_out user_id);
00090 
00091   /// Can be used with any policy.  With the SYSTEM_ID policy,
00092   /// user_id is actually system_id.
00093   int
00094   bind_using_user_id (PortableServer::Servant servant,
00095                       const PortableServer::ObjectId &user_id,
00096                       CORBA::Short priority);
00097 
00098   /// Can be used with any policy.  With the SYSTEM_ID policy,
00099   /// user_id is actually system_id.
00100   int
00101   find_system_id_using_user_id (const PortableServer::ObjectId &user_id,
00102                                 CORBA::Short priority,
00103                                 PortableServer::ObjectId_out system_id);
00104 
00105   /// Can be used with any policy.
00106   int
00107   rebind_using_user_id_and_system_id (
00108     PortableServer::Servant servant,
00109     const PortableServer::ObjectId &user_id,
00110     const PortableServer::ObjectId &system_id,
00111     TAO_Active_Object_Map_Entry *&entry);
00112 
00113   /// Can be used with any policy.  With the SYSTEM_ID policy,
00114   /// user_id is actually system_id.
00115   int
00116   unbind_using_user_id (const PortableServer::ObjectId &user_id);
00117 
00118   /// Must be used with UNIQUE_ID policy.  With the SYSTEM_ID policy,
00119   /// user_id is actually system_id.
00120   int
00121   find_user_id_using_servant (PortableServer::Servant servant,
00122                               PortableServer::ObjectId_out user_id);
00123 
00124   /// Must be used with UNIQUE_ID policy.  With the SYSTEM_ID policy,
00125   /// user_id is actually system_id.
00126   int
00127   find_system_id_using_servant (PortableServer::Servant servant,
00128                                 PortableServer::ObjectId_out system_id,
00129                                 CORBA::Short &priority);
00130 
00131   /// Can be used with any policy. With the SYSTEM_ID policy,
00132   /// user_id is actually system_id.
00133   int
00134   find_servant_using_user_id (const PortableServer::ObjectId &user_id,
00135                               PortableServer::Servant &servant);
00136 
00137 
00138   /// Can be used with any policy.
00139   int
00140   find_servant_using_system_id_and_user_id (
00141     const PortableServer::ObjectId &system_id,
00142     const PortableServer::ObjectId &user_id,
00143     PortableServer::Servant &servant,
00144     TAO_Active_Object_Map_Entry *&entry);
00145 
00146   /// Can be used with any policy.  With the SYSTEM_ID policy,
00147   /// @a user_id is identical to @a system_id.
00148   int
00149   find_servant_and_system_id_using_user_id (
00150     const PortableServer::ObjectId &user_id,
00151     PortableServer::Servant &servant,
00152     PortableServer::ObjectId_out system_id,
00153     CORBA::Short &priority);
00154 
00155   /// Can be used with any policy.  With the SYSTEM_ID policy,
00156   /// @a user_id is identical to @c system_id.
00157   /**
00158    * @retval -1 Entry is not found or is deactivated.
00159    * @retval 0 Entry is found.
00160    */
00161   int
00162   find_entry_using_user_id (const PortableServer::ObjectId &user_id,
00163                             TAO_Active_Object_Map_Entry *&entry);
00164 
00165   /// Can be used with any policy.  When the SYSTEM_ID policy is used,
00166   /// the @a system_id is identical to @a user_id.
00167   int
00168   find_user_id_using_system_id (const PortableServer::ObjectId &system_id,
00169                                 PortableServer::ObjectId_out user_id);
00170 
00171   /// Can be used with any policy.  When the SYSTEM_ID policy is used,
00172   /// the @a system_id is identical to @a user_id.
00173   int
00174   find_user_id_using_system_id (const PortableServer::ObjectId &system_id,
00175                                  PortableServer::ObjectId &user_id);
00176 
00177   /// Are there any remaining activations of @a servant in the active
00178   /// object map?  Can be used with any policy.
00179   CORBA::Boolean
00180   remaining_activations (PortableServer::Servant servant);
00181 
00182   /// Size of the map.
00183   size_t
00184   current_size (void);
00185 
00186   /// Can be used with any policy.
00187   static size_t
00188   system_id_size (void);
00189 
00190   /// Set the system id size.
00191   static void
00192   set_system_id_size (
00193     const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters);
00194 
00195   /// Base class of the id map.
00196   typedef ACE_Map<
00197   PortableServer::ObjectId,
00198     TAO_Active_Object_Map_Entry *> user_id_map;
00199 
00200   /// Id hash map.
00201   typedef ACE_Hash_Map_Manager_Ex_Adapter<
00202   PortableServer::ObjectId,
00203     TAO_Active_Object_Map_Entry *,
00204     TAO_ObjectId_Hash,
00205     ACE_Equal_To<PortableServer::ObjectId>,
00206     TAO_Incremental_Key_Generator> user_id_hash_map;
00207 
00208   /// Id linear map.
00209   typedef ACE_Map_Manager_Adapter<
00210   PortableServer::ObjectId,
00211     TAO_Active_Object_Map_Entry *,
00212     TAO_Incremental_Key_Generator> user_id_linear_map;
00213 
00214   /// Id active map.
00215   typedef ACE_Active_Map_Manager_Adapter<
00216   PortableServer::ObjectId,
00217     TAO_Active_Object_Map_Entry *,
00218     TAO_Ignore_Original_Key_Adapter> user_id_active_map;
00219 
00220   /// Base class of the servant map.
00221   typedef ACE_Map<
00222   PortableServer::Servant,
00223     TAO_Active_Object_Map_Entry *> servant_map;
00224 
00225   /// Servant hash map.
00226   typedef ACE_Hash_Map_Manager_Ex_Adapter<
00227   PortableServer::Servant,
00228     TAO_Active_Object_Map_Entry *,
00229     TAO_Servant_Hash,
00230     ACE_Equal_To<PortableServer::Servant>,
00231     ACE_Noop_Key_Generator<PortableServer::Servant> > servant_hash_map;
00232 
00233 #if (TAO_HAS_MINIMUM_POA_MAPS == 0)
00234   /// Servant linear map.
00235   typedef ACE_Map_Manager_Adapter<
00236   PortableServer::Servant,
00237     TAO_Active_Object_Map_Entry *,
00238     ACE_Noop_Key_Generator<PortableServer::Servant> > servant_linear_map;
00239 #endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */
00240 
00241   /// Id map.
00242   auto_ptr<user_id_map> user_id_map_;
00243 
00244   /// Servant map.
00245   auto_ptr<servant_map> servant_map_;
00246 
00247   /// Id uniqueness strategy.
00248   auto_ptr<TAO_Id_Uniqueness_Strategy> id_uniqueness_strategy_;
00249 
00250   /// Lifespan strategy.
00251   auto_ptr<TAO_Lifespan_Strategy> lifespan_strategy_;
00252 
00253   /// Id assignment strategy.
00254   auto_ptr<TAO_Id_Assignment_Strategy> id_assignment_strategy_;
00255 
00256   /// Id hint strategy.
00257   auto_ptr<TAO_Id_Hint_Strategy> id_hint_strategy_;
00258 
00259   /// Flag to see if we are using active maps in this active object
00260   /// map.
00261   bool using_active_maps_;
00262 
00263   /// Size of the system id produced by the map.
00264   static size_t system_id_size_;
00265 
00266 #if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1)
00267   ACE::Monitor_Control::Size_Monitor *monitor_;
00268 #endif /* TAO_HAS_MONITOR_POINTS==1 */
00269 };
00270 
00271 /**
00272  * @class TAO_Id_Uniqueness_Strategy
00273  *
00274  * @brief Id uniqueness strategy.
00275  *
00276  * Strategy for implementing points of variation between the
00277  * UNIQUE_ID and the MULTIPLE_ID policies.
00278  */
00279 class TAO_Id_Uniqueness_Strategy
00280 {
00281 public:
00282   /// Virtual destructor.
00283   virtual ~TAO_Id_Uniqueness_Strategy (void);
00284 
00285   /// Must be used with UNIQUE_ID policy.
00286   virtual int
00287   is_servant_in_map (PortableServer::Servant servant,
00288                      bool &deactivated) = 0;
00289 
00290   /// Can be used with any policy.  With the SYSTEM_ID policy,
00291   /// @a user_id is actually @c system_id.
00292   virtual int
00293   unbind_using_user_id (const PortableServer::ObjectId &user_id) = 0;
00294 
00295   /// Must be used with UNIQUE_ID policy.  With the SYSTEM_ID policy,
00296   /// @a user_id is actually @c system_id.
00297   virtual int
00298   find_user_id_using_servant (PortableServer::Servant servant,
00299                               PortableServer::ObjectId_out user_id) = 0;
00300 
00301   /// Must be used with UNIQUE_ID policy.  With the SYSTEM_ID policy,
00302   /// <user_id> is actually @a system_id.
00303   virtual int
00304   find_system_id_using_servant (PortableServer::Servant servant,
00305                                 PortableServer::ObjectId_out system_id,
00306                                 CORBA::Short &priority) = 0;
00307 
00308   /// Can be used with any policy.  With the SYSTEM_ID policy,
00309   /// @a user_id is actually @c system_id.
00310   virtual int
00311   bind_using_user_id (PortableServer::Servant servant,
00312                       const PortableServer::ObjectId &user_id,
00313                       CORBA::Short priority,
00314                       TAO_Active_Object_Map_Entry *&entry) = 0;
00315 
00316   /// Are there any remaining activations of @a servant in the active
00317   /// object map?  Can be used with any policy.
00318   virtual CORBA::Boolean
00319   remaining_activations (PortableServer::Servant servant) = 0;
00320 
00321   /// Set the active map.
00322   void
00323   set_active_object_map (TAO_Active_Object_Map *active_object_map);
00324 
00325 protected:
00326 
00327   /// Pointer to the active map.
00328   TAO_Active_Object_Map *active_object_map_;
00329 };
00330 
00331 /**
00332  * @class TAO_Unique_Id_Strategy
00333  *
00334  * @brief Unique id strategy.
00335  *
00336  * Strategy for the UNIQUE_ID policy.
00337  */
00338 class TAO_Unique_Id_Strategy : public TAO_Id_Uniqueness_Strategy
00339 {
00340 public:
00341 
00342   /// Must be used with UNIQUE_ID policy.
00343   virtual int
00344   is_servant_in_map (PortableServer::Servant servant,
00345                      bool &deactivated);
00346 
00347   /// Can be used with any policy.  With the SYSTEM_ID policy,
00348   /// @a user_id is actually @c system_id.
00349   virtual int
00350   unbind_using_user_id (const PortableServer::ObjectId &user_id);
00351 
00352   /// Must be used with UNIQUE_ID policy.  With the SYSTEM_ID policy,
00353   /// @a user_id is actually @c system_id.
00354   virtual int
00355   find_user_id_using_servant (PortableServer::Servant servant,
00356                               PortableServer::ObjectId_out user_id);
00357 
00358   /// Must be used with UNIQUE_ID policy.  With the SYSTEM_ID policy,
00359   /// <user_id> is actually @a system_id.
00360   virtual int
00361   find_system_id_using_servant (PortableServer::Servant servant,
00362                                 PortableServer::ObjectId_out system_id,
00363                                 CORBA::Short &priority);
00364 
00365   /// Can be used with any policy.  With the SYSTEM_ID policy,
00366   /// @a user_id is actually @c system_id.
00367   virtual int
00368   bind_using_user_id (PortableServer::Servant servant,
00369                       const PortableServer::ObjectId &user_id,
00370                       CORBA::Short priority,
00371                       TAO_Active_Object_Map_Entry *&entry);
00372 
00373   /// Are there any remaining activations of @a servant in the active
00374   /// object map?  Can be used with any policy.
00375   virtual CORBA::Boolean
00376   remaining_activations (PortableServer::Servant servant);
00377 };
00378 
00379 #if !defined (CORBA_E_MICRO)
00380 /**
00381  * @class TAO_Multiple_Id_Strategy
00382  *
00383  * @brief Multiple id strategy.
00384  *
00385  * Strategy for the MULTIPLE_ID policy.
00386  */
00387 class TAO_Multiple_Id_Strategy : public TAO_Id_Uniqueness_Strategy
00388 {
00389 public:
00390 
00391   /// Must be used with UNIQUE_ID policy.
00392   virtual int
00393   is_servant_in_map (PortableServer::Servant servant,
00394                      bool &deactivated);
00395 
00396   /// Can be used with any policy.  With the SYSTEM_ID policy,
00397   /// @a user_id is actually @c system_id.
00398   virtual int
00399   unbind_using_user_id (const PortableServer::ObjectId &user_id);
00400 
00401   /// Must be used with UNIQUE_ID policy.  With the SYSTEM_ID policy,
00402   /// @a user_id is actually @c system_id.
00403   virtual int
00404   find_user_id_using_servant (PortableServer::Servant servant,
00405                               PortableServer::ObjectId_out user_id);
00406 
00407   /// Must be used with UNIQUE_ID policy.  With the SYSTEM_ID policy,
00408   /// <user_id> is actually @a system_id.
00409   virtual int
00410   find_system_id_using_servant (PortableServer::Servant servant,
00411                                 PortableServer::ObjectId_out system_id,
00412                                 CORBA::Short &priority);
00413 
00414   /// Can be used with any policy.  With the SYSTEM_ID policy,
00415   /// @a user_id is actually @c system_id.
00416   virtual int
00417   bind_using_user_id (PortableServer::Servant servant,
00418                       const PortableServer::ObjectId &user_id,
00419                       CORBA::Short priority,
00420                       TAO_Active_Object_Map_Entry *&entry);
00421 
00422   /// Are there any remaining activations of @a servant in the active
00423   /// object map?  Can be used with any policy.
00424   virtual CORBA::Boolean
00425   remaining_activations (PortableServer::Servant servant);
00426 };
00427 #endif
00428 
00429 /**
00430  * @class TAO_Lifespan_Strategy
00431  *
00432  * @brief Lifespan strategy.
00433  *
00434  * Strategy for implementing points of variation between the
00435  * TRANSIENT and the PERSISTENT policies.
00436  */
00437 class TAO_Lifespan_Strategy
00438 {
00439 public:
00440 
00441   /// Virtual destructor.
00442   virtual ~TAO_Lifespan_Strategy (void);
00443 
00444   /// Can be used with any policy.
00445   virtual int
00446   find_servant_using_system_id_and_user_id (
00447     const PortableServer::ObjectId &system_id,
00448     const PortableServer::ObjectId &user_id,
00449     PortableServer::Servant &servant,
00450     TAO_Active_Object_Map_Entry *&entry) = 0;
00451 
00452   /// Set the active map.
00453   void
00454   set_active_object_map (TAO_Active_Object_Map *active_object_map);
00455 
00456 protected:
00457 
00458   /// Pointer to the active map.
00459   TAO_Active_Object_Map *active_object_map_;
00460 };
00461 
00462 /**
00463  * @class TAO_Transient_Strategy
00464  *
00465  * @brief Transient strategy.
00466  *
00467  * Strategy for the TRANSIENT policy.
00468  */
00469 class TAO_Transient_Strategy : public TAO_Lifespan_Strategy
00470 {
00471 public:
00472   /// Can be used with any policy.
00473   virtual int
00474   find_servant_using_system_id_and_user_id (
00475     const PortableServer::ObjectId &system_id,
00476     const PortableServer::ObjectId &user_id,
00477     PortableServer::Servant &servant,
00478     TAO_Active_Object_Map_Entry *&entry);
00479 };
00480 
00481 #if !defined (CORBA_E_MICRO)
00482 /**
00483  * @class TAO_Persistent_Strategy
00484  *
00485  * @brief Persistent strategy.
00486  *
00487  * Strategy for the PERSISTENT policy.
00488  */
00489 class TAO_Persistent_Strategy : public TAO_Lifespan_Strategy
00490 {
00491 public:
00492   /// Can be used with any policy.
00493   virtual int
00494   find_servant_using_system_id_and_user_id (
00495     const PortableServer::ObjectId &system_id,
00496     const PortableServer::ObjectId &user_id,
00497     PortableServer::Servant &servant,
00498     TAO_Active_Object_Map_Entry *&entry);
00499 };
00500 #endif
00501 
00502 /**
00503  * @class TAO_Id_Assignment_Strategy
00504  *
00505  * @brief Id uniqueness strategy.
00506  *
00507  * Strategy for implementing points of variation between the
00508  * USER_ID and the SYSTEM_ID policies.
00509  */
00510 class TAO_Id_Assignment_Strategy
00511 {
00512 public:
00513   /// Virtual destructor.
00514   virtual ~TAO_Id_Assignment_Strategy (void);
00515 
00516   /// Must be used with SYSTEM_ID policy.
00517   virtual int
00518   bind_using_system_id (PortableServer::Servant servant,
00519                         CORBA::Short priority,
00520                         TAO_Active_Object_Map_Entry *&entry) = 0;
00521 
00522   /// Set the active map.
00523   void
00524   set_active_object_map (TAO_Active_Object_Map *active_object_map);
00525 
00526 protected:
00527 
00528   /// Pointer to the active map.
00529   TAO_Active_Object_Map *active_object_map_;
00530 };
00531 
00532 #if !defined (CORBA_E_MICRO)
00533 /**
00534  * @class TAO_User_Id_Strategy
00535  *
00536  * @brief User id strategy.
00537  *
00538  * Strategy for the USER_ID policy.
00539  */
00540 class TAO_User_Id_Strategy : public TAO_Id_Assignment_Strategy
00541 {
00542 public:
00543   /// Must be used with SYSTEM_ID policy.
00544   virtual int
00545   bind_using_system_id (PortableServer::Servant servant,
00546                         CORBA::Short priority,
00547                         TAO_Active_Object_Map_Entry *&entry);
00548 };
00549 #endif
00550 
00551 /**
00552  * @class TAO_System_Id_With_Unique_Id_Strategy
00553  *
00554  * @brief System id strategy.
00555  *
00556  * Strategy for the SYSTEM_ID policy (with UNIQUE_ID policy).
00557  */
00558 class TAO_System_Id_With_Unique_Id_Strategy
00559   : public TAO_Id_Assignment_Strategy
00560 {
00561 public:
00562   /// Must be used with SYSTEM_ID policy.
00563   virtual int
00564   bind_using_system_id (PortableServer::Servant servant,
00565                         CORBA::Short priority,
00566                         TAO_Active_Object_Map_Entry *&entry);
00567 };
00568 
00569 #if !defined (CORBA_E_MICRO)
00570 /**
00571  * @class TAO_System_Id_With_Multiple_Id_Strategy
00572  *
00573  * @brief System id strategy.
00574  *
00575  * Strategy for the SYSTEM_ID policy (with MULTIPLE_ID policy).
00576  */
00577 class TAO_System_Id_With_Multiple_Id_Strategy
00578   : public TAO_Id_Assignment_Strategy
00579 {
00580 public:
00581   /// Must be used with SYSTEM_ID policy.
00582   virtual int
00583   bind_using_system_id (PortableServer::Servant servant,
00584                         CORBA::Short priority,
00585                         TAO_Active_Object_Map_Entry *&entry);
00586 };
00587 #endif
00588 
00589 /**
00590  * @class TAO_Id_Hint_Strategy
00591  *
00592  * @brief Id uniqueness strategy.
00593  *
00594  * Strategy for implementing points of variation between the
00595  * active hint and the no hint policies.
00596  */
00597 class TAO_Id_Hint_Strategy
00598 {
00599 public:
00600   /// Virtual destructor.
00601   virtual ~TAO_Id_Hint_Strategy (void);
00602 
00603   /// Find the user id from the system id.
00604   virtual int
00605   recover_key (const PortableServer::ObjectId &system_id,
00606                PortableServer::ObjectId &user_id) = 0;
00607 
00608   /// Add to map.
00609   virtual int
00610   bind (TAO_Active_Object_Map_Entry &entry) = 0;
00611 
00612   /// Remove from map.
00613   virtual int
00614   unbind (TAO_Active_Object_Map_Entry &entry) = 0;
00615 
00616   /// Find system id.
00617   virtual int
00618   find (const PortableServer::ObjectId &system_id,
00619         TAO_Active_Object_Map_Entry *&entry) = 0;
00620 
00621   /// How big is the hint generated by this strategy?
00622   virtual size_t
00623   hint_size (void) = 0;
00624 
00625   /// Get the system id associated with this entry.
00626   virtual int
00627   system_id (PortableServer::ObjectId_out system_id,
00628              TAO_Active_Object_Map_Entry &entry) = 0;
00629 };
00630 
00631 /**
00632  * @class TAO_Active_Hint_Strategy
00633  *
00634  * @brief Active hint strategy.
00635  *
00636  * Strategy for adding active hints to ids.
00637  */
00638 class TAO_Active_Hint_Strategy : public TAO_Id_Hint_Strategy
00639 {
00640 public:
00641   TAO_Active_Hint_Strategy (CORBA::ULong map_size);
00642 
00643   /// Virtual destructor.
00644   virtual ~TAO_Active_Hint_Strategy (void);
00645 
00646   virtual int
00647   recover_key (const PortableServer::ObjectId &system_id,
00648                PortableServer::ObjectId &user_id);
00649 
00650   virtual int
00651   bind (TAO_Active_Object_Map_Entry &entry);
00652 
00653   virtual int
00654   unbind (TAO_Active_Object_Map_Entry &entry);
00655 
00656   virtual int
00657   find (const PortableServer::ObjectId &system_id,
00658         TAO_Active_Object_Map_Entry *&entry);
00659 
00660   virtual size_t
00661   hint_size (void);
00662 
00663   virtual int
00664   system_id (PortableServer::ObjectId_out system_id,
00665              TAO_Active_Object_Map_Entry &entry);
00666 
00667   typedef ACE_Active_Map_Manager_Adapter<
00668   PortableServer::ObjectId,
00669     TAO_Active_Object_Map_Entry *,
00670     TAO_Preserve_Original_Key_Adapter> system_id_map;
00671 
00672   system_id_map system_id_map_;
00673 };
00674 
00675 /**
00676  * @class TAO_No_Hint_Strategy
00677  *
00678  * @brief No hint strategy.
00679  *
00680  * Strategy for not adding active hints to ids.
00681  */
00682 class TAO_No_Hint_Strategy : public TAO_Id_Hint_Strategy
00683 {
00684 public:
00685   /// Virtual destructor.
00686   virtual ~TAO_No_Hint_Strategy (void);
00687 
00688   virtual int
00689   recover_key (const PortableServer::ObjectId &system_id,
00690                PortableServer::ObjectId &user_id);
00691 
00692   virtual int
00693   bind (TAO_Active_Object_Map_Entry &entry);
00694 
00695   virtual int
00696   unbind (TAO_Active_Object_Map_Entry &entry);
00697 
00698   virtual int
00699   find (const PortableServer::ObjectId &system_id,
00700         TAO_Active_Object_Map_Entry *&entry);
00701 
00702   virtual size_t
00703   hint_size (void);
00704 
00705   virtual int
00706   system_id (PortableServer::ObjectId_out system_id,
00707              TAO_Active_Object_Map_Entry &entry);
00708 };
00709 
00710 TAO_END_VERSIONED_NAMESPACE_DECL
00711 
00712 #if defined (__ACE_INLINE__)
00713 # include "tao/PortableServer/Active_Object_Map.inl"
00714 #endif /* __ACE_INLINE__ */
00715 
00716 #include /**/ "ace/post.h"
00717 
00718 #endif /* TAO_ACTIVE_OBJECT_MAP_H */

Generated on Tue Feb 2 17:40:53 2010 for TAO_PortableServer by  doxygen 1.4.7