com.ibm.streamsx.rest

Class Metric



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

      Constructors 
      Constructor and Description
      Metric() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getDescription()
      Gets the description for this metric
      long getLastTimeRetrieved()
      Gets the Epoch time when the metric was most recently retrieved
      java.lang.String getMetricKind()
      Describes the kind of metric that has been retrieved
      java.lang.String getMetricType()
      Describes the type of metric that has been retrieved
      java.lang.String getName()
      Gets the name of this metric
      java.lang.String getResourceType()
      Identifies the REST resource type
      long getValue()
      Gets the value for this metric
      void refresh()
      Refresh this element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Metric

        public Metric()
    • Method Detail

      • getDescription

        public java.lang.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 java.lang.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 java.lang.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 java.lang.String getName()
        Gets the name of this metric
        Returns:
        the metric name
      • getResourceType

        public java.lang.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 java.io.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:
        java.io.IOException - Error communicating with Streams.
streamsx.topology 2.1 @ IBMStreams GitHub