org.opendaylight.controller.sal.flowprogrammer.Flow.setId()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中org.opendaylight.controller.sal.flowprogrammer.Flow.setId()方法的一些代码示例,展示了Flow.setId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.setId()方法的具体详情如下:
包路径:org.opendaylight.controller.sal.flowprogrammer.Flow
类名称:Flow
方法名:setId

Flow.setId介绍

暂无

代码示例

代码示例来源:origin: org.opendaylight.openflowplugin.legacy/sal-compatibility

/**
 * @param source
 * @param target
 */
private static void genericFlowToAdFlow(GenericFlowAttributes source,
    final Flow target) {
  Integer hardTimeout = source.getHardTimeout();
  if (hardTimeout != null) {
    target.setHardTimeout(hardTimeout.shortValue());
  }
  Integer idleTimeout = source.getIdleTimeout();
  if (idleTimeout != null) {
    target.setIdleTimeout(idleTimeout.shortValue());
  }
  Integer priority = source.getPriority();
  if (priority != null) {
    target.setPriority(priority.shortValue());
  }
  target.setId(source.getCookie().getValue().longValue());
}

代码示例来源:origin: org.opendaylight.controller/sal.implementation

flow.setPriority((short) 100);
flow.setHardTimeout((short) 360);
flow.setId(1234L);

代码示例来源:origin: org.opendaylight.controller/protocol_plugins.openflow

private void handleFlowRemovedMessage(ISwitch sw, OFFlowRemoved msg) {
  Node node = NodeCreator.createOFNode(sw.getId());
  Flow flow = new FlowConverter(msg.getMatch(),
      new ArrayList<OFAction>(0)).getFlow(node);
  flow.setPriority(msg.getPriority());
  flow.setIdleTimeout(msg.getIdleTimeout());
  flow.setId(msg.getCookie());
  Match match = flow.getMatch();
  NodeConnector inPort = match.isPresent(MatchType.IN_PORT) ? (NodeConnector) match
      .getField(MatchType.IN_PORT).getValue() : null;
  for (Map.Entry<String, IFlowProgrammerNotifier> containerNotifier : flowProgrammerNotifiers
      .entrySet()) {
    String container = containerNotifier.getKey();
    IFlowProgrammerNotifier notifier = containerNotifier.getValue();
    /*
     * Switch only provide us with the match information. For now let's
     * try to identify the container membership only from the input port
     * match field. In any case, upper layer consumers can derive
     * whether the notification was not for them. More sophisticated
     * filtering can be added later on.
     */
    if (inPort == null
        || container.equals(GlobalConstants.DEFAULT.toString())
        || (containerToNc.containsKey(container) && containerToNc.get(container).contains(inPort))) {
      notifier.flowRemoved(node, flow);
    }
  }
}

代码示例来源:origin: org.opendaylight.controller/sal.implementation

flow.setPriority((short) 300);
flow.setHardTimeout((short) 240);
flow.setId(65536L);

代码示例来源:origin: org.opendaylight.controller/protocol_plugins.stub

flow.setIdleTimeout((short) 1000);
flow.setHardTimeout((short) 2000);
flow.setId(12345);

代码示例来源:origin: org.opendaylight.controller/forwardingrulesmanager

flow.setId(Long.parseLong(cookie));

代码示例来源:origin: org.opendaylight.controller/protocol_plugins.openflow

flow.setIdleTimeout(ofFlowStat.getIdleTimeout());
flow.setHardTimeout(ofFlowStat.getHardTimeout());
flow.setId(ofFlowStat.getCookie());
flowOnNode = new FlowOnNode(flow);
flowOnNode.setByteCount(ofFlowStat.getByteCount());
flow.setIdleTimeout(v6StatsReply.getIdleTimeout());
flow.setHardTimeout(v6StatsReply.getHardTimeout());
flow.setId(v6StatsReply.getCookie());
flowOnNode = new FlowOnNode(flow);
flowOnNode.setByteCount(v6StatsReply.getByteCount());

相关文章