com.h3c.of.lib.mp

## Class MBodyMutableFlowStats

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyFlowStats
    - - com.h3c.of.lib.mp.MBodyMutableFlowStats

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

      public class MBodyMutableFlowStats
      extends MBodyFlowStats
      implements MutableStructure

  Mutable subclass of `MBodyFlowStats`.

- - ### Nested Class Summary

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

      `MBodyFlowStats.Array, MBodyFlowStats.MutableArray`

  - ### Field Summary

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

      `version`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MBodyMutableFlowStats` | `actions(List<Action> acts)` Sets the actions; Since 1.0; Removed at 1.1.
    `MBodyMutableFlowStats` | `byteCount(long byteCount)` Sets the number of bytes in the flow; Since 1.0.
    `MBodyMutableFlowStats` | `cookie(long cookie)` Sets the cookie; Since 1.0.
    `MBodyMutableFlowStats` | `duration(long seconds, long nano)` Sets the time the flow has been alive; Since 1.0.
    `MBodyMutableFlowStats` | `flags(Set<FlowModFlag> flags)` Sets the flow mod flags; Since 1.3.
    `MBodyMutableFlowStats` | `hardTimeout(int hardTimeout)` Sets the number of seconds before flow expiration; Since 1.0.
    `MBodyMutableFlowStats` | `idleTimeout(int idleTimeout)` Sets the number of seconds idle before flow expiration; Since 1.0.
    `MBodyMutableFlowStats` | `instructions(List<Instruction> ins)` Sets the instructions; Since 1.1.
    `MBodyMutableFlowStats` | `match(Match match)` Sets the match; Since 1.0.
    `MBodyMutableFlowStats` | `packetCount(long packetCount)` Sets the number of packets in the flow; Since 1.0.
    `MBodyMutableFlowStats` | `priority(int priority)` Sets the priority of the flow; Since 1.0.
    `MBodyMutableFlowStats` | `tableId(TableId tableId)` Sets the ID of the table this flow came from; 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.MBodyFlowStats

      `getActions, getByteCount, getCookie, getDurationNsec, getDurationSec, getFlags, getHardTimeout, getIdleTimeout, getInstructions, getMatch, getPacketCount, getPriority, 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

    - #### MBodyMutableFlowStats

          public MBodyMutableFlowStats(ProtocolVersion pv)

      Constructs a mutable multipart body FLOW stats element.

      A valid `TableId` and `Match` 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 `MBodyFlowStats`

    - #### tableId

          public MBodyMutableFlowStats tableId(TableId tableId)

      Sets the ID of the table this flow came from; 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

    - #### duration

          public MBodyMutableFlowStats duration(long seconds,
                                       long nano)

      Sets the time the flow has been alive; 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 nanoSeconds is not u32

    - #### priority

          public MBodyMutableFlowStats priority(int priority)

      Sets the priority of the flow; Since 1.0.
      Parameters:
        `priority` - the priority
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if priority is not u16

    - #### idleTimeout

          public MBodyMutableFlowStats idleTimeout(int idleTimeout)

      Sets the number of seconds idle before flow expiration; Since 1.0.
      Parameters:
        `idleTimeout` - the idle timeout
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if idleTimeout is not u16

    - #### hardTimeout

          public MBodyMutableFlowStats hardTimeout(int hardTimeout)

      Sets the number of seconds before flow expiration; Since 1.0.
      Parameters:
        `hardTimeout` - the hard timeout
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if hardTimeout is not u16

    - #### flags

          public MBodyMutableFlowStats flags(Set<FlowModFlag> flags)

      Sets the flow mod flags; Since 1.3.
      Parameters:
        `flags` - the flags
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if flags is null

    - #### cookie

          public MBodyMutableFlowStats cookie(long cookie)

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

    - #### packetCount

          public MBodyMutableFlowStats packetCount(long packetCount)

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

    - #### byteCount

          public MBodyMutableFlowStats byteCount(long byteCount)

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

    - #### match

          public MBodyMutableFlowStats match(Match match)

      Sets the match; Since 1.0.
      Parameters:
        `match` - the match descriptor
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if match is null
        `IllegalArgumentException` - if match is mutable
        `VersionMismatchException` - if match not the right version

    - #### instructions

          public MBodyMutableFlowStats instructions(List<Instruction> ins)

      Sets the instructions; Since 1.1.
      Parameters:
        `ins` - the instructions
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `VersionMismatchException` - if version < 1.1
        `NullPointerException` - if ins is null

    - #### actions

          public MBodyMutableFlowStats actions(List<Action> acts)

      Sets the actions; Since 1.0; Removed at 1.1.
      Parameters:
        `acts` - the actions
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `VersionMismatchException` - if version > 1.0
        `NullPointerException` - if acts is null

Copyright © 2014. All Rights Reserved.