Class StateSetMetric
java.lang.Object
org.sentrysoftware.metricshub.engine.telemetry.metric.AbstractMetric
org.sentrysoftware.metricshub.engine.telemetry.metric.StateSetMetric
The `StateSetMetric` class represents a metric that holds a state value from a predefined set of states.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.sentrysoftware.metricshub.engine.telemetry.metric.AbstractMetric
getValue, isUpdated
-
Field Details
-
STATE_SET_METRIC_TYPE
The type identifier for the StateSetMetric.- See Also:
-
-
Constructor Details
-
StateSetMetric
public StateSetMetric(String name, Long collectTime, Map<String, String> attributes, String value, String[] stateSet) Constructs a new StateSetMetric.- Parameters:
name- The name of the metric.collectTime- The time when the metric was collected.attributes- Additional attributes associated with the metric.value- The current value of the state.stateSet- The set of possible states for 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
-