com.h3c.sdn.adm.metric

## Interface MetricProxyService

-     public interface MetricProxyService

  Interface for southbound REST APIs to interact with the Metering service within the controller.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TimeStampedMetric` | `createMetric(CounterDescriptor descriptor)` Creates a new `TimeStampedCounter` object based upon the provided `CounterDescriptor`.
    `TimeStampedMetric` | `createMetric(GaugeDescriptor descriptor)` Creates a new `TimeStampedGauge` object based upon the provided `GaugeDescriptor`.
    `TimeStampedMetric` | `createMetric(HistogramDescriptor descriptor)` Creates a new `TimeStampedHistogram` object based upon the provided `HistogramDescriptor`.
    `TimeStampedMetric` | `createMetric(MeterDescriptor descriptor)` Creates a new `TimeStampedMeter` object based upon the provided `MeterDescriptor`.
    `TimeStampedMetric` | `createMetric(RatioGaugeDescriptor descriptor)` Creates a new `TimeStampedRatioGauge` object based upon the provided `RatioGaugeDescriptor`.
    `TimeStampedMetric` | `createMetric(RollingCounterDescriptor descriptor)` Creates a new `TimeStampedRollingCounter` object based upon the provided `RollingCounterDescriptor`.
    `TimeStampedMetric` | `createMetric(TimerDescriptor descriptor)` Creates a new `TimeStampedTimer` object based upon the provided `TimerDescriptor`.
    `void` | `removeMetric(String toRemove)` Removes an existing `TimeStampedMetric` object from the metering framework, essentially unregistering it so that the framework no longer processes its values and exposes them via JMX.
    `void` | `updateMetric(MetricUpdate metricUpdate)` Updates a `TimeStampedMetric` object based upon the provided `MetricUpdate`.

- - ### Method Detail

    - #### createMetric

          TimeStampedMetric createMetric(CounterDescriptor descriptor)

      Creates a new `TimeStampedCounter` object based upon the provided `CounterDescriptor`.
      Parameters:
        `descriptor` - `CounterDescriptor` initialized to embody the desired properties of the `TimeStampedMetric` to be created
      Returns:
        resultant `TimeStampedMetric` counter object

    - #### createMetric

          TimeStampedMetric createMetric(GaugeDescriptor descriptor)

      Creates a new `TimeStampedGauge` object based upon the provided `GaugeDescriptor`.
      Parameters:
        `descriptor` - `GaugeDescriptor` initialized to embody the desired properties of the `TimeStampedMetric` to be created
      Returns:
        resultant `TimeStampedMetric` gauge object

    - #### createMetric

          TimeStampedMetric createMetric(HistogramDescriptor descriptor)

      Creates a new `TimeStampedHistogram` object based upon the provided `HistogramDescriptor`.
      Parameters:
        `descriptor` - `HistogramDescriptor` initialized to embody the desired properties of the `TimeStampedMetric` to be created
      Returns:
        resultant `TimeStampedMetric` histogram object

    - #### createMetric

          TimeStampedMetric createMetric(MeterDescriptor descriptor)

      Creates a new `TimeStampedMeter` object based upon the provided `MeterDescriptor`.
      Parameters:
        `descriptor` - `MeterDescriptor` initialized to embody the desired properties of the `TimeStampedMetric` to be created
      Returns:
        resultant `TimeStampedMetric` meter object

    - #### createMetric

          TimeStampedMetric createMetric(RatioGaugeDescriptor descriptor)

      Creates a new `TimeStampedRatioGauge` object based upon the provided `RatioGaugeDescriptor`.
      Parameters:
        `descriptor` - `RatioGaugeDescriptor` initialized to embody the desired properties of the `TimeStampedMetric` to be created
      Returns:
        resultant `TimeStampedMetric` ratio gauge object

    - #### createMetric

          TimeStampedMetric createMetric(RollingCounterDescriptor descriptor)

      Creates a new `TimeStampedRollingCounter` object based upon the provided `RollingCounterDescriptor`.
      Parameters:
        `descriptor` - `RollingCounterDescriptor` initialized to embody the desired properties of the `TimeStampedMetric` to be created
      Returns:
        resultant `TimeStampedMetric` rolling counter object

    - #### createMetric

          TimeStampedMetric createMetric(TimerDescriptor descriptor)

      Creates a new `TimeStampedTimer` object based upon the provided `TimerDescriptor`.
      Parameters:
        `descriptor` - `TimerDescriptor` initialized to embody the desired properties of the `TimeStampedMetric` to be created
      Returns:
        resultant `TimeStampedMetric` timer object

    - #### removeMetric

          void removeMetric(String toRemove)

      Removes an existing `TimeStampedMetric` object from the metering framework, essentially unregistering it so that the framework no longer processes its values and exposes them via JMX. If the `TimeStampedMetric` was exposed via JMX it will be removed from the JMX server. Values already persisted for the `TimeStampedMetric` will not be altered, but will be allowed to eventually age out if the metric is not eventually re-registered to provide new values.
      Parameters:
        `toRemove` - `UID` of `TimeStampedMetric` to remove from metering framework

    - #### updateMetric

          void updateMetric(MetricUpdate metricUpdate)

      Updates a `TimeStampedMetric` object based upon the provided `MetricUpdate`.
      Parameters:
        `metricUpdate` - `MetricUpdate` object
      Throws:
        `NotFoundException` - if the corresponding metric identifier does not exist

Copyright © 2014. All Rights Reserved.