com.h3c.sdn.metric

## Class MetricValue.Builder<T extends MetricValue.Builder<T>>

- java.lang.Object
- - com.h3c.sdn.metric.MetricValue.Builder<T>

- Type Parameters:
    `T` - specific metric value sub class
  Direct Known Subclasses:
    CounterMetricValue.Builder, GaugeMetricValue.Builder, HistogramMetricValue.Builder, MeterMetricValue.Builder, RatioGaugeMetricValue.Builder, RollingCounterMetricValue.Builder, TimerMetricValue.Builder
  Enclosing class:
    MetricValue

      public abstract static class MetricValue.Builder<T extends MetricValue.Builder<T>>
      extends Object

  Builder (mutable) used to create a new value instances.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MetricValue.Builder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MetricValue` | `build()`
    `T` | `count(long value)` Sets the count.
    `MetricValue.Builder<?>` | `millisecondsSpan(long millisecondsSpan)` Sets the time span in milliseconds.
    `T` | `persistDate(Date persistDate)` Sets the persist date.
    `protected abstract T` | `self()`
    `MetricValue.Builder<?>` | `type(MetricDescriptor.Type type)` Sets the metric type.
    `MetricValue.Builder<?>` | `uid(String uid)` Sets the metric identifier.
    `T` | `updateDate(Date updateDate)` Sets the update date.

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

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

- - ### Constructor Detail

    - #### MetricValue.Builder

          public MetricValue.Builder()

  - ### Method Detail

    - #### self

          protected abstract T self()

    - #### build

          public MetricValue build()

    - #### uid

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

      Sets the metric identifier.
      Parameters:
        `uid` - metric identifier
      Returns:
        this instance

    - #### type

          public MetricValue.Builder<?> type(MetricDescriptor.Type type)

      Sets the metric type.
      Parameters:
        `type` - metric type
      Returns:
        this instance

    - #### millisecondsSpan

          public MetricValue.Builder<?> millisecondsSpan(long millisecondsSpan)

      Sets the time span in milliseconds.
      Parameters:
        `millisecondsSpan` - time span
      Returns:
        this instance

    - #### persistDate

          public T persistDate(Date persistDate)

      Sets the persist date.
      Parameters:
        `persistDate` - persist date
      Returns:
        this instance

    - #### updateDate

          public T updateDate(Date updateDate)

      Sets the update date.
      Parameters:
        `updateDate` - update date
      Returns:
        this instance

    - #### count

          public T count(long value)

      Sets the count.
      Parameters:
        `value` - the count
      Returns:
        this instance

Copyright © 2014. All Rights Reserved.