00001 // -*- C++ -*- 00002 00003 // ================================================================ 00004 /** 00005 * @file Connection_Purging_Strategy.h 00006 * 00007 * $Id: Connection_Purging_Strategy.h 74014 2006-08-14 13:52:22Z johnnyw $ 00008 * 00009 * @author Chad Elliott (elliott_c@ociweb.com) 00010 */ 00011 // ================================================================ 00012 00013 #ifndef TAO_PURGING_STRATEGY_H 00014 #define TAO_PURGING_STRATEGY_H 00015 00016 #include /**/ "ace/pre.h" 00017 00018 #include /**/ "tao/TAO_Export.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #include /**/ "tao/Versioned_Namespace.h" 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 class TAO_Transport; 00029 00030 // **************************************************************** 00031 00032 /** 00033 * @class TAO_Connection_Purging_Strategy 00034 * 00035 * @brief The base class for all purging strategies 00036 * 00037 * This class is used by the Transport_Cache_Manager to maintain 00038 * ordering information on each Transport that is created. 00039 */ 00040 00041 class TAO_Export TAO_Connection_Purging_Strategy 00042 { 00043 public: 00044 /// The constructor 00045 TAO_Connection_Purging_Strategy (int cache_maximum); 00046 00047 /// The destructor 00048 virtual ~TAO_Connection_Purging_Strategy (void); 00049 00050 /// Return the maximum number of cache entries 00051 virtual int cache_maximum (void) const; 00052 00053 /// Sub-classes must implement these methods 00054 virtual void update_item (TAO_Transport* transport) = 0; 00055 00056 private: 00057 /// The maximum number of cach entries 00058 int cache_maximum_; 00059 }; 00060 00061 TAO_END_VERSIONED_NAMESPACE_DECL 00062 00063 #if defined (__ACE_INLINE__) 00064 # include "tao/Connection_Purging_Strategy.inl" 00065 #endif /* __ACE_INLINE__ */ 00066 00067 #include /**/ "ace/post.h" 00068 #endif /* TAO_PURGING_STRATEGY_H */