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


Java AttachmentPoint类代码示例

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


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

示例1: addMember

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
public void addMember(String memberIP, AttachmentPoint ap) {
	boolean pathFound = false;
	/*
	 * TODO: This should be access with lock.
	 * Add locks for groupMembers
	 */
	if (groupMembers.containsKey(memberIP)) {
		logger.warn(memberIP + " already exists in  " + groupIP);
		return;
	}
	groupMembers.put(memberIP, ap);
	if (mcTree == null)
		return;
	/*
	 * Source exists and mcTree object is not null
	 * adding a member in the tree
	 */
	pathFound = mcTree.addMemberInTheTree(memberIP, ap, bandwidth);
	if (!pathFound)
		logger.info("MulticastGroup:"+this.groupIP+" Path not found for IP:"
				+memberIP+" bandwidth:"+Long.toString(this.bandwidth));
}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:23,代码来源:MulticastGroup.java

示例2: removeMember

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
public void removeMember(String memberIP, AttachmentPoint ap) {
	logger.info("Group:"+this.groupIP + " removeMember: " + memberIP);
	AttachmentPoint pap = groupMembers.get(memberIP);
	if (pap != null && 
		pap.getPort().getPortNumber() == ap.getPort().getPortNumber() && 
		pap.getSw() == ap.getSw()) {
		groupMembers.remove(memberIP);
		if (sourceIP != null)
			mcTree.removeMemberFromTheTree(ap);
		logger.info("Group:"+this.groupIP + " member with IP {} removed successfully", memberIP);
		if (groupMembers.size() == 0) {
			/* TODO:  */
		}
	} else {
		logger.error("Attachment point mismatch with member " +
				"with IP {} while removing", memberIP);
	}

}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:20,代码来源:MulticastGroup.java

示例3: MulticastTree

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
MulticastTree(String IP, AttachmentPoint srcAP, MulticastController mc, MulticastGroup group) {
	sourceIP = IPv4.toIPv4Address(IP);
	memberPorts = new ConcurrentHashMap<Long, HashSet<OFPort>>();
	destinationDevices = new Vector<AttachmentPoint> ();
	this.mcObject = mc;
	routingService = mc.routingService;
	
	treeUpink = new ConcurrentHashMap<Long, Link>();
	switchService = mc.switchService;
	linkDiscService = mc.lds;
	floodlightProviderService = mc.floodlightProvider;
	flowPusher = mc.flowPusher;
	sourceAP = srcAP;
	pathsForDestinations = new ConcurrentHashMap<Long, Route>();
	multicastGroup = group;
	sendOFFlowModDropMulticastStream(switchService.getSwitch(srcAP.getSw()), true);
}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:18,代码来源:MulticastTree.java

示例4: addMemberInTheTree

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
public boolean addMemberInTheTree(String IP, AttachmentPoint ap, long bamdwidth) {
		Integer destIP = IPv4.toIPv4Address(IP);
		IDevice destDevice = null;
		destinationDevices.add(ap);
		AddFlowsDirectedToDevice(ap, destDevice, bamdwidth);
		return true;
		
//		logger.info("---Bandwidth consuption log--");
//		for (Entry<NodePortTuple, SwitchPortBandwidth> spb: mcObject.statisticsService.getBandwidthConsumption().entrySet()){
//			logger.info("NodePortTuple " + spb.getKey().toString() 
//					+" SwitchPortBandwidth: BitsPerSecondRx = " + Long.toString(spb.getValue().getBitsPerSecondRx().getValue())
//					+ " BitsPerSecondTx" + Long.toString(spb.getValue().getBitsPerSecondTx().getValue())
//					);
//		}
//		
//		logger.info("---Bandwidth consuption log--");
	}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:18,代码来源:MulticastTree.java

示例5: addMulticastGroup

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
boolean addMulticastGroup (String groupIP, int destPort, 
		String srcIP, AttachmentPoint srcAP) {
	MulticastGroup mcg = multicastGroupDatabase.get(groupIP); 
	if (mcg == null) {
		mcg  = new MulticastGroup(groupIP, destPort, srcIP, srcAP, mcObject);
		multicastGroupDatabase.put(groupIP, mcg);
		logger.info("AddMulticastGroup : Group added with IP " + groupIP);
		return true;
	}
	else {
		if (mcg.sourceIP == null){
			mcg.addGroupSource(srcIP, srcAP, destPort);
			logger.info("AddMulticastGroup: Source "+ srcIP+" added to group " + groupIP);
		} else {
			logger.error("Group:"+ groupIP + " Group Already Exist " + 
					" AP: "+ srcAP.getSw().toString() + "," + 
					Short.toString(srcAP.getPort().getShortPortNumber()) + " source IP :"+ srcIP);
		}
		return false;
	}
}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:22,代码来源:MulticastGroupStore.java

示例6: MockDevice

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
public MockDevice(DeviceManagerImpl deviceManager, Long deviceKey,
                  List<AttachmentPoint> aps,
                  List<AttachmentPoint> trueAPs,
                  Collection<Entity> entities,
                  IEntityClass entityClass) {
    super(deviceManager, deviceKey, null, aps, trueAPs,
          entities, entityClass);
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:9,代码来源:MockDevice.java

示例7: allocateDevice

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
@Override
protected Device allocateDevice(Long deviceKey,
		String dhcpClientName,
		List<AttachmentPoint> aps,
		List<AttachmentPoint> trueAPs,
		Collection<Entity> entities,
		IEntityClass entityClass) {
	return new MockDevice(this, deviceKey, aps, trueAPs, entities, entityClass);
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:10,代码来源:MockDeviceManager.java

示例8: QoSLBMulticastTree

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
QoSLBMulticastTree(String IP, AttachmentPoint srcAP,
		MulticastController mc, MulticastGroup group) {
	super(IP, srcAP, mc, group);
	memberPorts = new ConcurrentHashMap<>();
	networkSwitchLinks = linkDiscService.getSwitchLinks();
	pathsForDestinations = new ConcurrentHashMap<Long, Path>();
}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:8,代码来源:QoSLBMulticastTree.java

示例9: handlePacketInWithIGMP

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
private void handlePacketInWithIGMP (IGMP igmpHeader, IPv4Address scrIP, 
			IPv4Address dstIP, DatapathId dpid, OFPort inport) {
		
		switch(igmpHeader.getType()) {
		
		case IGMP.IGMP_MEMBERSHIP_QUERY: {
			/*IGMP with this type is not expected*/
			break;
		}
		case IGMP.IGMPv2_MEMBERSHIP_REPORT: {
//			logger.info("IGMPv2 membership report received");
			this.groupDB.addGroupMember(igmpHeader.getGroupAddress().toString(), 
					scrIP.toString(), 
					new AttachmentPoint(dpid, inport, new java.util.Date()));
			break;
		}
		case IGMP.IGMPv2_LEAVE_GROUP: {
//			logger.info("IGMPv2 LEAVE GROUP received");
			this.groupDB.removeGroupMember(igmpHeader.getGroupAddress().toString(), 
					scrIP.toString(), 
					new AttachmentPoint(dpid, inport, new java.util.Date()));
			break;
		}
		case IGMP.IGMPv3_MEMBERSHIP_REPORT: {
			logger.info("ToDO: IGMPv3_MEMBERSHIP_REPORT received");
			break;
		}
		default:
			logger.info("Unsuppoerted IGMP type");
		}
	}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:32,代码来源:MulticastController.java

示例10: MulticastGroup

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
MulticastGroup(String groupIP, int destUDPPort, String scrIP, 
		AttachmentPoint srcAP, MulticastController mc) {
	groupMembers = new ConcurrentHashMap<>();
	this.groupIP = groupIP;
	mcObject = mc;
	this.srcAP = srcAP;
	addGroupSource(scrIP, srcAP, destUDPPort);
	logger = mcObject.logger;
	ofGroupId = OFGroupIDGen.getAndIncrement();
	ofBucketListMap = new ConcurrentHashMap<>();
	ofBucketMapMap = new ConcurrentHashMap<>();
	mcTree = new QoSLBMulticastTree(scrIP , srcAP, this.mcObject, this);
	bandwidth = mc.flowQoSDemandHelper.getQoSBandwidth(groupIP);
}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:15,代码来源:MulticastGroup.java

示例11: addGroupSource

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
public void addGroupSource(String srcIP, AttachmentPoint srcAP, int destUDPPort) {
	boolean pathFound;
	this.destUDPPort = destUDPPort;
	this.sourceIP = srcIP;
	this.srcAP = srcAP;
	mcTree = new QoSLBMulticastTree(srcIP, srcAP, this.mcObject, this);		
	for (Entry<String, AttachmentPoint> ent: groupMembers.entrySet()) {
		pathFound = mcTree.addMemberInTheTree(ent.getKey(), ent.getValue(), bandwidth);
	}
}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:11,代码来源:MulticastGroup.java

示例12: removeMemberFromTheTree

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
public void removeMemberFromTheTree(AttachmentPoint ap) {

		/* Remove flow from edge switch */
		DatapathId dSWId = ap.getSw();
		IOFSwitch dSW = switchService.getSwitch(dSWId);
		HashSet<OFPort> nps;
		Route r = pathsForDestinations.get(ap.getSw().getLong());
		if (r == null)
			return;
		NodePortTuple from = null;
		List<NodePortTuple> path = r.getPath();
		ListIterator<NodePortTuple> it = path.listIterator(path.size());
		while (it.hasPrevious()) {
			from = it.previous();
			dSWId = from.getNodeId();
			dSW = switchService.getSwitch(dSWId);
			nps = memberPorts.get(dSWId.getLong());
			if (nps == null) {
				logger.info("RemoveMemberFromTheTree: unexpected null nps");
				return;
			}
			nps.remove(from.getPortId());
			if (nps.size() != 0) {
				sendOFGroupModDelMemberMsg(dSW, from.getPortId());
				/* switch has downstream member other than one removed*/
				break;
			}
			memberPorts.remove(dSWId.getLong());
			if (dSWId.getLong() == sourceAP.getSw().getLong())
				sendOFFlowModDropMulticastStream(dSW, false);
			else 
				sendOFFlowModDelForGroup(dSW);
			pushOFDeleteGroup(dSW);
			if (it.hasPrevious())
				from = it.previous();	
		}
		pathsForDestinations.remove(ap.getSw().getLong());
	}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:39,代码来源:MulticastTree.java

示例13: ShortestPathTreeLB

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
ShortestPathTreeLB(String IP, AttachmentPoint srcAP,
			MulticastController mc, MulticastGroup group) {
		super(IP, srcAP, mc, group);
		memberPorts = new ConcurrentHashMap<>();
//		linkBandwidth = new HashMap<Link, LinkParameter>();
		topologyHelper = mc.topologyHelper;
		this.lds = mc.lds;
		networkSwitchLinks = lds.getSwitchLinks();
		pathsForDestinations = new ConcurrentHashMap<Long, Path>();
	}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:11,代码来源:ShortestPathTreeLB.java

示例14: DynamicGreedySteinerTree

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
DynamicGreedySteinerTree(String IP, AttachmentPoint srcAP,
			MulticastController mc, MulticastGroup group) {
		super(IP, srcAP, mc, group);
		memberPorts = new ConcurrentHashMap<>();
//		linkBandwidth = new HashMap<Link, LinkParameter>();
		topologyHelper = mc.topologyHelper;
		this.lds = mc.lds;
		networkSwitchLinks = lds.getSwitchLinks();
		pathsForDestinations = new ConcurrentHashMap<Long, Path>();
	}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:11,代码来源:DynamicGreedySteinerTree.java

示例15: addGroupMember

import net.floodlightcontroller.devicemanager.internal.AttachmentPoint; //导入依赖的package包/类
public void addGroupMember (String groupIP, String memberIP, AttachmentPoint ap) {
	MulticastGroup mcGroup = multicastGroupDatabase.get(groupIP);
	if (mcGroup == null) {
		/* Receiver for a absent groups source */
		mcGroup = new MulticastGroup(groupIP, mcObject);
		multicastGroupDatabase.put(groupIP, mcGroup);
		//logger.info("AddMulticastGroup : Group added with IP {} and member IP {} ", groupIP, memberIP);
	}
	//logger.info("AddMulticastGroup : Group added with IP {} and member IP {} ", groupIP, memberIP);
	mcGroup.addMember(memberIP, ap);
}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:12,代码来源:MulticastGroupStore.java


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