com.h3c.of.ctl.flow

## Interface GroupTracker

-     public interface GroupTracker

  Provides basic group management for the controller.

  Facilitates:

  - the getting of group descriptions from a datapath, for one or all groups
  - the getting of group statistics from a datapath, for one or all groups
  - the sending of group configuration to a datapath

  When sending messages, `MessageFuture`s are used to allow the caller to determine the outcome of the request either synchronously or asynchronously, at their preference.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<MBodyGroupDescStats>` | `getGroupDescription(DataPathId dpid)` Returns the group descriptions from the specified datapath.
    `MBodyGroupDescStats` | `getGroupDescription(DataPathId dpid, GroupId groupId)` Returns the group description for the given group ID, from the specified datapath.
    `MBodyGroupFeatures` | `getGroupFeatures(DataPathId dpid)` Returns the supported group features for the specified datapath.
    `List<MBodyGroupStats>` | `getGroupStats(DataPathId dpid)` Returns the group statistics from the specified datapath.
    `MBodyGroupStats` | `getGroupStats(DataPathId dpid, GroupId groupId)` Returns the group statistics for the given group ID, from the specified datapath.
    `MessageFuture` | `sendGroupMod(OfmGroupMod groupMod, DataPathId dpid)` Sends the given GroupMod message to the specified datapath.

- - ### Method Detail

    - #### getGroupDescription

          List<MBodyGroupDescStats> getGroupDescription(DataPathId dpid)

      Returns the group descriptions from the specified datapath.

      Note that this is a synchronous call that blocks until all the group description replies have returned from the datapath.

      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of group descriptions
      Throws:
        `NullPointerException` - if dpid is null
        `NotFoundException` - if the specified datapath does not exist
        `VersionMismatchException` - if datapath is not OpenFlow 1.3 compliant

    - #### getGroupDescription

          MBodyGroupDescStats getGroupDescription(DataPathId dpid,
                                                GroupId groupId)

      Returns the group description for the given group ID, from the specified datapath.

      Note that this is a synchronous call that blocks until the group description reply has returned from the datapath.

      Parameters:
        `dpid` - the target datapath
        `groupId` - the ID of the group
      Returns:
        the group description
      Throws:
        `NullPointerException` - if either parameter is null
        `NotFoundException` - if the specified datapath or group does not exist
        `VersionMismatchException` - if datapath is not OpenFlow 1.3 compliant

    - #### getGroupStats

          List<MBodyGroupStats> getGroupStats(DataPathId dpid)

      Returns the group statistics from the specified datapath.

      Note that this is a synchronous call that blocks until all the group statistics replies have returned from the datapath.

      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of group statistics
      Throws:
        `NullPointerException` - if dpid is null
        `NotFoundException` - if the specified datapath does not exist
        `VersionMismatchException` - if datapath is not OpenFlow 1.3 compliant

    - #### getGroupStats

          MBodyGroupStats getGroupStats(DataPathId dpid,
                                      GroupId groupId)

      Returns the group statistics for the given group ID, from the specified datapath.

      Note that this is a synchronous call that blocks until the group statistics reply has returned from the datapath.

      Parameters:
        `dpid` - the target datapath
        `groupId` - the target group ID
      Returns:
        the group statistics
      Throws:
        `NullPointerException` - if either parameter is null
        `NotFoundException` - if the specified datapath or group does not exist
        `VersionMismatchException` - if datapath is not OpenFlow 1.3 compliant

    - #### getGroupFeatures

          MBodyGroupFeatures getGroupFeatures(DataPathId dpid)

      Returns the supported group features for the specified datapath.

      Note that this is a synchronous call that blocks until the group features reply has returned from the datapath.

      Parameters:
        `dpid` - the target datapath
      Returns:
        the group features
      Throws:
        `NullPointerException` - if dpid id null
        `NotFoundException` - if the specified datapath does not exist
        `VersionMismatchException` - if datapath is not OpenFlow 1.3 compliant

    - #### sendGroupMod

          MessageFuture sendGroupMod(OfmGroupMod groupMod,
                                   DataPathId dpid)
                                     throws OpenflowException

      Sends the given GroupMod message to the specified datapath. A message future is returned, to allow the caller to discover the outcome of the request once it has been satisfied.

      Adds the group entry to the specified datapath if the message's command is `ADD`. Modifies the group entry on the specified datapath if the message's command is `MODIFY`. Deletes the group entry from the specified datapath if the message's command is `DELETE`.

      Parameters:
        `groupMod` - the GroupMod message to send
        `dpid` - the target datapath
      Returns:
        a message future
      Throws:
        `NullPointerException` - if either parameter is null
        `IllegalArgumentException` - if groupMod is mutable
        `NotFoundException` - if the specified datapath does not exist
        `OpenflowException` - if there was an issue sending the message
      See Also:
        `GroupModCommand`

Copyright © 2014. All Rights Reserved.