The Least Recently Used connection purging strategy. More...
#include <LRU_Connection_Purging_Strategy.h>
Public Member Functions | |
TAO_LRU_Connection_Purging_Strategy (int cache_maximum) | |
The constructor. | |
virtual | ~TAO_LRU_Connection_Purging_Strategy (void) |
The destructor. | |
virtual void | update_item (TAO_Transport *transport) |
Called when accessing an item from the cache. | |
Private Attributes | |
unsigned long | order_ |
The ordering information for each transport in the cache. |
The Least Recently Used connection purging strategy.
This class maintains it's own count which is applied to the item passed in. This way, the least recently used transport has the smallest ordering number and will therefore be purged first.
Definition at line 38 of file LRU_Connection_Purging_Strategy.h.
TAO_LRU_Connection_Purging_Strategy::TAO_LRU_Connection_Purging_Strategy | ( | int | cache_maximum | ) |
The constructor.
Definition at line 12 of file LRU_Connection_Purging_Strategy.cpp.
: TAO_Connection_Purging_Strategy (cache_maximum), order_ (0) { }
TAO_LRU_Connection_Purging_Strategy::~TAO_LRU_Connection_Purging_Strategy | ( | void | ) | [virtual] |
void TAO_LRU_Connection_Purging_Strategy::update_item | ( | TAO_Transport * | transport | ) | [virtual] |
Called when accessing an item from the cache.
Implements TAO_Connection_Purging_Strategy.
Definition at line 26 of file LRU_Connection_Purging_Strategy.cpp.
{ transport->purging_order (++this->order_); }
unsigned long TAO_LRU_Connection_Purging_Strategy::order_ [private] |
The ordering information for each transport in the cache.
Definition at line 53 of file LRU_Connection_Purging_Strategy.h.