net.jolsrv2.repository.processforward
Class ReceivedSet

java.lang.Object
  extended by net.jolsrv2.repository.processforward.ReceivedSet

public class ReceivedSet
extends java.lang.Object

The class implements the received tuple, as specified in OLSRv2.

Author:
Andreas Schjønhaug

Constructor Summary
ReceivedSet()
          Constructor
 
Method Summary
 void addTuple(MessageTypes type, java.net.InetAddress address, int sequenceNumber, long time)
          Adds a received tuple to the received tuple set
 boolean contains(MessageTypes type, java.net.InetAddress address, int sequenceNumber)
          Checks if the received set contains a received tuple with having a certain message type, IP address and sequence number
 void purge()
          The method purges the received set, deleting expired entries
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceivedSet

public ReceivedSet()
Constructor

Method Detail

contains

public boolean contains(MessageTypes type,
                        java.net.InetAddress address,
                        int sequenceNumber)
Checks if the received set contains a received tuple with having a certain message type, IP address and sequence number

Parameters:
type - the message type
address - the IP address
sequenceNumber - the sequence number
Returns:
true if a change has been detected

addTuple

public void addTuple(MessageTypes type,
                     java.net.InetAddress address,
                     int sequenceNumber,
                     long time)
Adds a received tuple to the received tuple set

Parameters:
type - the message type
address - the IP address
sequenceNumber - the sequence number
time - the time

purge

public void purge()
The method purges the received set, deleting expired entries