com.h3c.of.ctl.flow

## Interface MeterTracker

-     public interface MeterTracker

  Provides basic meter management for the controller.

  Facilitates:

  - obtaining meter configuration details from a datapath, for one or all meters
  - obtaining meter statistics from a datapath, for one or all meters
  - obtaining meter features from a datapath
  - sending meter 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<MBodyExperimenter>` | `getExperimenter(DataPathId dpid)` Returns meter configuration or statistics (for OF 1.0 datapaths), encoded in experimenter multipart replies.
    `List<MBodyMeterConfig>` | `getMeterConfig(DataPathId dpid)` Returns the meter configuration details from the specified datapath.
    `MBodyMeterConfig` | `getMeterConfig(DataPathId dpid, MeterId meterId)` Returns the meter configuration for the given meter ID, from the specified datapath.
    `MBodyMeterFeatures` | `getMeterFeatures(DataPathId dpid)` Returns the meter features for the specified datapath.
    `List<MBodyMeterStats>` | `getMeterStats(DataPathId dpid)` Returns the meter statistics from the specified datapath.
    `MBodyMeterStats` | `getMeterStats(DataPathId dpid, MeterId meterId)` Returns the meter statistics for the given meter ID, from the specified datapath.
    `MessageFuture` | `sendMeterMod(OfmMeterMod meterMod, DataPathId dpid)` Sends the given MeterMod message to the specified datapath.

- - ### Method Detail

    - #### getMeterConfig

          List<MBodyMeterConfig> getMeterConfig(DataPathId dpid)

      Returns the meter configuration details from the specified datapath.

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

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

    - #### getMeterConfig

          MBodyMeterConfig getMeterConfig(DataPathId dpid,
                                        MeterId meterId)

      Returns the meter configuration for the given meter ID, from the specified datapath.

      Note that this is a synchronous call that blocks until all the meter configuration reply has returned from the datapath.

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

    - #### getMeterStats

          List<MBodyMeterStats> getMeterStats(DataPathId dpid)

      Returns the meter statistics from the specified datapath.

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

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

    - #### getMeterStats

          MBodyMeterStats getMeterStats(DataPathId dpid,
                                      MeterId meterId)

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

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

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

    - #### getMeterFeatures

          MBodyMeterFeatures getMeterFeatures(DataPathId dpid)

      Returns the meter features for the specified datapath.

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

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

    - #### getExperimenter

          List<MBodyExperimenter> getExperimenter(DataPathId dpid)

      Returns meter configuration or statistics (for OF 1.0 datapaths), encoded in experimenter multipart replies.

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

      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of configuations or statistics
      Throws:
        `NullPointerException` - if dpid is null
        `NotFoundException` - if the specified datapath does not exist

    - #### sendMeterMod

          MessageFuture sendMeterMod(OfmMeterMod meterMod,
                                   DataPathId dpid)
                                     throws OpenflowException

      Sends the given MeterMod 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 meter to the specified datapath if the message's command is `ADD`. Modifies the meter on the specified datapath if the message's command is `MODIFY`. Deletes the meter from the specified datapath if the message's command is `DELETE`.

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

Copyright © 2014. All Rights Reserved.