com.h3c.of.lib.mp

## Class MBodyTableFeatures

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

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

      public class MBodyTableFeatures
      extends OpenflowStructure
      implements MultipartBody

  Represents a table features element; part of a reply to a table-features request multipart message; Since 1.3.

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `ALL_META_BITS` The 64-bit value where all bits are set.

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

      `version`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<TableConfig>` | `getConfig()` Returns the set of config flags representing the configuration set on the table; Since 1.3.
    `long` | `getMaxEntries()` Returns the maximum number of flow entries that can be inserted into this table; Since 1.3.
    `long` | `getMetadataMatch()` Returns the metadata match value; Since 1.3.
    `long` | `getMetadataWrite()` Returns the metadata write value; Since 1.3.
    `String` | `getName()` Returns the table name; Since 1.3.
    `List<TableFeatureProp>` | `getProps()` Returns the list of table feature properties describing various capabilities of the table; Since 1.3.
    `TableId` | `getTableId()` Returns the table ID; Since 1.3.
    `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 Features 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`

- - ### Field Detail

    - #### ALL_META_BITS

          public static final long ALL_META_BITS

      The 64-bit value where all bits are set.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MBodyTableFeatures

          public MBodyTableFeatures(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 Features 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.3.
      Returns:
        the table ID

    - #### getName

          public String getName()

      Returns the table name; Since 1.3.

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

      Returns:
        the table name

    - #### getMetadataMatch

          public long getMetadataMatch()

      Returns the metadata match value; Since 1.3.

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

      Returns:
        the metadata match value

    - #### getMetadataWrite

          public long getMetadataWrite()

      Returns the metadata write value; Since 1.3.

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

      Returns:
        the metadata write value

    - #### getConfig

          public Set<TableConfig> getConfig()

      Returns the set of config flags representing the configuration set on the table; Since 1.3.

      Note that, as of version 1.3, there are no flags defined so this method will always return an empty set.

      Returns:
        the config flags set on the table

    - #### getMaxEntries

          public long getMaxEntries()

      Returns the maximum number of flow entries that can be inserted into this table; Since 1.3.

      Due to limitations imposed by modern hardware, this value should be considered advisory and a best effort approximation of the capacity of the table. Despite the high-level abstraction of a table, in practice the resource consumed by a single flow table entry is not constant.

      For example, a flow table entry might consume more than one entry, depending on its match parameters (e.g. IPv4 vs. IPv6). Also, tables that appear distinct at an OpenFlow-level might in fact share the same underlying physical resources. Further, on OpenFlow hybrid switches, those tables may be shared with non-OpenFlow functions. The result is that switch implementations should report an approximation of the total flow entries supported and controller writers should not treat this value as a fixed, physical constant.

      Returns:
        the maximum number of flow entries

    - #### getProps

          public List<TableFeatureProp> getProps()

      Returns the list of table feature properties describing various capabilities of the table; Since 1.3.
      Returns:
        the list of table feature properties

Copyright © 2014. All Rights Reserved.