Package com.hazelcast.jet.core.metrics
Enum Unit
- java.lang.Object
-
- java.lang.Enum<Unit>
-
- com.hazelcast.jet.core.metrics.Unit
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Unit>
public enum Unit extends java.lang.Enum<Unit>
Measurement unit of user-defined metrics (seeMetric
). Meant to provide further information on the type of value measured by user metrics.The unit values will end up populating the metric tag
MetricTags.UNIT
. It can be used by UI tools to format the value and it's not used by Jet itself.- Since:
- Jet 4.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Unit
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Unit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BYTES
public static final Unit BYTES
Size, counter, represented in bytes
-
MS
public static final Unit MS
Timestamp or duration represented in ms
-
PERCENT
public static final Unit PERCENT
An integer in range 0..100
-
COUNT
public static final Unit COUNT
Number of items: size, counter...
-
BOOLEAN
public static final Unit BOOLEAN
0 or 1
-
ENUM
public static final Unit ENUM
0..n, ordinal of an enum
-
-
Method Detail
-
values
public static Unit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Unit c : Unit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Unit valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-