当前位置: 首页>>代码示例>>Java>>正文


Java LsaWrapper.setLsaProcessing方法代码示例

本文整理汇总了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());
            }
        }
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:24,代码来源:LsdbAgeImpl.java

示例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());
            }
        }
    }
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:24,代码来源:LsdbAgeImpl.java

示例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());
        }
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:29,代码来源:LsdbAgeImpl.java

示例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());
        }
    }
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:30,代码来源:LsdbAgeImpl.java


注:本文中的org.onosproject.ospf.controller.LsaWrapper.setLsaProcessing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。