public enum MetricType extends java.lang.Enum<MetricType>
Enum Constant and Description |
---|
CONCURRENT_GAUGE
A concurrent gauge counts the number of parallel invocations of
a target (method).
|
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
|
METERED
A Meter measures the rate at which a set of events occur.
|
SIMPLE_TIMER
A simple timer aggregates timing durations
|
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 Java class into a MetricType
|
static MetricType |
from(java.lang.String in)
Convert the string representation into an enum
|
static MetricType |
fromClassName(java.lang.String className)
Convert the metric Java class name into a MetricType
|
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 CONCURRENT_GAUGE
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 SIMPLE_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 representation (NOT the class name but rather a string like "counter", "gauge",...)java.lang.IllegalArgumentException
- if in is not a valid enum valuepublic static MetricType from(java.lang.Class<?> in)
in
- The metric classjava.lang.IllegalArgumentException
- if in is not a valid metric classpublic static MetricType fromClassName(java.lang.String className)
className
- The name of a metric classjava.lang.IllegalArgumentException
- if className is not a valid metric class