java.lang.Object
org.elasticsearch.xpack.core.ml.datafeed.DatafeedUpdate
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class DatafeedUpdate extends Object implements Writeable, org.elasticsearch.xcontent.ToXContentObject
A datafeed update contains partial properties to update a DatafeedConfig. The main difference between this class and DatafeedConfig is that here all fields are nullable.
  • Field Details

  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Get the id of the datafeed to update
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • getJobId

      public String getJobId()
    • getRuntimeMappings

      public Map<String,Object> getRuntimeMappings()
    • getDelayedDataCheckConfig

      public DelayedDataCheckConfig getDelayedDataCheckConfig()
    • getMaxEmptySearches

      public Integer getMaxEmptySearches()
    • getIndicesOptions

      public IndicesOptions getIndicesOptions()
    • apply

      public DatafeedConfig apply(DatafeedConfig datafeedConfig, Map<String,String> headers, ClusterState clusterState)
      Applies the update to the given DatafeedConfig
      Returns:
      a new DatafeedConfig that contains the update
    • equals

      public boolean equals(Object other)
      The lists of indices and types are compared for equality but they are not sorted first so this test could fail simply because the indices and types lists are in different orders.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object