com.h3c.sdn.metric

## Class MetricValue

- java.lang.Object
- - com.h3c.sdn.metric.MetricValue

- Direct Known Subclasses:
    CounterMetricValue, GaugeMetricValue, HistogramMetricValue, MeterMetricValue, RatioGaugeMetricValue, RollingCounterMetricValue, TimerMetricValue

      public class MetricValue
      extends Object

  Metric value object, a data carrier which contains common metric value attributes being retrieved from the metric updates persisted and summarized.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MetricValue.Builder<T extends MetricValue.Builder<T>>` Builder (mutable) used to create a new value instances.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `MetricValue(MetricValue.Builder<?> builder)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MetricValue.Builder<?>` | `builder(String uid)`
    `long` | `getCount()` Gets the count that is computed.
    `long` | `getMillisecondsSpan()` Gets the number of milliseconds that the value has spanned over to get updated
    `Date` | `getPersistDate()` Gets the persisted date for the metric value.
    `MetricDescriptor.Type` | `getType()` Gets the metric type name for the metric.
    `String` | `getUid()` Gets the metric uid that is used to retrieve values.
    `Date` | `getUpdateDate()` Gets the updated date for the metric value.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MetricValue

          protected MetricValue(MetricValue.Builder<?> builder)

  - ### Method Detail

    - #### getUid

          public String getUid()

      Gets the metric uid that is used to retrieve values.
      Returns:
        the metric uid

    - #### getCount

          public long getCount()

      Gets the count that is computed.
      Returns:
        metric count

    - #### getType

          public MetricDescriptor.Type getType()

      Gets the metric type name for the metric.
      Returns:
        the custom type name

    - #### getPersistDate

          public Date getPersistDate()

      Gets the persisted date for the metric value.
      Returns:
        the persisted date

    - #### getUpdateDate

          public Date getUpdateDate()

      Gets the updated date for the metric value.
      Returns:
        the update date

    - #### getMillisecondsSpan

          public long getMillisecondsSpan()

      Gets the number of milliseconds that the value has spanned over to get updated
      Returns:
        the number of milliseconds spanned

    - #### builder

          public static MetricValue.Builder<?> builder(String uid)

Copyright © 2014. All Rights Reserved.