edu.utdallas.paged.mem.algorithm
Class NodeStampLIFO

java.lang.Object
  extended by edu.utdallas.paged.mem.algorithm.CacheAlgorithmBase
      extended by edu.utdallas.paged.mem.algorithm.NodeStampLIFO
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>

public class NodeStampLIFO
extends CacheAlgorithmBase

A class that keeps track of the index of a node in the bunch map, the last time this node was accessed and the number of connections for this node. The class also implements the comparable interface to sort nodes based on the timestamp and the number of connections

Author:
vaibhav

Field Summary
 
Fields inherited from class edu.utdallas.paged.mem.algorithm.CacheAlgorithmBase
connections, currTime, individualCC, transitiveCC
 
Constructor Summary
NodeStampLIFO()
           
 
Method Summary
 int compareTo(java.lang.Object o1)
          Method that implements the comparable interface for LIFO.
 
Methods inherited from class edu.utdallas.paged.mem.algorithm.CacheAlgorithmBase
getConnections, getCurrentTime, getIndividualCC, getTransitiveCC, setConnections, setCurrentTime, setIndividualCC, setTransitiveCC
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeStampLIFO

public NodeStampLIFO()
Method Detail

compareTo

public int compareTo(java.lang.Object o1)
Method that implements the comparable interface for LIFO.

Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>
Specified by:
compareTo in class CacheAlgorithmBase
Parameters:
o1 - - nodestamp object against which the current object is compared
Returns:
an integer that determines if the current node must come before the parameter node