com.h3c.of.lib

## Class FlowUtils

- java.lang.Object
- - com.h3c.of.lib.FlowUtils

-     public class FlowUtils
      extends Object

  Provides useful utilities regarding flow messages.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlowUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `flowKey(MBodyFlowStats f)` Computes and returns a unique key for a flow, based on the table ID (ignored for 1.0), priority, and match fields.
    `static int` | `flowKey(OfmFlowMod f)` Computes and returns a unique key for a flow, based on the table ID (ignored for 1.0), priority, and match fields.
    `static boolean` | `sameFlow(MBodyFlowStats flowA, MBodyFlowStats flowB)` Returns true if the specified FlowStats structures represent the same flow.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FlowUtils

          public FlowUtils()

  - ### Method Detail

    - #### sameFlow

          public static boolean sameFlow(MBodyFlowStats flowA,
                         MBodyFlowStats flowB)

      Returns true if the specified FlowStats structures represent the same flow. This is determined by examining the protocol version, table ID, priority, and match; if each of these are equal, it is the same flow.
      Parameters:
        `flowA` - the first flow
        `flowB` - the second flow
      Returns:
        true if the structures represent the same flow; false otherwise
      Throws:
        `NullPointerException` - if either parameter is null

    - #### flowKey

          public static int flowKey(MBodyFlowStats f)

      Computes and returns a unique key for a flow, based on the table ID (ignored for 1.0), priority, and match fields.
      Parameters:
        `f` - the flow
      Returns:
        the key
      Throws:
        `NullPointerException` - if f is null

    - #### flowKey

          public static int flowKey(OfmFlowMod f)

      Computes and returns a unique key for a flow, based on the table ID (ignored for 1.0), priority, and match fields.
      Parameters:
        `f` - the flow
      Returns:
        the key
      Throws:
        `NullPointerException` - if f is null

Copyright © 2014. All Rights Reserved.