urv.olsr.data.topology
Class TopologyInformationBaseTable

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<K,java.lang.Integer>
          extended by urv.olsr.data.ExpiringEntryTable<OLSRNodePair,TopologyInformationBaseEntry>
              extended by urv.olsr.data.topology.TopologyInformationBaseTable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<OLSRNodePair,java.lang.Integer>, Loggable

public class TopologyInformationBaseTable
extends ExpiringEntryTable<OLSRNodePair,TopologyInformationBaseEntry>
implements Loggable

This class contains information about the received TC_Messages There exists one entry per originator of the TC_Message. The entries contain a list of: advertised neighbors, seq. number and validity time Each node in the network maintains topology information about the network. This information is acquired from TC-messages and is used for routing table calculations. Thus, for each destination in the network, at least one "Topology Tuple" (T_dest_addr, T_last_addr, T_seq, T_time) is recorded. T_dest_addr is the main address of a node, which may be reached in one hop from the node with the main address T_last_addr. Typically, T_last_addr is a MPR of T_dest_addr. T_seq is a sequence number, and T_time specifies the time at which this tuple expires and *MUST* be removed. In a node, the set of Topology Tuples are denoted the "Topology Set".

Author:
Marcel Arrufat Arias
See Also:
Serialized Form

Constructor Summary
TopologyInformationBaseTable(OLSRNode localNode)
           
 
Method Summary
 void addTopologyInformationBaseEntry(OLSRNode originator, OLSRNode advertisedNode, SequenceNumber seqNum, int expiringTime)
          Adds a new entry to the table
 java.lang.Object clone()
           
 int hashCode()
           
 boolean isTopologyTableChangedFlag()
           
 void onTableChange()
           
 void removeOldEntriesForOriginator(OLSRNode originator)
          Removes all entries of the table from the given originator
 void setTopologyTableChangedFlag(boolean topologyTableChangedFlag)
           
 java.lang.String toString()
           
 
Methods inherited from class urv.olsr.data.ExpiringEntryTable
addEntryWithTimestamp, decreaseTimeAndProcessEntries, getEntry, getLock, keySet, overwriteEntryWithTimestamp, removeEntry, updateTimestampInEntry
 
Methods inherited from class java.util.Hashtable
clear, contains, containsKey, containsValue, elements, entrySet, equals, get, isEmpty, keys, put, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TopologyInformationBaseTable

public TopologyInformationBaseTable(OLSRNode localNode)
Parameters:
expiringTime -
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.util.Hashtable<OLSRNodePair,java.lang.Integer>

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map<OLSRNodePair,java.lang.Integer>
Overrides:
hashCode in class java.util.Hashtable<OLSRNodePair,java.lang.Integer>

onTableChange

public void onTableChange()
Specified by:
onTableChange in class ExpiringEntryTable<OLSRNodePair,TopologyInformationBaseEntry>

toString

public java.lang.String toString()
Specified by:
toString in interface Loggable
Overrides:
toString in class ExpiringEntryTable<OLSRNodePair,TopologyInformationBaseEntry>

addTopologyInformationBaseEntry

public void addTopologyInformationBaseEntry(OLSRNode originator,
                                            OLSRNode advertisedNode,
                                            SequenceNumber seqNum,
                                            int expiringTime)
Adds a new entry to the table

Parameters:
node -
entry -

removeOldEntriesForOriginator

public void removeOldEntriesForOriginator(OLSRNode originator)
Removes all entries of the table from the given originator

Parameters:
originator -

setTopologyTableChangedFlag

public void setTopologyTableChangedFlag(boolean topologyTableChangedFlag)
Parameters:
topologyTableChangedFlag - The topologyTableChangedFlag to set.

isTopologyTableChangedFlag

public boolean isTopologyTableChangedFlag()
Returns:
Returns the topologyTableChangedFlag.