com.h3c.of.lib.mp

## Class MBodyMutableQueueStats

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyQueueStats
    - - com.h3c.of.lib.mp.MBodyMutableQueueStats

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

      public class MBodyMutableQueueStats
      extends MBodyQueueStats
      implements MutableStructure

  Mutable subclass of `MBodyQueueStats`.

- - ### Nested Class Summary

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

      `MBodyQueueStats.Array, MBodyQueueStats.MutableArray`

  - ### Field Summary

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

      `version`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MBodyMutableQueueStats` | `duration(long seconds, long nano)` Sets the time the queue has been installed; Since 1.0.
    `MBodyMutableQueueStats` | `port(BigPortNumber port)` Sets the port number; Since 1.0.
    `MBodyMutableQueueStats` | `queueId(QueueId queueId)` Sets the queue ID configured for specified port; Since 1.0.
    `OpenflowStructure` | `toImmutable()` Returns an immutable instance of this structure.
    `String` | `toString()`
    `MBodyMutableQueueStats` | `txBytes(long txBytes)` Sets the number of transmitted bytes; Since 1.0.
    `MBodyMutableQueueStats` | `txErrors(long txErrors)` Sets the number of error packets; Since 1.0.
    `MBodyMutableQueueStats` | `txPackets(long txPackets)` Sets the number of transmitted packets; Since 1.0.
    `boolean` | `writable()` Returns true if this mutable object is still writable.

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

      `getDurationNsec, getDurationSec, getPort, getQueueId, getTotalLength, getTxBytes, getTxErrors, getTxPackets, toDebugString, toDebugString`

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

      `getVersion, hex, hex, validate`

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

    - ### Methods inherited from interface com.h3c.of.lib.mp.MultipartBody

      `validate`

- - ### Constructor Detail

    - #### MBodyMutableQueueStats

          public MBodyMutableQueueStats(ProtocolVersion pv)

      Constructs a mutable multipart body QUEUE stats element.
      Parameters:
        `pv` - the protocol version

  - ### Method Detail

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

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `MBodyQueueStats`

    - #### port

          public MBodyMutableQueueStats port(BigPortNumber port)

      Sets the port number; Since 1.0.

      Note that in 1.0, port numbers are u16.

      Parameters:
        `port` - the port number
      Returns:
        self, for chaining
      Throws:
        `NullPointerException` - if port is null
        `IllegalArgumentException` - if the port number is invalid
        `InvalidMutableException` - if this instance is no longer writable

    - #### queueId

          public MBodyMutableQueueStats queueId(QueueId queueId)

      Sets the queue ID configured for specified port; Since 1.0.
      Parameters:
        `queueId` - the queue ID
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if queueId is null

    - #### txBytes

          public MBodyMutableQueueStats txBytes(long txBytes)

      Sets the number of transmitted bytes; Since 1.0.
      Parameters:
        `txBytes` - the number of transmitted bytes
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

    - #### txPackets

          public MBodyMutableQueueStats txPackets(long txPackets)

      Sets the number of transmitted packets; Since 1.0.
      Parameters:
        `txPackets` - the number of transmitted packets
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

    - #### txErrors

          public MBodyMutableQueueStats txErrors(long txErrors)

      Sets the number of error packets; Since 1.0.
      Parameters:
        `txErrors` - the number of packets dropped due to overrun
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

    - #### duration

          public MBodyMutableQueueStats duration(long seconds,
                                        long nano)

      Sets the time the queue has been installed; Since 1.0.

      The first parameter is the number of seconds; the second number is the additional number of nanoseconds.

      Parameters:
        `seconds` - the number of seconds
        `nano` - the additional number of nanoseconds
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if either value is not u32

Copyright © 2014. All Rights Reserved.