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 concurrent gauge counts the number of parallel invocations of a target (method).A Counter monotonically increases 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 simple timer aggregates timing durationsA timer aggregates timing durations and provides duration statistics, plus throughput statistics -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricType
Convert the metric Java class into a MetricTypestatic MetricType
Convert the string representation into an enumstatic MetricType
fromClassName
(String className) Convert the metric Java class name into a MetricTypetoString()
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
-
CONCURRENT_GAUGE
A concurrent gauge counts the number of parallel invocations of a target (method). Upon entering the target the value is increased. It is decreased again upon exiting the target. -
COUNTER
A Counter monotonically increases 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 -
SIMPLE_TIMER
A simple timer aggregates timing durations -
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 (NOT the class name but rather a string like "counter", "gauge",...)- Returns:
- the matching Enum
- Throws:
IllegalArgumentException
- if in is not a valid enum value
-
from
Convert the metric Java class into a MetricType- Parameters:
in
- The metric class- Returns:
- the matching MetricType value
- Throws:
IllegalArgumentException
- if in is not a valid metric class
-
fromClassName
Convert the metric Java class name into a MetricType- Parameters:
className
- The name of a metric class- Returns:
- the matching MetricType value
- Throws:
IllegalArgumentException
- if className is not a valid metric class
-