Enum BucketHelpers.GapPolicy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<BucketHelpers.GapPolicy>
    Enclosing class:
    BucketHelpers

    public static enum BucketHelpers.GapPolicy
    extends java.lang.Enum<BucketHelpers.GapPolicy>
    A gap policy determines how "holes" in a set of buckets should be handled. For example, a date_histogram might have empty buckets due to no data existing for that time interval. This can cause problems for operations like a derivative, which relies on a continuous function. "insert_zeros": empty buckets will be filled with zeros for all metrics "skip": empty buckets will simply be ignored
    • Method Detail

      • values

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

        public static BucketHelpers.GapPolicy 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
      • parse

        public static BucketHelpers.GapPolicy parse​(java.lang.String text,
                                                    XContentLocation tokenLocation)
        Parse a string GapPolicy into the byte enum
        Parameters:
        text - GapPolicy in string format (e.g. "ignore")
        Returns:
        GapPolicy enum
      • writeTo

        public void writeTo​(StreamOutput out)
                     throws java.io.IOException
        Serialize the GapPolicy to the output stream
        Throws:
        java.io.IOException
      • readFrom

        public static BucketHelpers.GapPolicy readFrom​(StreamInput in)
                                                throws java.io.IOException
        Deserialize the GapPolicy from the input stream
        Returns:
        GapPolicy Enum
        Throws:
        java.io.IOException
      • getName

        public java.lang.String getName()
        Return the english-formatted name of the GapPolicy
        Returns:
        English representation of GapPolicy