Enum DuplicatePolicy

    • Enum Constant Detail

      • BLOCK

        public static final DuplicatePolicy BLOCK
        BLOCK: ignore any newly reported value and reply with an error
      • FIRST

        public static final DuplicatePolicy FIRST
        FIRST: ignore any newly reported value
      • LAST

        public static final DuplicatePolicy LAST
        LAST: override with the newly reported value
      • MIN

        public static final DuplicatePolicy MIN
        MIN: only override if the value is lower than the existing value
      • MAX

        public static final DuplicatePolicy MAX
        MAX: only override if the value is higher than the existing value
      • SUM

        public static final DuplicatePolicy SUM
        SUM: If a previous sample exists, add the new sample to it so that the updated value is equal to (previous + new). If no previous sample exists, set the updated value equal to the new value.
    • Method Detail

      • values

        public static DuplicatePolicy[] 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 (DuplicatePolicy c : DuplicatePolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DuplicatePolicy 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