Enum Unit

java.lang.Object
java.lang.Enum<Unit>
com.hazelcast.jet.core.metrics.Unit
All Implemented Interfaces:
Serializable, Comparable<Unit>, java.lang.constant.Constable

public enum Unit
extends Enum<Unit>
Measurement unit of user-defined metrics (see Metric). 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:
4.0
  • Enum Constant Details

    • 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 Details

    • values

      public static Unit[] 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

      public static Unit valueOf​(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null