com.h3c.of.lib.mp

## Class MBodyGroupStats

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyGroupStats

- All Implemented Interfaces:
    MultipartBody, Structure
  Direct Known Subclasses:
    MBodyMutableGroupStats

      public class MBodyGroupStats
      extends OpenflowStructure
      implements MultipartBody

  Represents a group stats element; part of a reply to a group-stats request multipart message; Since 1.1.
  See Also:
    `MBodyGroupStatsRequest`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MBodyGroupStats.Array` Represents an array of group stats elements.
    `static class` | `MBodyGroupStats.BucketCounter` Represents a bucket counter element; part of group-stats reply multipart message; Since 1.1.
    `static class` | `MBodyGroupStats.MutableArray` A mutable array of group stats elements.

  - ### Field Summary

    - ### Fields inherited from class com.h3c.of.lib.OpenflowStructure

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyGroupStats(ProtocolVersion pv)` Constructs a multipart body GROUP type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<MBodyGroupStats.BucketCounter>` | `getBucketStats()` Returns the list of bucket stats for this group; Since 1.1.
    `long` | `getByteCount()` Returns the number of bytes processed by this group; Since 1.1.
    `long` | `getDurationNsec()` Returns the time this group has been alive in nanoseconds beyond `getDurationSec()`; Since 1.3.
    `long` | `getDurationSec()` Returns the time this group has been alive in seconds; Since 1.3.
    `GroupId` | `getGroupId()` Returns the group ID; Since 1.1.
    `long` | `getPacketCount()` Returns the number of packets processed by this group; Since 1.1.
    `long` | `getRefCount()` Returns the number of flows or groups that directly forward to this group; Since 1.1.
    `int` | `getTotalLength()` Returns the total length of the body, in bytes.
    `String` | `toDebugString()` Returns a string representation useful for debugging.
    `String` | `toDebugString(int indent)` Returns a multi-line representation of this Group Stats object.
    `String` | `toString()`
    `void` | `validate()` Validates this structure for completeness and throws an exception if the structure is considered "not complete".

    - ### Methods inherited from class com.h3c.of.lib.OpenflowStructure

      `getVersion, hex, hex`

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

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

    - ### Methods inherited from interface com.h3c.of.lib.Structure

      `getVersion`

- - ### Constructor Detail

    - #### MBodyGroupStats

          public MBodyGroupStats(ProtocolVersion pv)

      Constructs a multipart body GROUP type.
      Parameters:
        `pv` - the protocol version

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `OpenflowStructure`

    - #### validate

          public void validate()
                        throws IncompleteStructureException

      Description copied from class: `OpenflowStructure`
      Validates this structure for completeness and throws an exception if the structure is considered "not complete".

      This default implementation does nothing, i.e. default behavior is that structures are considered complete.

      Subclasses should override this method to check that mandatory fields or other internal state is present, throwing an exception if it is not.

      Specified by:
        `validate` in interface `MultipartBody`
      Overrides:
        `validate` in class `OpenflowStructure`
      Throws:
        `IncompleteStructureException` - if the structure is not complete

    - #### getTotalLength

          public int getTotalLength()

      Description copied from interface: `MultipartBody`
      Returns the total length of the body, in bytes.
      Specified by:
        `getTotalLength` in interface `MultipartBody`
      Returns:
        the total length of the body

    - #### toDebugString

          public String toDebugString()

      Description copied from class: `OpenflowStructure`
      Returns a string representation useful for debugging. This default implementation delegates to `OpenflowStructure.toString()`, but subclasses are free to override this behavior.
      Specified by:
        `toDebugString` in interface `Structure`
      Overrides:
        `toDebugString` in class `OpenflowStructure`
      Returns:
        a (possibly multi-line) string representation of this message

    - #### toDebugString

          public String toDebugString(int indent)

      Returns a multi-line representation of this Group Stats object.
      Parameters:
        `indent` - the additional indent (number of spaces)
      Returns:
        a multi-line representation

    - #### getGroupId

          public GroupId getGroupId()

      Returns the group ID; Since 1.1.
      Returns:
        the group ID

    - #### getRefCount

          public long getRefCount()

      Returns the number of flows or groups that directly forward to this group; Since 1.1.
      Returns:
        the number of flows or groups

    - #### getPacketCount

          public long getPacketCount()

      Returns the number of packets processed by this group; Since 1.1.
      Returns:
        the number of packets

    - #### getByteCount

          public long getByteCount()

      Returns the number of bytes processed by this group; Since 1.1.
      Returns:
        the number of bytes

    - #### getDurationSec

          public long getDurationSec()

      Returns the time this group has been alive in seconds; Since 1.3. This value is u32.
      Returns:
        the time the group has been alive (seconds)

    - #### getDurationNsec

          public long getDurationNsec()

      Returns the time this group has been alive in nanoseconds beyond `getDurationSec()`; Since 1.3. This value is u32.
      Returns:
        the additional time the group has been alive (nanoseconds)

    - #### getBucketStats

          public List<MBodyGroupStats.BucketCounter> getBucketStats()

      Returns the list of bucket stats for this group; Since 1.1.
      Returns:
        the list of bucket stats

Copyright © 2014. All Rights Reserved.