public class OspfLsdbImpl extends Object implements org.onosproject.ospf.controller.OspfLsdb
| Constructor and Description |
|---|
OspfLsdbImpl(org.onosproject.ospf.controller.OspfArea ospfArea)
Creates an instance of OSPF LSDB.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addLsa(org.onosproject.ospf.protocol.lsa.LsaHeader newLsa,
boolean isSelfOriginated,
org.onosproject.ospf.controller.OspfInterface ospfInterface)
Installs a new self-originated LSA if possible.
|
void |
addLsaToMaxAgeBin(String key,
Object wrapper)
Adds the LSA to maxAge bin.
|
void |
deleteLsa(org.onosproject.ospf.protocol.lsa.LsaHeader lsaHeader)
Deletes the given LSA.
|
boolean |
equals(Object o) |
org.onosproject.ospf.controller.LsaWrapper |
findLsa(int lsType,
String lsaKey)
Finds the LSA from appropriate maps.
|
List |
getAllLsaHeaders(boolean excludeMaxAgeLsa,
boolean isOpaqueCapable)
Returns all LSA Headers (Router and Summary) in a Vector.
|
String |
getLsaKey(org.onosproject.ospf.protocol.lsa.LsaHeader lsaHeader)
Gets the LSDB LSA key from Lsa Header.
|
long |
getLsSequenceNumber(org.onosproject.ospf.controller.OspfLsaType lsaType)
Gets the sequence number.
|
int |
hashCode() |
void |
initializeDb()
Initializes the link state database.
|
String |
isNewerOrSameLsa(org.onosproject.ospf.protocol.lsa.LsaHeader lsa1,
org.onosproject.ospf.protocol.lsa.LsaHeader lsa2)
RFC 2328 - Section 13.1.
|
org.onosproject.ospf.controller.LsaWrapper |
lsaLookup(org.onosproject.ospf.protocol.lsa.LsaHeader lsaHeader)
Gets wrapper instance in LSDB.
|
void |
removeLsaFromBin(Object lsaWrapper)
Removes LSA from Bin.
|
void |
setNetworkLsaSeqNo(long networkLsaSeqNo)
Sets sequence number.
|
void |
setRouterLsaSeqNo(long routerLsaSeqNo)
Sets sequence number.
|
public OspfLsdbImpl(org.onosproject.ospf.controller.OspfArea ospfArea)
ospfArea - area instancepublic void initializeDb()
initializeDb in interface org.onosproject.ospf.controller.OspfLsdbpublic List getAllLsaHeaders(boolean excludeMaxAgeLsa, boolean isOpaqueCapable)
getAllLsaHeaders in interface org.onosproject.ospf.controller.OspfLsdbexcludeMaxAgeLsa - exclude the max age LSAsisOpaqueCapable - is opaque capable or notpublic String getLsaKey(org.onosproject.ospf.protocol.lsa.LsaHeader lsaHeader)
lsaHeader - LSA header instancepublic org.onosproject.ospf.controller.LsaWrapper lsaLookup(org.onosproject.ospf.protocol.lsa.LsaHeader lsaHeader)
lsaHeader - LSA header instance.public org.onosproject.ospf.controller.LsaWrapper findLsa(int lsType,
String lsaKey)
findLsa in interface org.onosproject.ospf.controller.OspfLsdblsType - type of LSAlsaKey - keypublic boolean addLsa(org.onosproject.ospf.protocol.lsa.LsaHeader newLsa,
boolean isSelfOriginated,
org.onosproject.ospf.controller.OspfInterface ospfInterface)
newLsa - LSA header instanceisSelfOriginated - is self originated or notospfInterface - OSPF interface instancepublic void addLsaToMaxAgeBin(String key, Object wrapper)
addLsaToMaxAgeBin in interface org.onosproject.ospf.controller.OspfLsdbkey - keywrapper - LSA wrapper instancepublic void removeLsaFromBin(Object lsaWrapper)
removeLsaFromBin in interface org.onosproject.ospf.controller.OspfLsdblsaWrapper - LSA wrapper instancepublic String isNewerOrSameLsa(org.onosproject.ospf.protocol.lsa.LsaHeader lsa1, org.onosproject.ospf.protocol.lsa.LsaHeader lsa2)
lsa1 - LSA instancelsa2 - LSA instancepublic long getLsSequenceNumber(org.onosproject.ospf.controller.OspfLsaType lsaType)
lsaType - type of LSApublic void deleteLsa(org.onosproject.ospf.protocol.lsa.LsaHeader lsaHeader)
lsaHeader - LSA header instancepublic void setRouterLsaSeqNo(long routerLsaSeqNo)
routerLsaSeqNo - sequence numberpublic void setNetworkLsaSeqNo(long networkLsaSeqNo)
networkLsaSeqNo - sequence numberCopyright © 2016. All rights reserved.