|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.OSPFv2.LSDatabase
An OSPF Link State database.
| Field Summary | |
java.util.HashMap |
routerLSAs
HashMaps for keeping all LSA's belonging to one area. |
java.util.HashMap |
summaryLSAs
|
| Constructor Summary | |
LSDatabase(OSPF ospf,
AreaData area)
|
|
| Method Summary | |
void |
ageAndCheckLSAs()
Age all LSAs in this Area and check self-originated LSAs for reorigination. |
void |
ageAndCheckLSAsOfType(byte lsType)
Called by "ageAndCheckLSAs()" to age a particular kind of LSAs and check self-originated LSAs whether they must be reoriginated or not. |
void |
clear()
clear the LSDatabase. |
java.util.Vector |
getAllLSAHeaders()
return all LSA Headers (Router and Summary) in a Vector. |
LSA |
getLSA(java.lang.String key)
Determine whether a particular LSA is stored in this database, and if so return a complete copy of this LSA, otherwise return null. |
java.util.HashMap |
getLSAHashMap(byte type)
Return the HashMap in which LSAs of the type given in the parameter type are stored. |
int |
getNextSeqNum(java.lang.String lsaKey,
byte lsaType)
Return the sequence number of the next instance of the LSA specified by its key and its type. |
java.util.Vector |
getRouterAndNetworkLSAs()
Return all router and network LSAs in a Vector. |
boolean |
hasInstanceOf(LSA testLSA)
Check whether an instance of the given LSA exists and if so return true else false. |
boolean |
hasRightInstanceOf(LSA testLSA)
Check whether an instance of the given LSA exists and if so return true if this instance is newer than the given one else false. |
boolean |
installOwnLSA(LSA newLSA)
installs a new self-originated LSA if possible. |
boolean |
installRecLSA(LSA newLSA)
installs an LSA received during the flooding process or in database exchange process if possible. |
java.lang.String |
isNewerThan(LSA lsa1,
LSA lsa2)
Take two instances of an LSA and determine which of them is newer. |
void |
prematureAgeLSA(byte type,
int lsID)
Set a particular LSA's age to MAX_AGE and flood it out to flush it from the routing domain. |
void |
printDatabase()
Print lists of all Router- and Summary-LSAs stored in this database. |
void |
setNextSeqNum(java.lang.String lsaKey,
byte lsaType,
int newSeqNum)
Set value of nextSeqNum of the LSA specified by lsaKey and lsaType to newSeqNum. |
boolean |
shouldRecalcRoutTable(LSA newLSA,
LSA oldLSA)
Return true if the new LSA to install differs from the old LSA already stored here, otherwise false. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.util.HashMap routerLSAs
public java.util.HashMap summaryLSAs
| Constructor Detail |
public LSDatabase(OSPF ospf,
AreaData area)
| Method Detail |
public boolean installOwnLSA(LSA newLSA)
public boolean installRecLSA(LSA newLSA)
public boolean shouldRecalcRoutTable(LSA newLSA,
LSA oldLSA)
public java.util.Vector getAllLSAHeaders()
public java.util.HashMap getLSAHashMap(byte type)
public boolean hasRightInstanceOf(LSA testLSA)
public boolean hasInstanceOf(LSA testLSA)
public LSA getLSA(java.lang.String key)
key - String representing the unique identifier of an LSA. (see LSA.getKey).
public int getNextSeqNum(java.lang.String lsaKey,
byte lsaType)
lsaKey - String representing the key value of the LSA.lsaType - byte value indicating the type of the LSA.
public void setNextSeqNum(java.lang.String lsaKey,
byte lsaType,
int newSeqNum)
lsaKey - String representing the key value of the LSA.lsaType - byte value indicating the type of the LSA.newSeqNum - The new sequence number of the next LSA instance to be installed.
public java.lang.String isNewerThan(LSA lsa1,
LSA lsa2)
lsa1 - first LSA to compare.lsa2 - second LSA to compare.
public void prematureAgeLSA(byte type,
int lsID)
type - byte value indicating the type of the LSA to be premature aged.lsID - int value representing an ip address of a network (LSA type 3) or the
ip address which serves as id of the destination router (LSA type 4).public void ageAndCheckLSAs()
public void ageAndCheckLSAsOfType(byte lsType)
lsType - byte value, indicating the type of the LSAs to be aged and checked.public void printDatabase()
public java.util.Vector getRouterAndNetworkLSAs()
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||