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
ConstructorsModifierConstructorDescriptionprotectedLabeledSample(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.LabeledThe value.- Specified by:
valuein interfaceSample.Labeled- Returns:
- value
-
label
Description copied from interface:Sample.LabeledValue label.- Specified by:
labelin interfaceSample.Labeled- Returns:
- lavel
-
timestamp
public long timestamp()Description copied from interface:Sample.LabeledTimestamp the value was recorded.- Specified by:
timestampin interfaceSample.Labeled- Returns:
- timestamp
-
doubleValue
public double doubleValue()Description copied from interface:SampleReturns 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:
doubleValuein interfaceSample- Returns:
- value of the sample as a double
-