public final class DefaultSdkMetric<T> extends AttributeMap.Key<T> implements SdkMetric<T>
AttributeMap.Key.UnsafeValueType| Modifier and Type | Method and Description |
|---|---|
Set<MetricCategory> |
categories() |
static <T> SdkMetric<T> |
create(String name,
Class<T> clzz,
MetricLevel level,
MetricCategory c1,
MetricCategory... cn)
Create a new metric.
|
static <T> SdkMetric<T> |
create(String name,
Class<T> clzz,
MetricLevel level,
Set<MetricCategory> categories)
Create a new metric.
|
boolean |
equals(Object o) |
int |
hashCode() |
MetricLevel |
level() |
String |
name() |
String |
toString() |
Class<T> |
valueClass() |
convertValuepublic String name()
public Set<MetricCategory> categories()
categories in interface SdkMetric<T>public MetricLevel level()
public Class<T> valueClass()
valueClass in interface SdkMetric<T>public static <T> SdkMetric<T> create(String name, Class<T> clzz, MetricLevel level, MetricCategory c1, MetricCategory... cn)
create in interface SdkMetric<T>T - The type of the object containing the associated value for this metric.name - The name of this metric.clzz - The class of the object containing the associated value for this metric.c1 - A category associated with this metric.cn - Additional categories associated with this metric.IllegalArgumentException - If a metric of the same name has already been created.public static <T> SdkMetric<T> create(String name, Class<T> clzz, MetricLevel level, Set<MetricCategory> categories)
create in interface SdkMetric<T>T - The type of the object containing the associated value for this metric.name - The name of this metric.clzz - The class of the object containing the associated value for this metric.categories - The categories associated with this metric.IllegalArgumentException - If a metric of the same name has already been created.Copyright © 2023. All rights reserved.