|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary<K,V> java.util.Hashtable<K,java.lang.Integer> urv.olsr.data.ExpiringEntryTable<OLSRNode,NeighborTableEntry> urv.olsr.data.neighbour.NeighborTable
public class NeighborTable
Table which contains information about neighbors of the current node and status with all neighbors. A list of neighbors of neighbors (NoN) is also available for each entry This table contains information about the MPRSelectors of the node Entries will be removed when timeout expires or when receiving anew HELLO_MESSAGE with LinkCode == NOT_NEIGH
Constructor Summary | |
---|---|
NeighborTable(OLSRNode localNode,
NeighborsOfNeighborsSet neighborsOfNeighborsSet)
Creates a new table (with entries that may expire) for storing all information about neighbors |
Method Summary | |
---|---|
void |
addNeighborEntryWithTimestamp(OLSRNode node,
NeighborTableEntry entry,
int expiringTime)
Adds a new entry to the table |
HelloMessage |
createHelloMessage()
Returns a new hello message from the information stored in the neighbor table |
boolean |
entryExists(OLSRNode node)
Checks if the node has an entry inside the Neighbor Table |
OLSRSet |
getCopyOfNeighbors()
Returns a copy of a set containing all the neighbors of the node |
OLSRSet |
getCopyOfSymNeighbors()
Returns a copy of a set containing all the neighbors of the node |
OLSRNode |
getLocalNode()
|
int |
hashCode()
|
boolean |
isNeighborTableChangedFlag()
|
boolean |
isRecomputeMprFlag()
|
boolean |
isSymmetricNeighbor(OLSRNode node)
Returns true if the specified node is in the symmetric 1-hop neighborhood of the local node |
void |
onMPRSetChange(MprSet mprSet2)
This method is invoked when changes are performed in the tmpMprSet we need to update the link status in the Neighbor Table |
void |
onTableChange()
|
void |
setNeighborTableChangedFlag(boolean neighborTableChanged)
This Flag is set to true when a new neighbor or 2-hop neighbor is detected |
void |
setRecomputeMprFlag(boolean recomputeMPR)
|
java.lang.String |
toString()
|
void |
updateBwOf(OLSRNode originatorNode)
|
Methods inherited from class urv.olsr.data.ExpiringEntryTable |
---|
addEntryWithTimestamp, decreaseTimeAndProcessEntries, getEntry, getLock, keySet, overwriteEntryWithTimestamp, removeEntry, updateTimestampInEntry |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, 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 |
---|
public NeighborTable(OLSRNode localNode, NeighborsOfNeighborsSet neighborsOfNeighborsSet)
localNode
- neighborsOfNeighborsSet
- Method Detail |
---|
public java.lang.String toString()
toString
in interface Loggable
toString
in class ExpiringEntryTable<OLSRNode,NeighborTableEntry>
public void updateBwOf(OLSRNode originatorNode)
updateBwOf
in interface BandwidthUpdatable
public int hashCode()
hashCode
in interface java.util.Map<OLSRNode,java.lang.Integer>
hashCode
in class java.util.Hashtable<OLSRNode,java.lang.Integer>
public void onTableChange()
onTableChange
in class ExpiringEntryTable<OLSRNode,NeighborTableEntry>
public void addNeighborEntryWithTimestamp(OLSRNode node, NeighborTableEntry entry, int expiringTime)
node
- entry
- public HelloMessage createHelloMessage()
public boolean entryExists(OLSRNode node)
node
- public OLSRSet getCopyOfNeighbors()
public OLSRSet getCopyOfSymNeighbors()
public boolean isSymmetricNeighbor(OLSRNode node)
node
-
public void onMPRSetChange(MprSet mprSet2)
mprSet2
- public OLSRNode getLocalNode()
public boolean isNeighborTableChangedFlag()
public boolean isRecomputeMprFlag()
public void setNeighborTableChangedFlag(boolean neighborTableChanged)
neighborTableChangedFlag
- The neighborTableChangedFlag to set.public void setRecomputeMprFlag(boolean recomputeMPR)
recomputeMPR
- The recomputeMPR to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |