Class AbstractMetric
java.lang.Object
org.sentrysoftware.metricshub.engine.telemetry.metric.AbstractMetric
- Direct Known Subclasses:
NumberMetric,StateSetMetric
An abstract base class representing a telemetry metric. Concrete implementations
must extend this class and provide specific behavior for handling different types of metrics.
-
Method Summary
-
Method Details
-
save
public void save()Set the collect time as previous collect time -
isUpdated
public boolean isUpdated()Whether the metric is updated or not- Returns:
trueif the collect time is different from the previous collect time otherwisefalse
-
getType
Get the metric type as String value- Returns:
Stringvalue
-
getValue
public abstract <T> T getValue()Gets the value of the metric.- Type Parameters:
T- The type of the metric value.- Returns:
- The value of the metric.
-