com.h3c.of.lib.mp

## Class MBodyTableStats

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

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

      public class MBodyTableStats
      extends OpenflowStructure
      implements MultipartBody

  Represents a table stats element; part of a reply to a table-stats request multipart message; Since 1.0.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MBodyTableStats.Array` Represents an array of table stats elements.
    `static class` | `MBodyTableStats.MutableArray` A mutable array of table stats elements.

  - ### Field Summary

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

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyTableStats(ProtocolVersion pv)` Constructs an OpenFlow structure.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getActiveCount()` Returns the number of active entries; Since 1.0.
    `long` | `getLookupCount()` Returns the number of packets looked up in the table; Since 1.0.
    `long` | `getMatchedCount()` Returns the number of packets that hit the table; Since 1.0.
    `long` | `getMaxEntries()` Returns the maximum number of entries supported in this table; Since 1.0; Removed at 1.3.
    `String` | `getName()` Returns the table name; Since 1.0; Removed at 1.3.
    `TableId` | `getTableId()` Returns the table ID; Since 1.0.
    `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 Table 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

    - #### MBodyTableStats

          public MBodyTableStats(ProtocolVersion pv)

      Constructs an OpenFlow structure.
      Parameters:
        `pv` - the protocol version

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `OpenflowStructure`

    - #### 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 Table Stats object.
      Parameters:
        `indent` - the additional indent (number of spaces)
      Returns:
        a multi-line representation

    - #### 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

    - #### 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

    - #### getTableId

          public TableId getTableId()

      Returns the table ID; Since 1.0.
      Returns:
        the table ID

    - #### getName

          public String getName()

      Returns the table name; Since 1.0; Removed at 1.3.

      Note that the table name is stored in a 32 character field.

      As of 1.3, the table name is provided in the TableFeatures multipart-reply, and not here. This method will return null for version 1.3.

      Returns:
        the table name
      See Also:
        `MBodyTableFeatures`

    - #### getMaxEntries

          public long getMaxEntries()

      Returns the maximum number of entries supported in this table; Since 1.0; Removed at 1.3. This value is u32.

      As of 1.3, the maximum number of entries supported is provided in the TableFeatures multipart-reply, and not here. This method will return 0 for version 1.3.

      Returns:
        the maximum number of supported entries
      See Also:
        `MBodyTableFeatures`

    - #### getActiveCount

          public long getActiveCount()

      Returns the number of active entries; Since 1.0. This value is u32.
      Returns:
        the number of active entries

    - #### getLookupCount

          public long getLookupCount()

      Returns the number of packets looked up in the table; Since 1.0. This value is u64.
      Returns:
        the number of packet lookups

    - #### getMatchedCount

          public long getMatchedCount()

      Returns the number of packets that hit the table; Since 1.0. This value is u64.
      Returns:
        the number of table hits

Copyright © 2014. All Rights Reserved.