Package com.teracloud.streams.rest
Class Metric
java.lang.Object
com.teracloud.streams.rest.Element
com.teracloud.streams.rest.Metric
An object describing an Streams Metric
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the description for this metriclong
Gets the Epoch time when the metric was most recently retrievedDescribes the kind of metric that has been retrievedDescribes the type of metric that has been retrievedgetName()
Gets the name of this metricIdentifies the REST resource typelong
getValue()
Gets the value for this metricvoid
refresh()
Refresh this element.Methods inherited from class com.teracloud.streams.rest.Element
getStreamsConnection, toString
-
Constructor Details
-
Metric
public Metric()
-
-
Method Details
-
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
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
Describes the type of metric that has been retrieved- Returns:
- the metric type that contains one of the following values:
- system
- custom
- unknown
-
getName
Gets the name of this metric- Returns:
- the metric name
-
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
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 classElement
- Throws:
IOException
- Error communicating with Streams.
-