Package org.eclipse.microprofile.metrics
Enum Class MetricType
- All Implemented Interfaces:
Serializable
,Comparable<MetricType>
,Constable
An enumeration representing the different types of metrics.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA Counter monotonically in-/decreases its values.A Gauge has values that 'arbitrarily' goes up/down at each sampling.A Histogram calculates the distribution of a value.Invalid - PlaceholderA Meter measures the rate at which a set of events occur.A timer aggregates timing durations and provides duration statistics, plus throughput statistics -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricType
Convert the metric class type into an enumstatic MetricType
Convert the string representation into an enumtoString()
static MetricType
Returns the enum constant of this class with the specified name.static MetricType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COUNTER
A Counter monotonically in-/decreases its values. An example could be the number of Transactions committed. -
GAUGE
A Gauge has values that 'arbitrarily' goes up/down at each sampling. An example could be CPU load -
METERED
A Meter measures the rate at which a set of events occur. An example could be amount of Transactions per Hour. -
HISTOGRAM
A Histogram calculates the distribution of a value. -
TIMER
A timer aggregates timing durations and provides duration statistics, plus throughput statistics -
INVALID
Invalid - Placeholder
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<MetricType>
-
from
Convert the string representation into an enum- Parameters:
in
- the String representation- Returns:
- the matching Enum
- Throws:
IllegalArgumentException
- if in is not a valid enum value
-
from
Convert the metric class type into an enum- Parameters:
in
- The metric class type- Returns:
- the matching Enum
- Throws:
IllegalArgumentException
- if in is not a valid enum value
-