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 ImmutableMeasurementcreateDouble(long startEpochNanos, long epochNanos, double value, Attributes attributes) (package private) static ImmutableMeasurementcreateLong(long startEpochNanos, long epochNanos, long value, Attributes attributes) withAttributes(Attributes attributes) Updates the attributes.withStartEpochNanos(long startEpochNanos) Updates the startEpochNanos.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:MeasurementUpdates the attributes.- Specified by:
withAttributesin interfaceMeasurement- Parameters:
attributes- The attributes to update- Returns:
- The updated object. For
ImmutableMeasurementit will be a new object with the updated attributes and forMutableMeasurementit will return itself with the attributes updated
-
withStartEpochNanos
Description copied from interface:MeasurementUpdates the startEpochNanos.- Specified by:
withStartEpochNanosin interfaceMeasurement- Parameters:
startEpochNanos- start epoch nanosecond- Returns:
- The updated object. For
ImmutableMeasurementit will be a new object with the updated startEpochNanos and forMutableMeasurementit will return itself with the startEpochNanos updated
-