Class NumberMetric
java.lang.Object
org.sentrysoftware.metricshub.engine.telemetry.metric.AbstractMetric
org.sentrysoftware.metricshub.engine.telemetry.metric.NumberMetric
The NumberMetric class represents a numeric metric in the telemetry system.
It extends the AbstractMetric class and includes additional properties such as value and previousValue.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe constant representing the type of the metric (NumberMetric). -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.sentrysoftware.metricshub.engine.telemetry.metric.AbstractMetric
getValue, isUpdated
-
Field Details
-
NUMBER_METRIC_TYPE
The constant representing the type of the metric (NumberMetric).- See Also:
-
-
Constructor Details
-
NumberMetric
Creates a new instance of NumberMetric using the provided parameters.- Parameters:
name- The name of the metric.collectTime- The timestamp when the metric was collected.attributes- Additional attributes associated with the metric.value- The numeric value of the metric.
-
-
Method Details
-
save
public void save()Description copied from class:AbstractMetricSet the collect time as previous collect time- Overrides:
savein classAbstractMetric
-
getType
Description copied from class:AbstractMetricGet the metric type as String value- Specified by:
getTypein classAbstractMetric- Returns:
Stringvalue
-