Class Metric

java.lang.Object
com.teracloud.streams.rest.Element
com.teracloud.streams.rest.Metric

public class Metric extends Element
An object describing an Streams Metric
  • Constructor Details

    • Metric

      public Metric()
  • Method Details

    • getDescription

      public String getDescription()
      Gets the description for this metric
      Returns:
      the metric description
    • getLastTimeRetrieved

      public long getLastTimeRetrieved()
      Gets the Epoch time when the metric was most recently retrieved
      Returns:
      the epoch time when the metric was most recently retrieved as a long
    • getMetricKind

      public String getMetricKind()
      Describes the kind of metric that has been retrieved
      Returns:
      the metric kind that contains one of the following values:
      • counter
      • gauge
      • time
      • unknown
    • getMetricType

      public String getMetricType()
      Describes the type of metric that has been retrieved
      Returns:
      the metric type that contains one of the following values:
      • system
      • custom
      • unknown
    • getName

      public String getName()
      Gets the name of this metric
      Returns:
      the metric name
    • getResourceType

      public String getResourceType()
      Identifies the REST resource type
      Returns:
      "metric"
    • getValue

      public long getValue()
      Gets the value for this metric
      Returns:
      the metric value as a long
    • refresh

      public void refresh() throws IOException
      Description copied from class: Element
      Refresh this element. Attributes of this object are updated from current state though the Streams REST API.
      Overrides:
      refresh in class Element
      Throws:
      IOException - Error communicating with Streams.