fifo_connection_purging_strategy.h

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C头文件 代码 · 共 55 行

H
55
字号
// ================================================================
/**
 *  @file   FIFO_Connection_Purging_Strategy.h
 *
 *  FIFO_Connection_Purging_Strategy.h,v 1.5 2003/07/21 23:51:39 dhinton Exp
 *
 *  @author Chad Elliott (elliott_c@ociweb.com)
 */
// ================================================================

#ifndef TAO_FIFO_PURGING_STRATEGY_H
#define TAO_FIFO_PURGING_STRATEGY_H
#include /**/ "ace/pre.h"

#include "strategies_export.h"
#include "tao/Connection_Purging_Strategy.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

// ****************************************************************

/**
 * @class TAO_FIFO_Connection_Purging_Strategy
 *
 * @brief The First In First Out connection purging strategy
 *
 * This class maintains it's own count which is only applied to the
 * item passed if it has not yet been cached.  This way, each successive
 * transport has a larger ordering number than the previous.  This will
 * cause the first transport to be purged first.
 */

class TAO_Strategies_Export TAO_FIFO_Connection_Purging_Strategy:
                            public TAO_Connection_Purging_Strategy
{
public:
  /// The constructor
  TAO_FIFO_Connection_Purging_Strategy (int cache_maximum);

  /// The destructor
  virtual ~TAO_FIFO_Connection_Purging_Strategy (void);

  /// Called when accessing an item from the cache
  virtual void update_item (TAO_Transport* transport);

private:
  /// The ordering information for each transport in the cache
  unsigned long order_;
};

#include /**/ "ace/post.h"
#endif /* TAO_FIFO_PURGING_STRATEGY_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?