Package com.thingworx.metrics
Interface IGauge<T>
- Type Parameters:
T
- the data type stored by this gauge
- All Superinterfaces:
IMetric
A metric that stores a single value. Gauges are guaranteed to be updated in a thread-safe manner.
-
Field Summary
Fields inherited from interface com.thingworx.metrics.IMetric
METRIC_TYPE, VALUE, VALUE_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionget()
Retrieves the current value of the gauge.void
Assigns a new value to the gaugevoid
Assigns a new value to the gauge with optional persistencevoid
Assigns a new value to the gauge with optional persistence
-
Method Details
-
get
Retrieves the current value of the gauge.- Returns:
- the current value
-
set
Assigns a new value to the gauge- Parameters:
value
- the new value
-
set
Assigns a new value to the gauge with optional persistence- Parameters:
value
- the new valuepersist
- whether or not to persist the gauge data
-
set
Assigns a new value to the gauge with optional persistence- Parameters:
value
- the new valuepersist
- whether or not to persist the gauge dataaggregate
- whether or not to aggregate this metric in a cluster environment
-