java.lang.Object
io.helidon.metrics.api.LabeledSample
- All Implemented Interfaces:
Sample
,Sample.Labeled
Base implementation of
Sample.Labeled
.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.metrics.api.Sample
Sample.Derived, Sample.Labeled
-
Constructor Summary
ModifierConstructorDescriptionprotected
LabeledSample
(double value, String label, long timestamp) Create a sample. -
Method Summary
-
Constructor Details
-
LabeledSample
Create a sample.- Parameters:
value
- recorded valuelabel
- labeltimestamp
- timestamp
-
-
Method Details
-
value
public double value()Description copied from interface:Sample.Labeled
The value.- Specified by:
value
in interfaceSample.Labeled
- Returns:
- value
-
label
Description copied from interface:Sample.Labeled
Value label.- Specified by:
label
in interfaceSample.Labeled
- Returns:
- lavel
-
timestamp
public long timestamp()Description copied from interface:Sample.Labeled
Timestamp the value was recorded.- Specified by:
timestamp
in interfaceSample.Labeled
- Returns:
- timestamp
-
doubleValue
public double doubleValue()Description copied from interface:Sample
Returns the value as a double.For actual samples this serves as a conversion from long to double so all sample types can be treated somewhat uniformly.
- Specified by:
doubleValue
in interfaceSample
- Returns:
- value of the sample as a double
-