com.h3c.of.lib.mp

## Class MBodyMutableTableStats

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

- All Implemented Interfaces:
    MultipartBody, MutableObject, MutableStructure, Structure

      public class MBodyMutableTableStats
      extends MBodyTableStats
      implements MutableStructure

  Mutable subclass of `MBodyTableStats`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.h3c.of.lib.mp.MBodyTableStats

      `MBodyTableStats.Array, MBodyTableStats.MutableArray`

  - ### Field Summary

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

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyMutableTableStats(ProtocolVersion pv)` Constructs a mutable multipart body TABLE stats element.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MBodyMutableTableStats` | `activeCount(long active)` Sets the number of active entries.
    `MBodyMutableTableStats` | `lookupCount(long lookup)` Sets the number of packets looked up in the table.
    `MBodyMutableTableStats` | `matchedCount(long matched)` Sets the number of packets that hit the table.
    `MBodyMutableTableStats` | `maxEntries(long max)` Sets the maximum number of entries supported by this table.
    `MBodyMutableTableStats` | `name(String name)` Sets the name of the table; Since 1.0; Removed at 1.3.
    `MBodyMutableTableStats` | `tableId(TableId tableId)` Sets the ID of the table; Since 1.0.
    `OpenflowStructure` | `toImmutable()` Returns an immutable instance of this structure.
    `String` | `toString()`
    `boolean` | `writable()` Returns true if this mutable object is still writable.

    - ### Methods inherited from class com.h3c.of.lib.mp.MBodyTableStats

      `getActiveCount, getLookupCount, getMatchedCount, getMaxEntries, getName, getTableId, getTotalLength, toDebugString, toDebugString, validate`

    - ### 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, toDebugString`

- - ### Constructor Detail

    - #### MBodyMutableTableStats

          public MBodyMutableTableStats(ProtocolVersion pv)

      Constructs a mutable multipart body TABLE stats element.

      A valid `TableId` must be present for this element to be valid.

      Parameters:
        `pv` - the protocol version

  - ### Method Detail

    - #### toImmutable

          public OpenflowStructure toImmutable()

      Description copied from interface: `MutableStructure`
      Returns an immutable instance of this structure. In essence, converts this structure to be read-only.

      It is expected that the reference to this mutable structure will be dropped. Note that all method calls invoked on a `MutableStructure` after `toImmutable()` has been invoked will result in an `InvalidMutableException` being thrown.

      Specified by:
        `toImmutable` in interface `MutableStructure`
      Returns:
        an immutable instance of this structure.

    - #### writable

          public boolean writable()

      Description copied from interface: `MutableObject`
      Returns true if this mutable object is still writable. That is, the `#toImmutable()` method (defined on a sub-interface) has not yet been invoked.
      Specified by:
        `writable` in interface `MutableObject`
      Returns:
        true if this mutable object is still writable

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `MBodyTableStats`

    - #### tableId

          public MBodyMutableTableStats tableId(TableId tableId)

      Sets the ID of the table; Since 1.0.
      Parameters:
        `tableId` - the table ID
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if tableId is null

    - #### name

          public MBodyMutableTableStats name(String name)

      Sets the name of the table; Since 1.0; Removed at 1.3.

      Note that the maximum allowed length of the string is `MpBodyFactory.TABLE_NAME_LEN` - 1.

      Parameters:
        `name` - the table name
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `VersionMismatchException` - if version is 1.3 or higher
        `NullPointerException` - if name is null
        `IllegalArgumentException` - if string length is >31

    - #### maxEntries

          public MBodyMutableTableStats maxEntries(long max)

      Sets the maximum number of entries supported by this table.
      Parameters:
        `max` - the maximum number of entries
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `VersionMismatchException` - if version is 1.3 or higher
        `IllegalArgumentException` - if max is not u32

    - #### activeCount

          public MBodyMutableTableStats activeCount(long active)

      Sets the number of active entries.
      Parameters:
        `active` - the number of active entries
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if active is not u32

    - #### lookupCount

          public MBodyMutableTableStats lookupCount(long lookup)

      Sets the number of packets looked up in the table.
      Parameters:
        `lookup` - the number packets looked up
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

    - #### matchedCount

          public MBodyMutableTableStats matchedCount(long matched)

      Sets the number of packets that hit the table.
      Parameters:
        `matched` - the number of table hits
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

Copyright © 2014. All Rights Reserved.