Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ace / Connection_Recycling_Strategy.h
blob816cc4285c874265ce427e236d0831a9e37708fb
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Connection_Recycling_Strategy.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
10 #ifndef ACE_CONNECTION_RECYCLING_STRATEGY_H
11 #define ACE_CONNECTION_RECYCLING_STRATEGY_H
12 #include /**/ "ace/pre.h"
14 #include "ace/Recyclable.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
22 /**
23 * @class ACE_Connection_Recycling_Strategy
25 * @brief Defines the interface for a connection recycler.
27 class ACE_Export ACE_Connection_Recycling_Strategy
29 public:
30 ACE_Connection_Recycling_Strategy ();
32 /// Virtual Destructor
33 virtual ~ACE_Connection_Recycling_Strategy () = default;
35 /// Remove from cache.
36 virtual int purge (const void *recycling_act) = 0;
38 /// Add to cache.
39 virtual int cache (const void *recycling_act) = 0;
41 virtual int recycle_state (const void *recycling_act,
42 ACE_Recyclable_State new_state) = 0;
44 /// Get/Set recycle_state.
45 virtual ACE_Recyclable_State recycle_state (const void *recycling_act) const = 0;
47 /// Mark as closed.
48 virtual int mark_as_closed (const void *recycling_act) = 0;
50 /// Mark as closed.(non-locking version)
51 virtual int mark_as_closed_i (const void *recycling_act) = 0;
53 /// Cleanup hint and reset @a act_holder to zero if @a act_holder != 0.
54 virtual int cleanup_hint (const void *recycling_act,
55 void **act_holder = 0) = 0;
58 ACE_END_VERSIONED_NAMESPACE_DECL
60 #include /**/ "ace/post.h"
62 #endif /*ACE_CONNECTION_RECYCLING_STRATEGY*/