com.h3c.of.ctl

## Class ControllerStatsAdapter

- java.lang.Object
- - com.h3c.of.ctl.ControllerStatsAdapter

- All Implemented Interfaces:
    ControllerStats

      public class ControllerStatsAdapter
      extends Object
      implements ControllerStats

  An adapter for the `ControllerStats` API, provided specifically for unit tests to use, to insulate themselves from changes in the API.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ControllerStatsAdapter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `duration()` Returns the number of milliseconds since the statistics were last reset to zero.
    `long` | `msgRxCount()` Returns the number of `OpenFlow messages` received by the controller (excluding PacketIns).
    `long` | `msgTxCount()` Returns the number of `OpenFlow messages` issued by the controller (excluding PacketOuts).
    `long` | `packetDropBytes()` Returns the total number of bytes reported via the `total length` fields of all PacketIn messages for which no PacketOut message was issued.
    `long` | `packetDropCount()` Returns the number of `PacketIn` messages for which no `PacketOut` message was issued.
    `long` | `packetInBytes()` Returns the total number of bytes reported via the `total length` fields of all PacketIn messages received by the controller.
    `long` | `packetInCount()` Returns the number of `PacketIn` messages received by the controller.
    `long` | `packetOutBytes()` Returns the total number of bytes from packets "processed" by the controller, via the PacketOut messages issued.
    `long` | `packetOutCount()` Returns the number of `PacketOut` messages issued by the controller.

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

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

- - ### Constructor Detail

    - #### ControllerStatsAdapter

          public ControllerStatsAdapter()

  - ### Method Detail

    - #### duration

          public long duration()

      Description copied from interface: `ControllerStats`
      Returns the number of milliseconds since the statistics were last reset to zero.
      Specified by:
        `duration` in interface `ControllerStats`
      Returns:
        milliseconds since last reset to zero

    - #### packetInCount

          public long packetInCount()

      Description copied from interface: `ControllerStats`
      Returns the number of `PacketIn` messages received by the controller.
      Specified by:
        `packetInCount` in interface `ControllerStats`
      Returns:
        the count of PacketIns

    - #### packetInBytes

          public long packetInBytes()

      Description copied from interface: `ControllerStats`
      Returns the total number of bytes reported via the `total length` fields of all PacketIn messages received by the controller.
      Specified by:
        `packetInBytes` in interface `ControllerStats`
      Returns:
        the total number of bytes reported by PacketIn messages

    - #### packetOutCount

          public long packetOutCount()

      Description copied from interface: `ControllerStats`
      Returns the number of `PacketOut` messages issued by the controller. Note that this number includes synthetic packets not otherwise associated with a PacketIn message.
      Specified by:
        `packetOutCount` in interface `ControllerStats`
      Returns:
        the count of PacketIns

    - #### packetOutBytes

          public long packetOutBytes()

      Description copied from interface: `ControllerStats`
      Returns the total number of bytes from packets "processed" by the controller, via the PacketOut messages issued.
      Specified by:
        `packetOutBytes` in interface `ControllerStats`
      Returns:
        the total number of bytes reported by PacketOut messages

    - #### packetDropCount

          public long packetDropCount()

      Description copied from interface: `ControllerStats`
      Returns the number of `PacketIn` messages for which no `PacketOut` message was issued.
      Specified by:
        `packetDropCount` in interface `ControllerStats`
      Returns:
        the count of "dropped" packets

    - #### packetDropBytes

          public long packetDropBytes()

      Description copied from interface: `ControllerStats`
      Returns the total number of bytes reported via the `total length` fields of all PacketIn messages for which no PacketOut message was issued.
      Specified by:
        `packetDropBytes` in interface `ControllerStats`
      Returns:
        the total number of bytes reported by "dropped" PacketIn messages

    - #### msgRxCount

          public long msgRxCount()

      Description copied from interface: `ControllerStats`
      Returns the number of `OpenFlow messages` received by the controller (excluding PacketIns).
      Specified by:
        `msgRxCount` in interface `ControllerStats`
      Returns:
        the count of OpenFlow messages received (excluding PacketIns)

    - #### msgTxCount

          public long msgTxCount()

      Description copied from interface: `ControllerStats`
      Returns the number of `OpenFlow messages` issued by the controller (excluding PacketOuts).
      Specified by:
        `msgTxCount` in interface `ControllerStats`
      Returns:
        the count of OpenFlow messages issued (excluding PacketOuts)

Copyright © 2014. All Rights Reserved.