com.h3c.sdn.metric

## Class GaugeDescriptor.GaugeDescriptorBuilder

- java.lang.Object
- - com.h3c.sdn.metric.MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>
  - - com.h3c.sdn.metric.GaugeDescriptor.GaugeDescriptorBuilder

- Enclosing class:
    GaugeDescriptor

      public static class GaugeDescriptor.GaugeDescriptorBuilder
      extends MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>

  Gauge descriptor builder object, which requires that only arguments that are mandatory for the construction of a `GaugeDescriptor` be specified during its own construction. Values may also be specified for the optional arguments needed for a `GaugeDescriptor`, but these values are defaulted in the event that no value is specified for them.

- - ### Field Summary

    - ### Fields inherited from class com.h3c.sdn.metric.MetricDescriptor.MetricDescriptorBuilder

      `appId, description, jmx, name, persist, primaryTag, secondaryTag, summaryMinutes, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GaugeDescriptor.GaugeDescriptorBuilder(String name)` Creates a new `GaugeDescriptor.GaugeDescriptorBuilder` using only the arguments that are required to build a valid `GaugeDescriptor`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `GaugeDescriptor.GaugeDescriptorBuilder` | `appId(String toSet)` Sets the application ID to apply to the `MetricDescriptor` that will be built.
    `GaugeDescriptor` | `build()` Build a `GaugeDescriptor` instance.
    `GaugeDescriptor.GaugeDescriptorBuilder` | `description(String toSet)` Sets the description to apply to the `MetricDescriptor` that will be built.
    `GaugeDescriptor.GaugeDescriptorBuilder` | `name(String toSet)` Sets the name to apply to the `MetricDescriptor` that will be built.
    `GaugeDescriptor.GaugeDescriptorBuilder` | `persist(boolean toSet)` Sets the flag that indicates whether the `MetricDescriptor` that will be built is to be persisted.
    `GaugeDescriptor.GaugeDescriptorBuilder` | `primaryTag(String toSet)` Sets the primary tag (e.g.
    `GaugeDescriptor.GaugeDescriptorBuilder` | `publishToJmx(boolean toSet)` Sets the flag that indicates whether the `MetricDescriptor` that will be built should be made visible via JMX.
    `GaugeDescriptor.GaugeDescriptorBuilder` | `secondaryTag(String toSet)` Sets the secondary tag (e.g.
    `GaugeDescriptor.GaugeDescriptorBuilder` | `summaryMinutes(MetricDescriptor.SummaryIntervalMinutes toSet)` Sets the number of minutes that should elapse between the persistence of summarized values to apply to the `MetricDescriptor` that will be built.
    `GaugeDescriptor.GaugeDescriptorBuilder` | `type(MetricDescriptor.Type toSet)` Sets the metric type to apply to the `MetricDescriptor` that will be built.

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

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

- - ### Constructor Detail

    - #### GaugeDescriptor.GaugeDescriptorBuilder

          public GaugeDescriptor.GaugeDescriptorBuilder(String name)

      Creates a new `GaugeDescriptor.GaugeDescriptorBuilder` using only the arguments that are required to build a valid `GaugeDescriptor`. If no other fields are set via other methods before building, the resulting `GaugeDescriptor` will specify a `TimeStampedGauge` associated with no specific application, no primary or secondary tags, no description, and that the resulting `TimeStampedGauge` should be persisted using the default summarization interval and should not be visible via JMX.
      Parameters:
        `name` - a name for the `TimeStampedGauge` (e.g. "txPackets")

  - ### Method Detail

    - #### build

          public GaugeDescriptor build()

      Build a `GaugeDescriptor` instance.
      Specified by:
        `build` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Returns:
        the resulting `GaugeDescriptor`

    - #### appId

          public GaugeDescriptor.GaugeDescriptorBuilder appId(String toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the application ID to apply to the `MetricDescriptor` that will be built.
      Overrides:
        `appId` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - application ID
      Returns:
        self

    - #### description

          public GaugeDescriptor.GaugeDescriptorBuilder description(String toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the description to apply to the `MetricDescriptor` that will be built.
      Overrides:
        `description` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - description
      Returns:
        self

    - #### name

          public GaugeDescriptor.GaugeDescriptorBuilder name(String toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the name to apply to the `MetricDescriptor` that will be built. Many metrics may have the same name (e.g. "txPackets") but can be distinguished from one another via the primary and secondary tags specified.
      Overrides:
        `name` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - name
      Returns:
        self

    - #### persist

          public GaugeDescriptor.GaugeDescriptorBuilder persist(boolean toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the flag that indicates whether the `MetricDescriptor` that will be built is to be persisted. `true` indicates that the value should be persisted, `false` that it shouldn't.
      Overrides:
        `persist` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - persistence flag
      Returns:
        self

    - #### primaryTag

          public GaugeDescriptor.GaugeDescriptorBuilder primaryTag(String toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the primary tag (e.g. "router-1.2.3.4") to apply to the `MetricDescriptor` that will be built. The tag can be anything that is a useful identifier to group metrics by.
      Overrides:
        `primaryTag` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - primary tag
      Returns:
        self

    - #### publishToJmx

          public GaugeDescriptor.GaugeDescriptorBuilder publishToJmx(boolean toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the flag that indicates whether the `MetricDescriptor` that will be built should be made visible via JMX. `true` indicates that the value should be visible, `false` that it shouldn't.
      Overrides:
        `publishToJmx` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - JMX flag
      Returns:
        self

    - #### secondaryTag

          public GaugeDescriptor.GaugeDescriptorBuilder secondaryTag(String toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the secondary tag (e.g. "port1") to apply to the `MetricDescriptor` that will be built. The tag can be anything that is a useful identifier to group metrics by, but should make sense in the context of the specified primary tag.
      Overrides:
        `secondaryTag` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - secondary tag
      Returns:
        self

    - #### summaryMinutes

          public GaugeDescriptor.GaugeDescriptorBuilder summaryMinutes(MetricDescriptor.SummaryIntervalMinutes toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the number of minutes that should elapse between the persistence of summarized values to apply to the `MetricDescriptor` that will be built.
      Overrides:
        `summaryMinutes` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - summarization interval (in minutes)
      Returns:
        self

    - #### type

          public GaugeDescriptor.GaugeDescriptorBuilder type(MetricDescriptor.Type toSet)

      Description copied from class: `MetricDescriptor.MetricDescriptorBuilder`
      Sets the metric type to apply to the `MetricDescriptor` that will be built.
      Overrides:
        `type` in class `MetricDescriptor.MetricDescriptorBuilder<GaugeDescriptor>`
      Parameters:
        `toSet` - metric type
      Returns:
        self

Copyright © 2014. All Rights Reserved.