Enum MetricType
- All Implemented Interfaces:
Serializable,Comparable<MetricType>,Comparator<Number>
Valid metric types for a search query record
- Opensearch.internal:
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<MetricType> Get all valid metricsintCompare two numbers based on the metric typestatic MetricTypefromString(String metricType) Create MetricType from Stringstatic MetricTypereadFromStream(org.opensearch.core.common.io.stream.StreamInput in) Read a MetricType from a StreamInputtoString()static MetricTypeReturns 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.Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Enum Constant Details
-
LATENCY
Latency metric type -
CPU
CPU usage metric type -
JVM
JVM heap usage metric type
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
readFromStream
public static MetricType readFromStream(org.opensearch.core.common.io.stream.StreamInput in) throws IOException Read a MetricType from a StreamInput- Parameters:
in- the StreamInput to read from- Returns:
- MetricType
- Throws:
IOException- IOException
-
fromString
Create MetricType from String- Parameters:
metricType- the String representation of MetricType- Returns:
- MetricType
-
toString
- Overrides:
toStringin classEnum<MetricType>
-
allMetricTypes
Get all valid metrics- Returns:
- A set of String that contains all valid metrics
-
compare
Compare two numbers based on the metric type- Specified by:
comparein interfaceComparator<Number>- Parameters:
a- the first Number to be compared.b- the second Number to be compared.- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second
-