com.ringcentral.platform.metrics.MetricInstance Maven / Gradle / Ivy
package com.ringcentral.platform.metrics;
import com.ringcentral.platform.metrics.histogram.Histogram;
import com.ringcentral.platform.metrics.labels.Label;
import com.ringcentral.platform.metrics.labels.LabelUtils;
import com.ringcentral.platform.metrics.labels.LabelValue;
import com.ringcentral.platform.metrics.measurables.Measurable;
import com.ringcentral.platform.metrics.measurables.MeasurableValues;
import com.ringcentral.platform.metrics.names.MetricNamed;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static com.ringcentral.platform.metrics.utils.CollectionUtils.isNonEmpty;
public interface MetricInstance extends MetricNamed {
default boolean hasLabelValues() {
return isNonEmpty(labelValues());
}
List labelValues();
default boolean hasLabel(Label label) {
return LabelUtils.hasLabel(labelValues(), label);
}
default String valueOf(Label label) {
return LabelUtils.valueOf(labelValues(), label);
}
default Map