The First In First Out connection purging strategy. More...
#include <FIFO_Connection_Purging_Strategy.h>
Public Member Functions | |
TAO_FIFO_Connection_Purging_Strategy (int cache_maximum) | |
The constructor. | |
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 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.
Definition at line 39 of file FIFO_Connection_Purging_Strategy.h.
TAO_FIFO_Connection_Purging_Strategy::TAO_FIFO_Connection_Purging_Strategy | ( | int | cache_maximum | ) |
The constructor.
Definition at line 11 of file FIFO_Connection_Purging_Strategy.cpp.
: TAO_Connection_Purging_Strategy (cache_maximum), // Initialized to 1 to insure that the transports purging_order // is only 0 upon initialization. order_ (1) { }
void TAO_FIFO_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 21 of file FIFO_Connection_Purging_Strategy.cpp.
{ // FIFO, so only update the purging order if this // item has not been cached yet. if (transport->purging_order () == 0) { transport->purging_order (this->order_++); } }
unsigned long TAO_FIFO_Connection_Purging_Strategy::order_ [private] |
The ordering information for each transport in the cache.
Definition at line 51 of file FIFO_Connection_Purging_Strategy.h.