Enum Class MetricType
- All Implemented Interfaces:
Serializable,Comparable<MetricType>,Constable,IMetricType
The MetricType enum represents different types of metrics.
Each type is associated with a specific metric key type, and each key type can accept a visitor
to implement its specific business logic.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Counter class represents the key type for Counter metrics.static classThe Gauge class represents the key type for Gauge metrics.static interfaceThe IMetricKeyType interface represents the key type of a metric.static interfaceThe IMetricTypeVisitor interface defines the visit method for each metric type.static classThe UpDownCounter class represents the key type for Up-Down Counter metrics.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCounter Metric TypeGauge Metric TypeUp-Down Counter Metric Type -
Method Summary
Modifier and TypeMethodDescriptionget()Gets the metric type.static MetricTypeReturns 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.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
GAUGE
Gauge Metric Type -
COUNTER
Counter Metric Type -
UP_DOWN_COUNTER
Up-Down Counter Metric Type
-
-
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
-
get
Description copied from interface:IMetricTypeGets the metric type.- Specified by:
getin interfaceIMetricType- Returns:
- The metric type.
-