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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
<,> settings)
abstract MovAvgModel
<,> settings, pipelineName, int windowSize)
Parse a settings hash that is specific to this modelprotected boolean
<,> settings, name, boolean defaultValue)
Extracts a boolean from the settings map, otherwise throws an exceptionprotected double
<,> settings, name, double defaultValue)
Extracts a 0-1 inclusive double from the settings map, otherwise throws an exceptionprotected int
<,> settings, name, int defaultValue)
Extracts an integer from the settings map, otherwise throws an exceptionMethods inherited from class java.lang.
, , , , , , , , , ,
-
Constructor Details
-
AbstractModelParser
public AbstractModelParser()
-
-
Method Details
-
parse
Parse a settings hash that is specific to this model- Parameters:
settings
- Map of settings, extracted from the requestpipelineName
- Name of the parent pipeline aggwindowSize
- 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) throwsExtracts a 0-1 inclusive double from the settings map, otherwise throws an exception- Parameters:
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- 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) throwsExtracts an integer from the settings map, otherwise throws an exception- Parameters:
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- 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) throwsExtracts a boolean from the settings map, otherwise throws an exception- Parameters:
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- 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:
-