Class MovAvgModel.AbstractModelParser

org.elasticsearch.search.aggregations.pipeline.MovAvgModel.AbstractModelParser
Enclosing class:
MovAvgModel

public abstract static class MovAvgModel.AbstractModelParser extends
Abstract class which also provides some concrete parsing functionality.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    <,​> settings)
     
    abstract MovAvgModel
    <,​> settings,  pipelineName, int windowSize)
    Parse a settings hash that is specific to this model
    protected boolean
    <,​> settings,  name, boolean defaultValue)
    Extracts a boolean from the settings map, otherwise throws an exception
    protected double
    <,​> settings,  name, double defaultValue)
    Extracts a 0-1 inclusive double from the settings map, otherwise throws an exception
    protected int
    <,​> settings,  name, int defaultValue)
    Extracts an integer from the settings map, otherwise throws an exception

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • AbstractModelParser

      public AbstractModelParser()
  • Method Details

    • parse

      public abstract MovAvgModel parse(@Nullable <,​> settings,  pipelineName, int windowSize) throws
      Parse a settings hash that is specific to this model
      Parameters:
      settings - Map of settings, extracted from the request
      pipelineName - Name of the parent pipeline agg
      windowSize - Size of the window for this moving avg
      Returns:
      A fully built moving average model
      Throws:
    • parseDoubleParam

      protected double parseDoubleParam(@Nullable <,​> settings,  name, double defaultValue) throws
      Extracts a 0-1 inclusive double from the settings map, otherwise throws an exception
      Parameters:
      settings - Map of settings provided to this model
      name - Name of parameter we are attempting to extract
      defaultValue - Default value to be used if value does not exist in map
      Returns:
      Double value extracted from settings map
      Throws:
    • parseIntegerParam

      protected int parseIntegerParam(@Nullable <,​> settings,  name, int defaultValue) throws
      Extracts an integer from the settings map, otherwise throws an exception
      Parameters:
      settings - Map of settings provided to this model
      name - Name of parameter we are attempting to extract
      defaultValue - Default value to be used if value does not exist in map
      Returns:
      Integer value extracted from settings map
      Throws:
    • parseBoolParam

      protected boolean parseBoolParam(@Nullable <,​> settings,  name, boolean defaultValue) throws
      Extracts a boolean from the settings map, otherwise throws an exception
      Parameters:
      settings - Map of settings provided to this model
      name - Name of parameter we are attempting to extract
      defaultValue - Default value to be used if value does not exist in map
      Returns:
      Boolean value extracted from settings map
      Throws:
    • checkUnrecognizedParams

      protected void checkUnrecognizedParams(@Nullable <,​> settings) throws
      Throws: