urv.olsr.data.topology
Class TopologyInformationBaseTable
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<K,java.lang.Integer>
urv.olsr.data.ExpiringEntryTable<OLSRNodePair,TopologyInformationBaseEntry>
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
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 |
TopologyInformationBaseTable
public TopologyInformationBaseTable(OLSRNode localNode)
- Parameters:
expiringTime
-
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.