com.h3c.of.lib.mp

## Class MBodyMutableTableFeatures

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyTableFeatures
    - - com.h3c.of.lib.mp.MBodyMutableTableFeatures

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

      public class MBodyMutableTableFeatures
      extends MBodyTableFeatures
      implements MutableStructure

  Mutable subclass of `MBodyTableFeatures`.

- - ### Nested Class Summary

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

      `MBodyTableFeatures.Array, MBodyTableFeatures.MutableArray`

  - ### Field Summary

    - ### Fields inherited from class com.h3c.of.lib.mp.MBodyTableFeatures

      `ALL_META_BITS`

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

      `version`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MBodyMutableTableFeatures` | `addProp(TableFeatureProp prop)` Adds a table features property to this entry, describing a capability of the table.
    `MBodyMutableTableFeatures` | `maxEntries(long max)` Sets the maximum number of flow entries that can be inserted into the table; Since 1.3.
    `MBodyMutableTableFeatures` | `metadataMatch(long meta)` Sets the metadata match value; Since 1.3.
    `MBodyMutableTableFeatures` | `metadataWrite(long meta)` Sets the metadata write value; Since 1.3.
    `MBodyMutableTableFeatures` | `name(String name)` Sets the name of the table; Since 1.3.
    `MBodyMutableTableFeatures` | `tableId(TableId tableId)` Sets the ID of the table; Since 1.3.
    `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.MBodyTableFeatures

      `getConfig, getMaxEntries, getMetadataMatch, getMetadataWrite, getName, getProps, 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

    - #### MBodyMutableTableFeatures

          public MBodyMutableTableFeatures(ProtocolVersion pv)

      Constructs a mutable multipart body TABLE FEATURES element.

      The metadata match and write fields default to `MBodyTableFeatures.ALL_META_BITS`.

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

    - #### tableId

          public MBodyMutableTableFeatures tableId(TableId tableId)

      Sets the ID of the table; Since 1.3.
      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 MBodyMutableTableFeatures name(String name)

      Sets the name of the table; Since 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
        `NullPointerException` - if name is null
        `IllegalArgumentException` - if string length is >31

    - #### metadataMatch

          public MBodyMutableTableFeatures metadataMatch(long meta)

      Sets the metadata match value; Since 1.3.

      The value set indicates the bits of the metadata field that the table can match on, when using the `metadata` match field. A value of `MBodyTableFeatures.ALL_META_BITS` indicates that the table can match the full metadata field.

      Parameters:
        `meta` - the metadata match value
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

    - #### metadataWrite

          public MBodyMutableTableFeatures metadataWrite(long meta)

      Sets the metadata write value; Since 1.3.

      The value set indicates the bits of the metadata field that the table can write using the `write-metadata` instruction. A value of `MBodyTableFeatures.ALL_META_BITS` indicates that the table can write the full metadata field.

      Parameters:
        `meta` - the metadata write value
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

    - #### maxEntries

          public MBodyMutableTableFeatures maxEntries(long max)

      Sets the maximum number of flow entries that can be inserted into the table; Since 1.3.
      Parameters:
        `max` - the maximum number of flow entries
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if max is not u32
      See Also:
        `MBodyTableFeatures.getMaxEntries()`

    - #### addProp

          public MBodyMutableTableFeatures addProp(TableFeatureProp prop)

      Adds a table features property to this entry, describing a capability of the table.
      Parameters:
        `prop` - the property to add
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if prop is null

Copyright © 2014. All Rights Reserved.