net.jolsrv2.repository.topology
Class AnsnHistorySet

java.lang.Object
  extended by net.jolsrv2.repository.topology.AnsnHistorySet

public class AnsnHistorySet
extends java.lang.Object

The class implements the ANSN history set, as specified in OLSRv2.

Author:
Andreas Schjønhaug

Constructor Summary
AnsnHistorySet()
          Constructor
 
Method Summary
 java.lang.Object clone()
          Implementation of the singleton design pattern.
static AnsnHistorySet getAnsnHistorySet()
          Implementation of the singleton design pattern
 boolean populate(java.net.InetAddress originatorAddress, int ansn, long validityTime)
          Method populating the advertised neighbour set, as proposed in the specification
 void purgeAnsn()
          The method purges the ANSN history set, deleting entries with expired ANSN
 void purgeTime()
          The method purges the ANSN history set, deleting entries with expired time
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnsnHistorySet

public AnsnHistorySet()
Constructor

Method Detail

getAnsnHistorySet

public static AnsnHistorySet getAnsnHistorySet()
Implementation of the singleton design pattern

Returns:
the ANSN history set

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Implementation of the singleton design pattern. This method is used to ensure that the class can not be cloned.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

populate

public boolean populate(java.net.InetAddress originatorAddress,
                        int ansn,
                        long validityTime)
Method populating the advertised neighbour set, as proposed in the specification


purgeTime

public void purgeTime()
The method purges the ANSN history set, deleting entries with expired time


purgeAnsn

public void purgeAnsn()
The method purges the ANSN history set, deleting entries with expired ANSN