Package org.elasticsearch.script
Class ScriptService.ContextSettings
java.lang.Object
org.elasticsearch.script.ScriptService.ContextSettings
- Enclosing class:
- ScriptService
Collect settings related to script context and general caches.
The general cache is used by default.
The context cache is used if
script.max_compilations_rate is "use-context", a deprecated value.
The context cache is used implicitly if script.max_compilations_rate is unset and any of the context
cache family of settings is used:
script.context.*.max_compilations_rate, ScriptService.SCRIPT_MAX_COMPILATIONS_RATE_SETTING
script.context.*.cache_max_size, ScriptService.SCRIPT_CACHE_SIZE_SETTING
script.context.*.cache_expire, ScriptService.SCRIPT_CACHE_EXPIRE_SETTING-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionContextSettings(Settings settings) ContextSettings(Settings settings, Set<String> contexts) -
Method Summary
Modifier and TypeMethodDescriptionthe context specific max compilation keysAll context specific settingsdeprecation message for implicitly using the context cachefullKeys(Setting.AffixSetting<?> affix, List<String> contexts) the full keys for the contexts in the context affix settinggetContexts(Setting.AffixSetting<?> setting, Settings settings, Set<String> contexts) booleanAre there any context specific settingsbooleanImplicitly use the script context cache.booleanIs the set of settings incompatible? This is the case if: 1)script.max_compilations_rate,ScriptService.SCRIPT_GENERAL_MAX_COMPILATIONS_RATE_SETTINGis set but not set to "use-context".Error message if there are incompatible settings.booleanShould the context cache be used? This is true if "use-context" is set explicitly or implicitly, see above for implicit definition.
-
Field Details
-
settings
-
useContextSet
public final boolean useContextSet -
isGeneralCompilationRateSet
public final boolean isGeneralCompilationRateSet -
generalCompilationRate
-
compilationContexts
-
sizeContexts
-
expireContexts
-
-
Constructor Details
-
ContextSettings
-
ContextSettings
-
-
Method Details
-
getContexts
-
hasContextSettings
public boolean hasContextSettings()Are there any context specific settings -
deprecationMessage
deprecation message for implicitly using the context cache -
contextCompilationKeys
the context specific max compilation keys -
fullKeys
the full keys for the contexts in the context affix setting -
useContextCache
public boolean useContextCache()Should the context cache be used? This is true if "use-context" is set explicitly or implicitly, see above for implicit definition. -
implicitContextCache
public boolean implicitContextCache()Implicitly use the script context cache. False if context cache is explicitly used as well as context cache is unused. -
incompatibleSettings
public boolean incompatibleSettings()Is the set of settings incompatible? This is the case if: 1)script.max_compilations_rate,ScriptService.SCRIPT_GENERAL_MAX_COMPILATIONS_RATE_SETTINGis set but not set to "use-context". 2) Any of the context cache family of settings is set. -
contextSettings
All context specific settings -
incompatibleSettingsMessage
Error message if there are incompatible settings.
-