summaryrefslogtreecommitdiff
path: root/TAO/tao/Strategies/FIFO_Connection_Purging_Strategy.cpp
blob: d1e9d6940b30c54d51198cf9787df0156fe319f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// $Id$

#include "FIFO_Connection_Purging_Strategy.h"
#include "tao/Transport.h"

ACE_RCSID(tao, FIFO_Connection_Purging_Strategy, "$Id$")

TAO_FIFO_Connection_Purging_Strategy::TAO_FIFO_Connection_Purging_Strategy (
                                                            int cache_maximum)
 : TAO_Connection_Purging_Strategy (cache_maximum),
   // Initialized to 1 to insure that the transports purging_order
   // is only 0 upon initialization.
   order_ (1)
{
}


TAO_FIFO_Connection_Purging_Strategy::~TAO_FIFO_Connection_Purging_Strategy (void)
{
}


void
TAO_FIFO_Connection_Purging_Strategy::update_item (TAO_Transport* transport)
{
  // 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_++);
    }
}