本文整理汇总了Java中org.opendaylight.controller.sal.core.NodeConnector.equals方法的典型用法代码示例。如果您正苦于以下问题:Java NodeConnector.equals方法的具体用法?Java NodeConnector.equals怎么用?Java NodeConnector.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.controller.sal.core.NodeConnector
的用法示例。
在下文中一共展示了NodeConnector.equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: floodPacket
import org.opendaylight.controller.sal.core.NodeConnector; //导入方法依赖的package包/类
/**
*The function is a modification of an another function. The original
*is property of SDNHUB.org and it's used under a GPLv3 License. All the credits for SDNHUB.org
*The original code can be find in
*https://github.com/sdnhub/SDNHub_Opendaylight_Tutorial/blob/master/adsal_L2_forwarding/src/main/java/org/opendaylight/tutorial/tutorial_L2_forwarding/internal/TutorialL2Forwarding.java
* Función utilizada para inundar en caso de no tener la dirección destino
* @param inPkt: paquete entrante al nodo
*/
private void floodPacket(RawPacket inPkt) {
log.info("flooding packet");
NodeConnector incoming_connector = inPkt.getIncomingNodeConnector();
Node incoming_node = incoming_connector.getNode();
Set<NodeConnector> nodeConnectors = this.switchManager.getUpNodeConnectors(incoming_node);
for (NodeConnector p : nodeConnectors) {
if (!p.equals(incoming_connector)) {
try {
RawPacket destPkt = new RawPacket(inPkt);
destPkt.setOutgoingNodeConnector(p);
this.dataPacketService.transmitDataPacket(destPkt);
//log.info("Datos de paquete transmitido dentro de floodpacket: "+this.dataPacketService.decodeDataPacket(destPkt).toString());
} catch (ConstructionException e2) {
continue;
}
}
}
}
示例2: updateRulesforHIFup
import org.opendaylight.controller.sal.core.NodeConnector; //导入方法依赖的package包/类
private void updateRulesforHIFup(Node node, NodeConnector swPort) {
if (this.hostTracker == null) {
//Not yet ready to process all the updates
return;
}
log.debug("Host Facing Port in a container came up, install the rules for all hosts from this port !");
Set<HostNodeConnector> allHosts = this.hostTracker.getAllHosts();
for (HostNodeConnector host : allHosts) {
if (node.equals(host.getnodeconnectorNode())
&& swPort.equals(host.getnodeConnector())) {
/*
* This host resides behind the same switch and port for which a port up
* message is received. Ideally this should not happen, but if it does,
* don't program any rules for this host
*/
continue;
}
Set<Node> switches = preparePerHostPerSwitchRules(host, node,
swPort);
if (switches != null) {
// This will refresh existing rules, by overwriting
// the previous ones
installPerHostRules(host, switches);
}
}
}
示例3: _pdm
import org.opendaylight.controller.sal.core.NodeConnector; //导入方法依赖的package包/类
public void _pdm(CommandInterpreter ci) {
String st = ci.nextArgument();
if (st == null) {
ci.println("Please enter node id");
return;
}
Node node = Node.fromString(st);
if (node == null) {
ci.println("Please enter node id");
return;
}
Switch sw = getSwitchByNode(node);
ci.println(" NodeConnector Name");
if (sw == null) {
return;
}
Set<NodeConnector> nodeConnectorSet = sw.getNodeConnectors();
String nodeConnectorName;
if (nodeConnectorSet != null && nodeConnectorSet.size() > 0) {
for (NodeConnector nodeConnector : nodeConnectorSet) {
Map<String, Property> propMap = getNodeConnectorProps(nodeConnector);
nodeConnectorName = (propMap == null) ? null : ((Name) propMap
.get(Name.NamePropName)).getValue();
if (nodeConnectorName != null) {
Node nd = nodeConnector.getNode();
if (!nd.equals(node)) {
log.debug("node not match {} {}", nd, node);
}
Map<String, NodeConnector> map = nodeConnectorNames
.get(node);
if (map != null) {
NodeConnector nc = map.get(nodeConnectorName);
if (nc == null) {
log.debug("no nodeConnector named {}",
nodeConnectorName);
} else if (!nc.equals(nodeConnector)) {
log.debug("nodeConnector not match {} {}", nc,
nodeConnector);
}
}
}
ci.println(nodeConnector
+ " "
+ ((nodeConnectorName == null) ? "" : nodeConnectorName)
+ "(" + nodeConnector.getID() + ")");
}
ci.println("Total number of NodeConnectors: "
+ nodeConnectorSet.size());
}
}