00001 // -*- C++ -*- 00002 00003 // ================================================================ 00004 /** 00005 * @file LFU_Connection_Purging_Strategy.h 00006 * 00007 * $Id: LFU_Connection_Purging_Strategy.h 73152 2006-06-20 07:33:02Z jwillemsen $ 00008 * 00009 * @author Chad Elliott (elliott_c@ociweb.com) 00010 */ 00011 // ================================================================ 00012 00013 #ifndef TAO_LFU_PURGING_STRATEGY_H 00014 #define TAO_LFU_PURGING_STRATEGY_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "tao/Strategies/strategies_export.h" 00018 #include "tao/Connection_Purging_Strategy.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 // **************************************************************** 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 /** 00029 * @class TAO_LFU_Connection_Purging_Strategy 00030 * 00031 * @brief The Least Frequently Used connection purging strategy 00032 * 00033 * This class increments the order information on each item passed 00034 * in. This way, the least frequently used transport has the 00035 * smallest ordering number and will therefore be purged first. 00036 */ 00037 00038 class TAO_Strategies_Export TAO_LFU_Connection_Purging_Strategy: 00039 public TAO_Connection_Purging_Strategy 00040 { 00041 public: 00042 /// The constructor 00043 TAO_LFU_Connection_Purging_Strategy (int cache_maximum); 00044 00045 /// Called when accessing an item from the cache 00046 virtual void update_item (TAO_Transport* transport); 00047 }; 00048 00049 TAO_END_VERSIONED_NAMESPACE_DECL 00050 00051 #include /**/ "ace/post.h" 00052 #endif /* TAO_LFU_PURGING_STRATEGY_H */