All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.rocketmq.shaded.io.opentelemetry.sdk.metrics.internal.aggregator.LongAccumulation Maven / Gradle / Ivy

There is a newer version: 5.0.7
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.apache.rocketmq.shaded.io.opentelemetry.sdk.metrics.internal.aggregator;

import org.apache.rocketmq.shaded.com.google.auto.value.AutoValue;
import org.apache.rocketmq.shaded.io.opentelemetry.sdk.metrics.data.LongExemplarData;
import java.util.Collections;
import java.util.List;
import javax.annotation.concurrent.Immutable;

/** An accumulation representing {@code long} values and exemplars. */
@Immutable
@AutoValue
abstract class LongAccumulation {

  static LongAccumulation create(long value, List exemplars) {
    return new AutoValue_LongAccumulation(value, exemplars);
  }

  static LongAccumulation create(long value) {
    return create(value, Collections.emptyList());
  }

  LongAccumulation() {}

  /** The current value. */
  abstract long getValue();

  /** Sampled measurements recorded during this accumulation. */
  abstract List getExemplars();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy