net.jolsrv2.repository.topology
Class TopologySet

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

public final class TopologySet
extends java.lang.Object

The class implements the topology set, as specified in OLSRv2.

Author:
Andreas Schjønhaug

Method Summary
 java.lang.Object clone()
          Implementation of the singleton design pattern.
static TopologySet getTopologySet()
          Implementation of the singleton design pattern.
 java.util.ArrayList<TopologyTuple> getTuples()
          Returns the topology tuples
 boolean update(java.util.ArrayList<CidrAddress> libCAddresses, java.util.ArrayList<java.net.InetAddress> addresses, java.util.ArrayList<Tlv> tlvs, long validityTime, int ansn)
          Updates the topology set as suggested in the specification
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTopologySet

public static TopologySet getTopologySet()
Implementation of the singleton design pattern.

Returns:
the topology 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

update

public boolean update(java.util.ArrayList<CidrAddress> libCAddresses,
                      java.util.ArrayList<java.net.InetAddress> addresses,
                      java.util.ArrayList<Tlv> tlvs,
                      long validityTime,
                      int ansn)
Updates the topology set as suggested in the specification

Parameters:
libCAddresses - the LIB CIDR address
addresses - the IP addresses
tlvs - the TLVs
validityTime - the validity time
ansn - the ANSN
Returns:
true if a change is detected

getTuples

public java.util.ArrayList<TopologyTuple> getTuples()
Returns the topology tuples

Returns:
the topology tuples