00001 // -*- C++ -*- 00002 00003 // ================================================================ 00004 /** 00005 * @file FIFO_Connection_Purging_Strategy.h 00006 * 00007 * $Id: FIFO_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_FIFO_PURGING_STRATEGY_H 00014 #define TAO_FIFO_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_FIFO_Connection_Purging_Strategy 00030 * 00031 * @brief The First In First Out connection purging strategy 00032 * 00033 * This class maintains it's own count which is only applied to the 00034 * item passed if it has not yet been cached. This way, each successive 00035 * transport has a larger ordering number than the previous. This will 00036 * cause the first transport to be purged first. 00037 */ 00038 00039 class TAO_Strategies_Export TAO_FIFO_Connection_Purging_Strategy: 00040 public TAO_Connection_Purging_Strategy 00041 { 00042 public: 00043 /// The constructor 00044 TAO_FIFO_Connection_Purging_Strategy (int cache_maximum); 00045 00046 /// Called when accessing an item from the cache 00047 virtual void update_item (TAO_Transport* transport); 00048 00049 private: 00050 /// The ordering information for each transport in the cache 00051 unsigned long order_; 00052 }; 00053 00054 TAO_END_VERSIONED_NAMESPACE_DECL 00055 00056 #include /**/ "ace/post.h" 00057 #endif /* TAO_FIFO_PURGING_STRATEGY_H */