Enum DuplicatePolicy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DuplicatePolicy>, Rawable

    public enum DuplicatePolicy
    extends java.lang.Enum<DuplicatePolicy>
    implements Rawable
    Policy that will define handling of duplicate samples.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BLOCK
      An error will occur for any out of order sample
      FIRST
      Ignore the new value
      LAST
      Override with latest value
      MAX
      Only override if the value is higher than the existing value
      MIN
      Only override if the value is lower than the existing value
      SUM
      If a previous sample exists, add the new sample to it so that the updated value is
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getRaw()
      Get byte array representation.
      static DuplicatePolicy valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static DuplicatePolicy[] 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, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • BLOCK

        public static final DuplicatePolicy BLOCK
        An error will occur for any out of order sample
      • LAST

        public static final DuplicatePolicy LAST
        Override with latest value
      • MIN

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

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

        public static final DuplicatePolicy SUM
        If a previous sample exists, add the new sample to it so that the updated value is
    • 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​(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 name
        java.lang.NullPointerException - if the argument is null
      • getRaw

        public byte[] getRaw()
        Description copied from interface: Rawable
        Get byte array representation.
        Specified by:
        getRaw in interface Rawable
        Returns:
        binary representation of the object