本文整理汇总了Java中org.onosproject.ospf.controller.LsaWrapper.setLsaProcessing方法的典型用法代码示例。如果您正苦于以下问题:Java LsaWrapper.setLsaProcessing方法的具体用法?Java LsaWrapper.setLsaProcessing怎么用?Java LsaWrapper.setLsaProcessing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.onosproject.ospf.controller.LsaWrapper
的用法示例。
在下文中一共展示了LsaWrapper.setLsaProcessing方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkAges
import org.onosproject.ospf.controller.LsaWrapper; //导入方法依赖的package包/类
/**
* Verify the checksum for the LSAs who are in bins of 300 and it's multiples.
*/
public void checkAges() {
//evry 5 min age counter + multiples of 300
for (int age = OspfParameters.CHECKAGE; age < OspfParameters.MAXAGE;
age += OspfParameters.CHECKAGE) {
LsaBin lsaBin = ageBins.get(age2Bin(age));
if (lsaBin == null) {
continue;
}
Map lsaBinMap = lsaBin.listOfLsa();
for (Object key : lsaBinMap.keySet()) {
LsaWrapper lsa = (LsaWrapper) lsaBinMap.get((String) key);
lsa.setLsaProcessing(OspfParameters.VERIFYCHECKSUM);
try {
lsaQueue.put(lsa);
} catch (InterruptedException e) {
log.debug("Error::LSDBAge::checkAges::{}", e.getMessage());
}
}
}
}
示例2: checkAges
import org.onosproject.ospf.controller.LsaWrapper; //导入方法依赖的package包/类
/**
* Verify the checksum for the LSAs who are in bins of 300 and it's multiples.
*/
public void checkAges() {
//evry 5 min age counter + multiples of 300
for (int age = OspfParameters.CHECKAGE; age < OspfParameters.MAXAGE;
age += OspfParameters.CHECKAGE) {
LsaBin lsaBin = ageBins.get(age2Bin(age));
if (lsaBin == null) {
continue;
}
Map lsaBinMap = lsaBin.listOfLsa();
for (Object key : lsaBinMap.keySet()) {
LsaWrapper lsa = (LsaWrapper) lsaBinMap.get(key);
lsa.setLsaProcessing(OspfParameters.VERIFYCHECKSUM);
try {
lsaQueue.put(lsa);
} catch (InterruptedException e) {
log.debug("Error::LSDBAge::checkAges::{}", e.getMessage());
}
}
}
}
示例3: refreshLsa
import org.onosproject.ospf.controller.LsaWrapper; //导入方法依赖的package包/类
public void refreshLsa() {
int binNumber;
if (ageCounter < OspfParameters.LSREFRESHTIME) {
binNumber = ageCounter + OspfParameters.LSREFRESHTIME;
} else {
binNumber = ageCounter - OspfParameters.LSREFRESHTIME;
}
LsaBin lsaBin = ageBins.get(binNumber);
if (lsaBin == null) {
return;
}
Map lsaBinMap = lsaBin.listOfLsa();
for (Object key : lsaBinMap.keySet()) {
LsaWrapper lsa = (LsaWrapper) lsaBinMap.get((String) key);
try {
if (lsa.isSelfOriginated()) {
log.debug("Lsa picked for refreshLsa. binNumber: {}, LSA Type: {}, LSA Key: {}",
binNumber, lsa.lsaType(), key);
lsa.setLsaProcessing(OspfParameters.REFRESHLSA);
lsaQueue.put(lsa);
//remove from bin
lsaBin.removeOspfLsa((String) key, lsa);
}
} catch (InterruptedException e) {
log.debug("Error::LSDBAge::refreshLsa::{}", e.getMessage());
}
}
}
示例4: refreshLsa
import org.onosproject.ospf.controller.LsaWrapper; //导入方法依赖的package包/类
@Override
public void refreshLsa() {
int binNumber;
if (ageCounter < OspfParameters.LSREFRESHTIME) {
binNumber = ageCounter + OspfParameters.LSREFRESHTIME;
} else {
binNumber = ageCounter - OspfParameters.LSREFRESHTIME;
}
LsaBin lsaBin = ageBins.get(binNumber);
if (lsaBin == null) {
return;
}
Map lsaBinMap = lsaBin.listOfLsa();
for (Object key : lsaBinMap.keySet()) {
LsaWrapper lsa = (LsaWrapper) lsaBinMap.get(key);
try {
if (lsa.isSelfOriginated()) {
log.debug("Lsa picked for refreshLsa. binNumber: {}, LSA Type: {}, LSA Key: {}",
binNumber, lsa.lsaType(), key);
lsa.setLsaProcessing(OspfParameters.REFRESHLSA);
lsaQueue.put(lsa);
//remove from bin
lsaBin.removeOspfLsa((String) key, lsa);
}
} catch (InterruptedException e) {
log.debug("Error::LSDBAge::refreshLsa::{}", e.getMessage());
}
}
}