Class MutableMeasurement
java.lang.Object
io.opentelemetry.sdk.metrics.internal.state.MutableMeasurement
- All Implemented Interfaces:
Measurement
A mutable
Measurement implementation
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
This class is not thread-safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublelongbooleanbooleanlonglongwithAttributes(Attributes attributes) Updates the attributes.withStartEpochNanos(long startEpochNanos) Updates the startEpochNanos.
-
Constructor Details
-
MutableMeasurement
public MutableMeasurement()
-
-
Method Details
-
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
-
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
-
startEpochNanos
public long startEpochNanos()- Specified by:
startEpochNanosin interfaceMeasurement
-
epochNanos
public long epochNanos()- Specified by:
epochNanosin interfaceMeasurement
-
hasLongValue
public boolean hasLongValue()- Specified by:
hasLongValuein interfaceMeasurement
-
longValue
public long longValue()- Specified by:
longValuein interfaceMeasurement
-
hasDoubleValue
public boolean hasDoubleValue()- Specified by:
hasDoubleValuein interfaceMeasurement
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein interfaceMeasurement
-
attributes
- Specified by:
attributesin interfaceMeasurement
-