Class ImmutableMeasurement
java.lang.Object
io.opentelemetry.sdk.metrics.internal.state.ImmutableMeasurement
- All Implemented Interfaces:
Measurement
- Direct Known Subclasses:
AutoValue_ImmutableMeasurement
A long or double measurement recorded from
ObservableLongMeasurement
or ObservableDoubleMeasurement
.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static ImmutableMeasurement
createDouble
(long startEpochNanos, long epochNanos, double value, Attributes attributes) (package private) static ImmutableMeasurement
createLong
(long startEpochNanos, long epochNanos, long value, Attributes attributes) withAttributes
(Attributes attributes) Updates the attributes.withStartEpochNanos
(long startEpochNanos) Updates the startEpochNanos.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.opentelemetry.sdk.metrics.internal.state.Measurement
attributes, doubleValue, epochNanos, hasDoubleValue, hasLongValue, longValue, startEpochNanos
-
Constructor Details
-
ImmutableMeasurement
public ImmutableMeasurement()
-
-
Method Details
-
createDouble
static ImmutableMeasurement createDouble(long startEpochNanos, long epochNanos, double value, Attributes attributes) -
createLong
static ImmutableMeasurement createLong(long startEpochNanos, long epochNanos, long value, Attributes attributes) -
withAttributes
Description copied from interface:Measurement
Updates the attributes.- Specified by:
withAttributes
in interfaceMeasurement
- Parameters:
attributes
- The attributes to update- Returns:
- The updated object. For
ImmutableMeasurement
it will be a new object with the updated attributes and forMutableMeasurement
it will return itself with the attributes updated
-
withStartEpochNanos
Description copied from interface:Measurement
Updates the startEpochNanos.- Specified by:
withStartEpochNanos
in interfaceMeasurement
- Parameters:
startEpochNanos
- start epoch nanosecond- Returns:
- The updated object. For
ImmutableMeasurement
it will be a new object with the updated startEpochNanos and forMutableMeasurement
it will return itself with the startEpochNanos updated
-