public enum MetricType extends java.lang.Enum<MetricType>
Enum Constant and Description |
---|
COUNTER
A Counter monotonically in-/decreases 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
|
METERED
A Meter measures the rate at which a set of events occur.
|
TIMER
A timer aggregates timing durations and provides duration
statistics, plus throughput statistics
|
Modifier and Type | Method and Description |
---|---|
static MetricType |
from(java.lang.Class<?> in)
Convert the metric class type into an enum
|
static MetricType |
from(java.lang.String in)
Convert the string representation into an enum
|
java.lang.String |
toString() |
static MetricType |
valueOf(java.lang.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 METERED
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(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<MetricType>
public static MetricType from(java.lang.String in)
in
- the String representationjava.lang.IllegalArgumentException
- if in is not a valid enum valuepublic static MetricType from(java.lang.Class<?> in)
in
- The metric class typejava.lang.IllegalArgumentException
- if in is not a valid enum value