Interface Measurement

All Known Implementing Classes:
AutoValue_ImmutableMeasurement, ImmutableMeasurement, MutableMeasurement

public interface Measurement
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.

  • Method Details

    • startEpochNanos

      long startEpochNanos()
    • epochNanos

      long epochNanos()
    • hasLongValue

      boolean hasLongValue()
    • longValue

      long longValue()
    • hasDoubleValue

      boolean hasDoubleValue()
    • doubleValue

      double doubleValue()
    • attributes

      Attributes attributes()
    • withAttributes

      Measurement withAttributes(Attributes attributes)
      Updates the attributes.
      Parameters:
      attributes - The attributes to update
      Returns:
      The updated object. For ImmutableMeasurement it will be a new object with the updated attributes and for MutableMeasurement it will return itself with the attributes updated
    • withStartEpochNanos

      Measurement withStartEpochNanos(long startEpochNanos)
      Updates the startEpochNanos.
      Parameters:
      startEpochNanos - start epoch nanosecond
      Returns:
      The updated object. For ImmutableMeasurement it will be a new object with the updated startEpochNanos and for MutableMeasurement it will return itself with the startEpochNanos updated