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

org.apache.rocketmq.shaded.io.opentelemetry.sdk.metrics.internal.state.MultiWritableMetricStorage 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.state;

import org.apache.rocketmq.shaded.io.opentelemetry.api.common.Attributes;
import java.util.ArrayList;
import java.util.List;

class MultiWritableMetricStorage implements WriteableMetricStorage {
  private final List underlyingMetrics;

  MultiWritableMetricStorage(List metrics) {
    this.underlyingMetrics = metrics;
  }

  @Override
  public BoundStorageHandle bind(Attributes attributes) {
    List handles = new ArrayList<>(underlyingMetrics.size());
    for (WriteableMetricStorage metric : underlyingMetrics) {
      handles.add(metric.bind(attributes));
    }
    return new MultiBoundStorageHandle(handles);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy