Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / ServantRetentionStrategyNonRetain.h
blob0e778aeb49d178c531a0073f3c5b4ad32adc68b5
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ServantRetentionStrategyNonRetain.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
8 */
9 //=============================================================================
11 #ifndef TAO_SERVANT_RETENTION_STRATEGY_NON_RETAIN_H
12 #define TAO_SERVANT_RETENTION_STRATEGY_NON_RETAIN_H
13 #include /**/ "ace/pre.h"
15 #include "tao/PortableServer/ServantRetentionStrategy.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/PortableServer/Servant_Location.h"
22 #include <atomic>
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 class TAO_Root_POA;
28 namespace TAO
30 namespace Portable_Server
32 class ServantRetentionStrategyNonRetain
33 : public ServantRetentionStrategy
35 public:
36 ServantRetentionStrategyNonRetain () = default;
38 void strategy_init (TAO_Root_POA *poa) override;
40 void strategy_cleanup() override;
42 CORBA::ULong waiting_servant_deactivation () const override;
44 PortableServer::ObjectId *
45 activate_object (PortableServer::Servant servant,
46 CORBA::Short priority,
47 bool &wait_occurred_restart_call) override;
49 void
50 activate_object_with_id (const PortableServer::ObjectId &id,
51 PortableServer::Servant servant,
52 CORBA::Short priority,
53 bool &wait_occurred_restart_call) override;
55 void deactivate_object (const PortableServer::ObjectId &id) override;
57 PortableServer::Servant find_servant (
58 const PortableServer::ObjectId &system_id) override;
60 int is_servant_in_map (PortableServer::Servant servant,
61 bool &wait_occurred_restart_call) override;
63 PortableServer::ObjectId *system_id_to_object_id (
64 const PortableServer::ObjectId &system_id) override;
66 PortableServer::Servant
67 user_id_to_servant (const PortableServer::ObjectId &id) override;
69 CORBA::Object_ptr
70 id_to_reference (const PortableServer::ObjectId &id,
71 bool indirect) override;
73 TAO_Servant_Location servant_present (
74 const PortableServer::ObjectId &system_id,
75 PortableServer::Servant &servant) override;
77 PortableServer::Servant find_servant (
78 const PortableServer::ObjectId &system_id,
79 TAO::Portable_Server::Servant_Upcall &servant_upcall,
80 TAO::Portable_Server::POA_Current_Impl &poa_current_impl) override;
82 int find_servant_priority (
83 const PortableServer::ObjectId &system_id,
84 CORBA::Short &priority) override;
86 void deactivate_all_objects () override;
88 PortableServer::ObjectId *servant_to_user_id (PortableServer::Servant servant) override;
90 CORBA::Object_ptr servant_to_reference (PortableServer::Servant servant) override;
92 CORBA::Object_ptr create_reference (const char *intf, CORBA::Short priority) override;
94 #if !defined (CORBA_E_MICRO)
95 CORBA::Object_ptr create_reference_with_id (
96 const PortableServer::ObjectId &oid,
97 const char *intf,
98 CORBA::Short priority) override;
99 #endif
101 int rebind_using_user_id_and_system_id (
102 PortableServer::Servant servant,
103 const PortableServer::ObjectId &user_id,
104 const PortableServer::ObjectId &system_id,
105 TAO::Portable_Server::Servant_Upcall &servant_upcall) override;
107 CORBA::Boolean servant_has_remaining_activations (PortableServer::Servant servant) override;
109 int unbind_using_user_id (const PortableServer::ObjectId &user_id) override;
111 ::PortableServer::ServantRetentionPolicyValue type() const override;
113 TAO_Active_Object_Map * get_active_object_map() const override;
115 protected:
116 TAO_Root_POA *poa_ {};
117 std::atomic<uint32_t> sys_id_count_ { 0 };
122 TAO_END_VERSIONED_NAMESPACE_DECL
124 #include /**/ "ace/post.h"
125 #endif /* TAO_SERVANT_RETENTION_STRATEGY_NON_RETAIN_H */