本文整理汇总了Java中org.opendaylight.controller.samples.simpleforwarding.HostNodePair.getNode方法的典型用法代码示例。如果您正苦于以下问题:Java HostNodePair.getNode方法的具体用法?Java HostNodePair.getNode怎么用?Java HostNodePair.getNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.controller.samples.simpleforwarding.HostNodePair
的用法示例。
在下文中一共展示了HostNodePair.getNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: uninstallPerNodeRules
import org.opendaylight.controller.samples.simpleforwarding.HostNodePair; //导入方法依赖的package包/类
/**
* Cleanup all the host rules for a given node, triggered when the
* switch disconnects, so there is no reason for Hw cleanup
* because it's disconnected anyhow
* TBD - Revisit above stmt in light of CSCus88743
* @param targetNode Node for which we want to do cleanup
*
*/
private void uninstallPerNodeRules(Node targetNode) {
//RulesProgrammingReturnCode retCode = RulesProgrammingReturnCode.SUCCESS;
Map<NodeConnector, FlowEntry> pos;
FlowEntry po;
// Now program every single switch
for (HostNodePair key : this.rulesDB.keySet()) {
Node node = key.getNode();
if (targetNode == null || node.equals(targetNode)) {
log.debug("Work on {} host {}", node, key.getHost());
pos = this.rulesDB.get(key);
for (Map.Entry<NodeConnector, FlowEntry> e : pos.entrySet()) {
po = e.getValue();
if (po != null) {
// Uninstall the policy
this.frm.uninstallFlowEntry(po);
}
}
log.debug("Remove {}", key);
this.rulesDB.remove(key);
}
}
}