• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ILinkDiscoveryListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener的典型用法代码示例。如果您正苦于以下问题:Java ILinkDiscoveryListener类的具体用法?Java ILinkDiscoveryListener怎么用?Java ILinkDiscoveryListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ILinkDiscoveryListener类属于net.floodlightcontroller.linkdiscovery包,在下文中一共展示了ILinkDiscoveryListener类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: doUpdatesThread

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
private void doUpdatesThread() throws InterruptedException {
	do {
		LDUpdate update = updates.take();
		List<LDUpdate> updateList = new ArrayList<LDUpdate>();
		updateList.add(update);

		// Add all the pending updates to the list.
		while (updates.peek() != null) {
			updateList.add(updates.remove());
		}

		if (linkDiscoveryAware != null && !updateList.isEmpty()) {
			if (log.isDebugEnabled()) {
				log.debug("Dispatching link discovery update {} {} {} {} {} {}ms for {}",
						new Object[] {
						update.getOperation(),
						update.getSrc(),
						update.getSrcPort(),
						update.getDst(),
						update.getDstPort(),
						update.getLatency().getValue(),
						linkDiscoveryAware });
			}
			try {
				for (ILinkDiscoveryListener lda : linkDiscoveryAware) { // order
					// maintained
					lda.linkDiscoveryUpdate(updateList);
				}
			} catch (Exception e) {
				log.error("Error in link discovery updates loop", e);
			}
		}
	} while (updates.peek() != null);
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:35,代码来源:LinkDiscoveryManager.java


示例2: doUpdatesThread

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
@LogMessageDoc(level = "ERROR",
		message = "Error in link discovery updates loop",
		explanation = "An unknown error occured while dispatching "
				+ "link update notifications",
				recommendation = LogMessageDoc.GENERIC_ACTION)
private void doUpdatesThread() throws InterruptedException {
	do {
		LDUpdate update = updates.take();
		List<LDUpdate> updateList = new ArrayList<LDUpdate>();
		updateList.add(update);

		// Add all the pending updates to the list.
		while (updates.peek() != null) {
			updateList.add(updates.remove());
		}

		if (linkDiscoveryAware != null) {
			if (log.isTraceEnabled()) {
				log.trace("Dispatching link discovery update {} {} {} {} {} for {}",
						new Object[] {
						update.getOperation(),
						update.getSrc().toString(),
						update.getSrcPort(),
						update.getDst().toString(),
						update.getDstPort(),
						linkDiscoveryAware });
			}
			try {
				for (ILinkDiscoveryListener lda : linkDiscoveryAware) { // order
					// maintained
					lda.linkDiscoveryUpdate(updateList);
				}
			} catch (Exception e) {
				log.error("Error in link discovery updates loop", e);
			}
		}
	} while (updates.peek() != null);
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:39,代码来源:LinkDiscoveryManager.java


示例3: doUpdatesThread

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
@LogMessageDoc(level = "ERROR",
               message = "Error in link discovery updates loop",
               explanation = "An unknown error occured while dispatching "
                             + "link update notifications",
               recommendation = LogMessageDoc.GENERIC_ACTION)
private void doUpdatesThread() throws InterruptedException {
    do {
        LDUpdate update = updates.take();
        List<LDUpdate> updateList = new ArrayList<LDUpdate>();
        updateList.add(update);

        // Add all the pending updates to the list.
        while (updates.peek() != null) {
            updateList.add(updates.remove());
        }

        if (linkDiscoveryAware != null) {
            if (log.isTraceEnabled()) {
                log.trace("Dispatching link discovery update {} {} {} {} {} for {}",
                          new Object[] {
                                        update.getOperation(),
                                        HexString.toHexString(update.getSrc()),
                                        update.getSrcPort(),
                                        HexString.toHexString(update.getDst()),
                                        update.getDstPort(),
                                        linkDiscoveryAware });
            }
            try {
                for (ILinkDiscoveryListener lda : linkDiscoveryAware) { // order
                    // maintained
                    lda.linkDiscoveryUpdate(updateList);
                }
            } catch (Exception e) {
                log.error("Error in link discovery updates loop", e);
            }
        }
    } while (updates.peek() != null);
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:39,代码来源:LinkDiscoveryManager.java


示例4: setUp

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    FloodlightModuleContext cntx = new FloodlightModuleContext();
    ldm = new TestLinkDiscoveryManager();
    TopologyManager routingEngine = new TopologyManager();
    ldm.linkDiscoveryAware = new ArrayList<ILinkDiscoveryListener>();
    MockThreadPoolService tp = new MockThreadPoolService();
    RestApiServer restApi = new RestApiServer();
    cntx.addService(IRestApiService.class, restApi);
    cntx.addService(IThreadPoolService.class, tp);
    cntx.addService(IRoutingService.class, routingEngine);
    cntx.addService(ILinkDiscoveryService.class, ldm);
    cntx.addService(ITopologyService.class, ldm);
    cntx.addService(IStorageSourceService.class, new MemoryStorageSource());
    cntx.addService(IFloodlightProviderService.class, getMockFloodlightProvider());
    restApi.init(cntx);
    tp.init(cntx);
    routingEngine.init(cntx);
    ldm.init(cntx);
    restApi.startUp(cntx);
    tp.startUp(cntx);
    routingEngine.startUp(cntx);
    ldm.startUp(cntx);

    IOFSwitch sw1 = createMockSwitch(1L);
    IOFSwitch sw2 = createMockSwitch(2L);
    Map<Long, IOFSwitch> switches = new HashMap<Long, IOFSwitch>();
    switches.put(1L, sw1);
    switches.put(2L, sw2);
    getMockFloodlightProvider().setSwitches(switches);
    replay(sw1, sw2);
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:35,代码来源:LinkDiscoveryManagerTest.java


示例5: doUpdatesThread

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
@LogMessageDoc(level="ERROR",
        message="Error in link discovery updates loop",
        explanation="An unknown error occured while dispatching " +
        		"link update notifications",
        recommendation=LogMessageDoc.GENERIC_ACTION)
private void doUpdatesThread() throws InterruptedException {
    do {
        LDUpdate update = updates.take();

        if (linkDiscoveryAware != null) {
            if (log.isTraceEnabled()) {
                log.trace("Dispatching link discovery update {} {} {} {} {} for {}",
                          new Object[]{update.getOperation(),
                                       HexString.toHexString(update.getSrc()), update.getSrcPort(),
                                       HexString.toHexString(update.getDst()), update.getDstPort(),
                                       linkDiscoveryAware});
            }
            try {
                for (ILinkDiscoveryListener lda : linkDiscoveryAware) { // order maintained
                    lda.linkDiscoveryUpdate(update);
                }
            }
            catch (Exception e) {
                log.error("Error in link discovery updates loop", e);
            }
        }
    } while (updates.peek() != null);
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:29,代码来源:LinkDiscoveryManager.java


示例6: init

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    storageSource = context.getServiceImpl(IStorageSourceService.class);
    threadPool = context.getServiceImpl(IThreadPoolService.class);
    restApi = context.getServiceImpl(IRestApiService.class);

    // Set the autoportfast feature to false.
    this.autoPortFastFeature = false;

    // We create this here because there is no ordering guarantee
    this.linkDiscoveryAware = new ArrayList<ILinkDiscoveryListener>();
    this.lock = new ReentrantReadWriteLock();
    this.updates = new LinkedBlockingQueue<LDUpdate>();
    this.links = new HashMap<Link, LinkInfo>();
    this.portLinks = new HashMap<NodePortTuple, Set<Link>>();
    this.suppressLinkDiscovery =
            Collections.synchronizedSet(new HashSet<NodePortTuple>());
    this.portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
    this.switchLinks = new HashMap<Long, Set<Link>>();
    this.quarantineQueue = new LinkedBlockingQueue<NodePortTuple>();
    this.maintenanceQueue = new LinkedBlockingQueue<NodePortTuple>();

    this.evHistTopologySwitch =
            new EventHistory<EventHistoryTopologySwitch>("Topology: Switch");
    this.evHistTopologyLink =
            new EventHistory<EventHistoryTopologyLink>("Topology: Link");
    this.evHistTopologyCluster =
            new EventHistory<EventHistoryTopologyCluster>("Topology: Cluster");
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:32,代码来源:LinkDiscoveryManager.java


示例7: setUp

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    super.setUp();
    FloodlightModuleContext cntx = new FloodlightModuleContext();
    ldm = new TestLinkDiscoveryManager();
    TopologyManager routingEngine = new TopologyManager();
    ldm.linkDiscoveryAware = new ArrayList<ILinkDiscoveryListener>();
    MockThreadPoolService tp = new MockThreadPoolService();
    RestApiServer restApi = new RestApiServer();
    cntx.addService(IRestApiService.class, restApi);
    cntx.addService(IThreadPoolService.class, tp);
    cntx.addService(IRoutingService.class, routingEngine);
    cntx.addService(ILinkDiscoveryService.class, ldm);
    cntx.addService(ITopologyService.class, ldm);
    cntx.addService(IStorageSourceService.class, new MemoryStorageSource());
    cntx.addService(IFloodlightProviderService.class, getMockFloodlightProvider());
    restApi.init(cntx);
    tp.init(cntx);
    routingEngine.init(cntx);
    ldm.init(cntx);
    restApi.startUp(cntx);
    tp.startUp(cntx);
    routingEngine.startUp(cntx);
    ldm.startUp(cntx);

    IOFSwitch sw1 = createMockSwitch(1L);
    IOFSwitch sw2 = createMockSwitch(2L);
    Map<Long, IOFSwitch> switches = new HashMap<Long, IOFSwitch>();
    switches.put(1L, sw1);
    switches.put(2L, sw2);
    getMockFloodlightProvider().setSwitches(switches);
    replay(sw1, sw2);
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:34,代码来源:LinkDiscoveryManagerTest.java


示例8: doUpdatesThread

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
@LogMessageDoc(level = "ERROR",
               message = "Error in link discovery updates loop",
               explanation = "An unknown error occured while dispatching "
                             + "link update notifications",
               recommendation = LogMessageDoc.GENERIC_ACTION)
private void doUpdatesThread() throws InterruptedException {
    do {
        LDUpdate update = updates.take();
        List<LDUpdate> updateList = new ArrayList<LDUpdate>();
        updateList.add(update);

        // Add all the pending updates to the list.
        while (updates.peek() != null) {
            updateList.add(updates.remove());
        }

        if (linkDiscoveryAware != null) {
            if (log.isTraceEnabled()) {
                log.trace("Dispatching link discovery update {} {} {} {} {} for {}",
                          new Object[] {
                                        update.getOperation(),
                                        HexString.toHexString(update.getSrc()),
                                        update.getSrcPort(),
                                        HexString.toHexString(update.getDst()),
                                        update.getDstPort(),
                                        linkDiscoveryAware });
            }
            try {
                for (ILinkDiscoveryListener lda : linkDiscoveryAware) { // order
                                                                        // maintained
                    lda.linkDiscoveryUpdate(updateList);
                }
            } catch (Exception e) {
                log.error("Error in link discovery updates loop", e);
            }
        }
    } while (updates.peek() != null);
}
 
开发者ID:dana-i2cat,项目名称:floodlight-nfv,代码行数:39,代码来源:LinkDiscoveryManager.java


示例9: doUpdatesThread

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
@LogMessageDoc(level = "ERROR",
               message = "Error in link discovery updates loop",
               explanation = "An unknown error occured while dispatching "
                             + "link update notifications",
               recommendation = LogMessageDoc.GENERIC_ACTION)
private
        void doUpdatesThread() throws InterruptedException {
    do {
        LDUpdate update = updates.take();
        List<LDUpdate> updateList = new ArrayList<LDUpdate>();
        updateList.add(update);

        // Add all the pending updates to the list.
        while (updates.peek() != null) {
            updateList.add(updates.remove());
        }

        if (linkDiscoveryAware != null) {
            if (log.isTraceEnabled()) {
                log.trace("Dispatching link discovery update {} {} {} {} {} for {}",
                          new Object[] {
                                        update.getOperation(),
                                        HexString.toHexString(update.getSrc()),
                                        update.getSrcPort(),
                                        HexString.toHexString(update.getDst()),
                                        update.getDstPort(),
                                        linkDiscoveryAware });
            }
            try {
                for (ILinkDiscoveryListener lda : linkDiscoveryAware) { // order
                                                                        // maintained
                    lda.linkDiscoveryUpdate(updateList);
                }
            } catch (Exception e) {
                log.error("Error in link discovery updates loop", e);
            }
        }
    } while (updates.peek() != null);
}
 
开发者ID:wallnerryan,项目名称:FL_HAND,代码行数:40,代码来源:LinkDiscoveryManager.java


示例10: addLinkDiscoveryAware

import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener; //导入依赖的package包/类
/**
 * Register a link discovery aware component
 * 
 * @param linkDiscoveryAwareComponent
 */
public
        void
        addLinkDiscoveryAware(ILinkDiscoveryListener linkDiscoveryAwareComponent) {
    // TODO make this a copy on write set or lock it somehow
    this.linkDiscoveryAware.add(linkDiscoveryAwareComponent);
}
 
开发者ID:wallnerryan,项目名称:FL_HAND,代码行数:12,代码来源:LinkDiscoveryManager.java



注:本文中的net.floodlightcontroller.linkdiscovery.ILinkDiscoveryListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DLFolderLocalServiceUtil类代码示例发布时间:2022-05-21
下一篇:
Java SetKeywordMarkerFilter类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap