public enum MetricType extends Enum<MetricType>
| Enum Constant and Description |
|---|
COUNTER
A Counter monotonically increases its values.
|
GAUGE
A Gauge has values that 'arbitrarily' goes up/down at each sampling.
|
HISTOGRAM
A Histogram calculates the distribution of a value.
|
INVALID
Invalid - Placeholder
|
TIMER
A timer aggregates timing durations and provides duration statistics
|
| Modifier and Type | Method and Description |
|---|---|
static MetricType |
from(Class<?> in)
Convert the metric Java class into a MetricType
|
static MetricType |
from(String in)
Convert the string representation into an enum
|
static MetricType |
fromClassName(String className)
Convert the metric Java class name into a MetricType
|
String |
toString() |
static MetricType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MetricType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MetricType COUNTER
public static final MetricType GAUGE
public static final MetricType HISTOGRAM
public static final MetricType TIMER
public static final MetricType INVALID
public static MetricType[] values()
for (MetricType c : MetricType.values()) System.out.println(c);
public static MetricType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String toString()
toString in class Enum<MetricType>public static MetricType from(String in)
in - the String representation (NOT the class name but rather a string like "counter", "gauge",...)IllegalArgumentException - if in is not a valid enum valuepublic static MetricType from(Class<?> in)
in - The metric classIllegalArgumentException - if in is not a valid metric classpublic static MetricType fromClassName(String className)
className - The name of a metric classIllegalArgumentException - if className is not a valid metric classCopyright © 2017 – 2022 Eclipse Foundation. All rights reserved.
Use is subject to license terms.